source: rtems/aclocal.m4 @ 811804fe

4.104.114.84.95
Last change on this file since 811804fe was 473b4e5, checked in by Joel Sherrill <joel.sherrill@…>, on 10/04/99 at 13:30:15

Regenerated.

  • Property mode set to 100644
File size: 14.8 KB
Line 
1dnl aclocal.m4 generated automatically by aclocal 1.4a
2
3dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7
8dnl This program is distributed in the hope that it will be useful,
9dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11dnl PARTICULAR PURPOSE.
12
13dnl $Id$
14
15dnl
16dnl RTEMS_TOP($1)
17dnl
18dnl $1 .. relative path from this configure.in to the toplevel configure.in
19dnl
20AC_DEFUN(RTEMS_TOP,
21[dnl
22AC_ARG_WITH(target-subdir,
23[  --with-target-subdir=DIR],
24TARGET_SUBDIR="$withval",
25TARGET_SUBDIR=".")
26
27RTEMS_TOPdir="$1";
28AC_SUBST(RTEMS_TOPdir)
29
30dnl Determine RTEMS Version string from the VERSION file
31dnl Hopefully, Joel never changes its format ;-
32AC_MSG_CHECKING([for RTEMS Version])
33if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then
34changequote(,)dnl
35RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \
36sed -e 's%RTEMS[        ]*Version[      ]*\(.*\)[       ]*%\1%g'`
37changequote([,])dnl
38else
39AC_MSG_ERROR(Unable to find ${RTEMS_TOPdir}/VERSION)
40fi
41if test -z "$RTEMS_VERSION"; then
42AC_MSG_ERROR(Unable to determine version)
43fi
44AC_MSG_RESULT($RTEMS_VERSION)
45])dnl
46
47dnl
48dnl $Id$
49dnl
50
51dnl canonicalize target cpu
52dnl NOTE: Most rtems targets do not fullfil autoconf's
53dnl target naming conventions "processor-vendor-os"
54dnl Therefore autoconf's AC_CANONICAL_TARGET will fail for them
55dnl and we have to fix it for rtems ourselves
56
57AC_DEFUN(RTEMS_CANONICAL_TARGET_CPU,
58[
59AC_CANONICAL_SYSTEM
60AC_MSG_CHECKING(rtems target cpu)
61changequote(,)dnl
62case "${target}" in
63  # hpux unix port should go here
64  i[3456]86-go32-rtems*)
65        RTEMS_CPU=i386
66        ;;
67  i[3456]86-pc-linux*)          # unix "simulator" port
68        RTEMS_CPU=unix
69        ;;
70  i[3456]86-*freebsd2*)         # unix "simulator" port
71        RTEMS_CPU=unix
72        ;;
73  no_cpu-*rtems*)
74        RTEMS_CPU=no_cpu
75        ;;
76  sparc-sun-solaris*)           # unix "simulator" port
77        RTEMS_CPU=unix
78        ;;
79  *)
80        RTEMS_CPU=`echo $target | sed 's%^\([^-]*\)-\(.*\)$%\1%'`
81        ;;
82esac
83changequote([,])dnl
84AC_SUBST(RTEMS_CPU)
85AC_MSG_RESULT($RTEMS_CPU)
86])
87
88# Do all the work for Automake.  This macro actually does too much --
89# some checks are only needed if your package does certain things.
90# But this isn't really a big deal.
91
92# serial 1
93
94dnl Usage:
95dnl AM_INIT_AUTOMAKE(package,version, [no-define])
96
97AC_DEFUN(AM_INIT_AUTOMAKE,
98[AC_REQUIRE([AC_PROG_INSTALL])
99dnl We require 2.13 because we rely on SHELL being computed by configure.
100AC_PREREQ([2.13])
101PACKAGE=[$1]
102AC_SUBST(PACKAGE)
103VERSION=[$2]
104AC_SUBST(VERSION)
105dnl test to see if srcdir already configured
106if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
107  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
108fi
109ifelse([$3],,
110AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
111AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
112AC_REQUIRE([AM_SANITY_CHECK])
113AC_REQUIRE([AC_ARG_PROGRAM])
114dnl FIXME This is truly gross.
115missing_dir=`cd $ac_aux_dir && pwd`
116AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
117AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
118AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
119AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
120AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
121AC_REQUIRE([AC_PROG_MAKE_SET])])
122
123#
124# Check to make sure that the build environment is sane.
125#
126
127AC_DEFUN(AM_SANITY_CHECK,
128[AC_MSG_CHECKING([whether build environment is sane])
129# Just in case
130sleep 1
131echo timestamp > conftestfile
132# Do `set' in a subshell so we don't clobber the current shell's
133# arguments.  Must try -L first in case configure is actually a
134# symlink; some systems play weird games with the mod time of symlinks
135# (eg FreeBSD returns the mod time of the symlink's containing
136# directory).
137if (
138   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
139   if test "[$]*" = "X"; then
140      # -L didn't work.
141      set X `ls -t $srcdir/configure conftestfile`
142   fi
143   if test "[$]*" != "X $srcdir/configure conftestfile" \
144      && test "[$]*" != "X conftestfile $srcdir/configure"; then
145
146      # If neither matched, then we have a broken ls.  This can happen
147      # if, for instance, CONFIG_SHELL is bash and it inherits a
148      # broken ls alias from the environment.  This has actually
149      # happened.  Such a system could not be considered "sane".
150      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
151alias in your environment])
152   fi
153
154   test "[$]2" = conftestfile
155   )
156then
157   # Ok.
158   :
159else
160   AC_MSG_ERROR([newly created file is older than distributed files!
161Check your system clock])
162fi
163rm -f conftest*
164AC_MSG_RESULT(yes)])
165
166dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
167dnl The program must properly implement --version.
168AC_DEFUN(AM_MISSING_PROG,
169[AC_MSG_CHECKING(for working $2)
170# Run test in a subshell; some versions of sh will print an error if
171# an executable is not found, even if stderr is redirected.
172# Redirect stdin to placate older versions of autoconf.  Sigh.
173if ($2 --version) < /dev/null > /dev/null 2>&1; then
174   $1=$2
175   AC_MSG_RESULT(found)
176else
177   $1="$3/missing $2"
178   AC_MSG_RESULT(missing)
179fi
180AC_SUBST($1)])
181
182# Add --enable-maintainer-mode option to configure.
183# From Jim Meyering
184
185# serial 1
186
187AC_DEFUN(AM_MAINTAINER_MODE,
188[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
189  dnl maintainer-mode is disabled by default
190  AC_ARG_ENABLE(maintainer-mode,
191[  --enable-maintainer-mode enable make rules and dependencies not useful
192                          (and sometimes confusing) to the casual installer],
193      USE_MAINTAINER_MODE=$enableval,
194      USE_MAINTAINER_MODE=no)
195  AC_MSG_RESULT($USE_MAINTAINER_MODE)
196  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
197  MAINT=$MAINTAINER_MODE_TRUE
198  AC_SUBST(MAINT)dnl
199]
200)
201
202# Define a conditional.
203
204AC_DEFUN(AM_CONDITIONAL,
205[AC_SUBST($1_TRUE)
206AC_SUBST($1_FALSE)
207if $2; then
208  $1_TRUE=
209  $1_FALSE='#'
210else
211  $1_TRUE='#'
212  $1_FALSE=
213fi])
214
215dnl $Id$
216
217AC_DEFUN(RTEMS_ENABLE_MULTIPROCESSING,
218[
219AC_ARG_ENABLE(multiprocessing,
220[  --enable-multiprocessing             enable multiprocessing interface],
221[case "${enableval}" in
222  yes) RTEMS_HAS_MULTIPROCESSING=yes ;;
223  no) RTEMS_HAS_MULTIPROCESSING=no ;;
224  *)  AC_MSG_ERROR(bad value ${enableval} for enable-multiprocessing option) ;;
225esac],[RTEMS_HAS_MULTIPROCESSING=no])
226AC_SUBST(RTEMS_HAS_MULTIPROCESSING)dnl
227])
228
229dnl $Id$
230
231AC_DEFUN(RTEMS_ENABLE_POSIX,
232[
233AC_ARG_ENABLE(posix,
234[  --enable-posix                       enable posix interface],
235[case "${enableval}" in
236  yes) RTEMS_HAS_POSIX_API=yes ;;
237  no) RTEMS_HAS_POSIX_API=no ;;
238  *)  AC_MSG_ERROR(bad value ${enableval} for enable-posix option) ;;
239esac],[RTEMS_HAS_POSIX_API=yes])
240AC_SUBST(RTEMS_HAS_POSIX_API)
241
242changequote(,)dnl
243case "${target}" in
244  # hpux unix port should go here
245  i[3456]86-go32-rtems*)
246        RTEMS_HAS_POSIX_API=no
247        ;;
248  i[3456]86-pc-linux*)         # unix "simulator" port
249        RTEMS_HAS_POSIX_API=no
250        ;;
251  i[3456]86-*freebsd2*) # unix "simulator" port
252        RTEMS_HAS_POSIX_API=no
253        ;;
254  no_cpu-*rtems*)
255        RTEMS_HAS_POSIX_API=no
256        ;;
257  sparc-sun-solaris*)             # unix "simulator" port
258        RTEMS_HAS_POSIX_API=no
259        ;;
260  *)
261        ;;
262esac
263changequote([,])dnl
264AC_SUBST(RTEMS_HAS_POSIX_API)
265])
266
267dnl $Id$
268
269AC_DEFUN(RTEMS_ENABLE_NETWORKING,
270[
271AC_ARG_ENABLE(networking,
272[  --enable-networking                  enable TCP/IP stack],
273[case "${enableval}" in
274  yes) RTEMS_HAS_NETWORKING=yes ;;
275  no) RTEMS_HAS_NETWORKING=no ;;
276  *)  AC_MSG_ERROR(bad value ${enableval} for enable-networking option) ;;
277esac],[RTEMS_HAS_NETWORKING=yes])
278AC_SUBST(RTEMS_HAS_NETWORKING)dnl
279])
280
281dnl $Id$
282
283AC_DEFUN(RTEMS_ENABLE_RDBG,
284[
285AC_ARG_ENABLE(rdbg,
286[  --enable-rdbg                        enable remote debugger],
287[case "${enableval}" in
288  yes) RTEMS_HAS_RDBG=yes ;;
289  no) RTEMS_HAS_RDBG=no ;;
290  *)  AC_MSG_ERROR(bad value ${enableval} for enable-rdbg option) ;;
291esac],[RTEMS_HAS_RDBG=no])
292AC_SUBST(RTEMS_HAS_RDBG)dnl
293])
294
295dnl $Id$
296
297AC_DEFUN(RTEMS_ENABLE_INLINES,
298[AC_ARG_ENABLE(rtems-inlines,
299[  --enable-rtems-inlines               enable RTEMS inline functions]
300[                                       (default:enabled, disable to use macros)],
301[case "${enableval}" in
302  yes) RTEMS_USE_MACROS=no ;;
303  no) RTEMS_USE_MACROS=yes ;;
304  *)  AC_MSG_ERROR(bad value ${enableval} for disable-rtems-inlines option) ;;
305esac],[RTEMS_USE_MACROS=no])
306AC_SUBST(RTEMS_USE_MACROS)dnl
307])
308
309dnl $Id$
310
311AC_DEFUN(RTEMS_ENABLE_CXX,
312[
313AC_ARG_ENABLE(cxx,
314[  --enable-cxx                         enable C++ support,]
315[                                       and build the rtems++ library],
316[case "${enableval}" in
317  yes) RTEMS_HAS_CPLUSPLUS=yes ;;
318  no) RTEMS_HAS_CPLUSPLUS=no   ;;
319  *)  AC_MSG_ERROR(bad value ${enableval} for enable-cxx option) ;;
320esac], [RTEMS_HAS_CPLUSPLUS=no])
321])
322
323dnl $Id$
324
325AC_DEFUN(RTEMS_ENABLE_GCC28,
326[
327AC_ARG_ENABLE(gcc28,
328[  --enable-gcc28                       enable use of gcc 2.8.x features],
329[case "${enableval}" in
330  yes) RTEMS_USE_GCC272=no ;;
331  no) RTEMS_USE_GCC272=yes ;;
332  *)  AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;;
333esac],[RTEMS_USE_GCC272=no])
334])
335
336dnl $Id$
337
338AC_DEFUN(RTEMS_ENABLE_LIBCDIR,
339[
340AC_ARG_ENABLE(libcdir,
341[  --enable-libcdir=directory           set the directory for the C library],
342[ RTEMS_LIBC_DIR="${enableval}" ; \
343test -d ${enableval} || AC_MSG_ERROR("$enableval is not a directory" ) ] )
344AC_SUBST(RTEMS_LIBC_DIR)dnl
345])
346
347dnl $Id$
348
349AC_DEFUN(RTEMS_ENABLE_TESTS,
350[
351# If the tests are enabled, then find all the test suite Makefiles
352AC_MSG_CHECKING([if the test suites are enabled? ])
353AC_ARG_ENABLE(tests,
354[  --enable-tests                       enable tests (default:disabled)],
355  [case "${enableval}" in
356    yes) tests_enabled=yes ;;
357    no)  tests_enabled=no ;;
358    *)   AC_MSG_ERROR(bad value ${enableval} for tests option) ;;
359  esac], [tests_enabled=no])
360AC_MSG_RESULT([$tests_enabled])
361])
362
363dnl $Id$
364dnl
365dnl FIXME: this needs to be reworked
366
367AC_DEFUN(RTEMS_ENABLE_HWAPI,
368[dnl
369AC_ARG_ENABLE(hwapi, \
370[  --enable-hwapi                       enable hardware API library],
371[case "${enableval}" in
372    yes) RTEMS_HAS_HWAPI=yes ;;
373    no)  RTEMS_HAS_HWAPI=no ;;
374    *)  AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;;
375  esac],[RTEMS_HAS_HWAPI=no])
376AC_SUBST(RTEMS_HAS_HWAPI)dnl
377])dnl
378
379dnl $Id$
380
381dnl check if RTEMS support a cpu
382AC_DEFUN(RTEMS_CHECK_CPU,
383[dnl
384AC_REQUIRE([RTEMS_TOP])
385AC_REQUIRE([RTEMS_CANONICAL_TARGET_CPU])
386# Is this a supported CPU?
387AC_MSG_CHECKING([if cpu $RTEMS_CPU is supported])
388if test -d "$srcdir/$RTEMS_TOPdir/c/src/exec/score/cpu/$RTEMS_CPU"; then
389  AC_MSG_RESULT(yes)
390else
391  AC_MSG_ERROR(no)
392fi
393])dnl
394
395
396dnl $Id$
397
398AC_DEFUN(RTEMS_CANONICAL_HOST,
399[dnl
400AC_REQUIRE([AC_CANONICAL_HOST])
401RTEMS_HOST=$host_os
402changequote(,)dnl
403case "${target}" in
404  # hpux unix port should go here
405  i[3456]86-pc-linux*)         # unix "simulator" port
406        RTEMS_HOST=Linux
407        ;;
408  i[3456]86-*freebsd2*) # unix "simulator" port
409        RTEMS_HOST=FreeBSD
410        ;;
411  sparc-sun-solaris*)             # unix "simulator" port
412        RTEMS_HOST=Solaris
413        ;;
414  *)
415        ;;
416esac
417changequote([,])dnl
418AC_SUBST(RTEMS_HOST)
419])dnl
420
421dnl $Id$
422
423AC_DEFUN(RTEMS_CONFIG_SUBDIRS,
424[
425define([RTEMS_TGT_SUBDIRS],
426ifdef([RTEMS_TGT_SUBDIRS], [RTEMS_TGT_SUBDIRS ],)[$1])dnl
427target_subdirs="RTEMS_TGT_SUBDIRS"
428AC_SUBST(target_subdirs)
429])
430
431dnl This is a subroutine of AC_OUTPUT.
432dnl It is called after running config.status.
433dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
434AC_DEFUN(RTEMS_OUTPUT_SUBDIRS,
435[
436if test "$no_recursion" != yes; then
437  if test $target_alias != $host_alias; then
438    target_subdir="$target_alias"
439  else
440    target_subdir="."
441  fi
442  # Remove --cache-file and --srcdir arguments so they do not pile up.
443  ac_sub_configure_args=
444  ac_prev=
445  for ac_arg in $ac_configure_args; do
446    if test -n "$ac_prev"; then
447      ac_prev=
448      continue
449    fi
450    case "$ac_arg" in
451    -cache-file | --cache-file | --cache-fil | --cache-fi \
452    | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
453      ac_prev=cache_file ;;
454    -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
455    | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
456      ;;
457    -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
458      ac_prev=srcdir ;;
459    -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
460      ;;
461    *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
462    esac
463  done
464
465  test -d $target_subdir || mkdir $target_subdir
466  for ac_config_dir in $1; do
467
468    # Do not complain, so a configure script can configure whichever
469    # parts of a large source tree are present.
470    if test ! -d $srcdir/$ac_config_dir; then
471      continue
472    fi
473
474    echo configuring in $target_subdir/$ac_config_dir
475
476    case "$srcdir" in
477    .) ;;
478    *)
479      if test -d $target_subdir/$ac_config_dir || mkdir $target_subdir/$ac_config_dir; then :;
480      else
481        AC_MSG_ERROR(can not create `pwd`/$target_subdir/$ac_config_dir)
482      fi
483      ;;
484    esac
485
486    ac_popdir=`pwd`
487    cd $target_subdir/$ac_config_dir
488
489changequote(, )dnl
490      # A "../" for each directory in /$ac_config_dir.
491      ac_dots=`echo $target_subdir/$ac_config_dir|sed -e 's%^\./%%' -e 's%[^/]$%&/%' -e 's%[^/]*/%../%g'`
492changequote([, ])dnl
493
494    case "$srcdir" in
495    .) # No --srcdir option.  We are building in place.
496      ac_sub_srcdir=$srcdir ;;
497    /*) # Absolute path.
498      ac_sub_srcdir=$srcdir/$ac_config_dir ;;
499    *) # Relative path.
500      ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
501    esac
502
503    # Check for guested configure; otherwise get Cygnus style configure.
504    if test -f $ac_sub_srcdir/configure; then
505      ac_sub_configure=$ac_sub_srcdir/configure
506    elif test -f $ac_sub_srcdir/configure.in; then
507      ac_sub_configure=$ac_configure
508    else
509      AC_MSG_WARN(no configuration information is in $ac_config_dir)
510      ac_sub_configure=
511    fi
512
513    # The recursion is here.
514    if test -n "$ac_sub_configure"; then
515
516      # Make the cache file name correct relative to the subdirectory.
517      if test "$target_alias" != "$host_alias"; then
518      ac_sub_cache_file=$cache_file
519      else
520      case "$cache_file" in
521      /*) ac_sub_cache_file=$cache_file ;;
522      *) # Relative path.
523        ac_sub_cache_file="$ac_dots$cache_file" ;;
524      esac
525      fi
526ifdef([AC_PROVIDE_AC_PROG_INSTALL],
527      [  case "$ac_given_INSTALL" in
528changequote(, )dnl
529        [/$]*) INSTALL="$ac_given_INSTALL" ;;
530changequote([, ])dnl
531        *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
532        esac
533])dnl
534
535      echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
536      # The eval makes quoting arguments work.
537      if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
538        $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
539        --with-target-subdir=$target_subdir --cache-file=$ac_sub_cache_file
540      then :
541      else
542        AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
543      fi
544    fi
545
546    cd $ac_popdir
547  done
548fi
549])
550
Note: See TracBrowser for help on using the repository browser.