1 dnl aclocal.m4 generated automatically by aclocal 1.2e
3 dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4 dnl This Makefile.in is free software; the Free Software Foundation
5 dnl gives unlimited permission to copy and/or distribute it,
6 dnl with or without modifications, as long as this notice is preserved.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 dnl PARTICULAR PURPOSE.
13 dnl See whether we need to use fopen-bin.h rather than fopen-same.h.
14 AC_DEFUN(BFD_BINARY_FOPEN,
15 [AC_REQUIRE([AC_CANONICAL_SYSTEM])
18 i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows)
20 AC_DEFINE(USE_BINARY_FOPEN) ;;
23 dnl Get a default for CC_FOR_BUILD to put into Makefile.
24 AC_DEFUN(BFD_CC_FOR_BUILD,
25 [# Put a plausible default for CC_FOR_BUILD in Makefile.
26 if test -z "$CC_FOR_BUILD"; then
27 if test "x$cross_compiling" = "xno"; then
33 AC_SUBST(CC_FOR_BUILD)
34 # Also set EXEEXT_FOR_BUILD.
35 if test "x$cross_compiling" = "xno"; then
36 EXEEXT_FOR_BUILD='$(EXEEXT)'
38 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
39 [cat > ac_c_test.c << 'EOF'
41 /* Nothing needed here */
44 ${CC_FOR_BUILD} -o ac_c_test am_c_test.c 1>&5 2>&5
45 bfd_cv_build_exeext=`echo ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
47 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
49 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
51 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
53 dnl See whether we need a declaration for a function.
54 AC_DEFUN(BFD_NEED_DECLARATION,
55 [AC_MSG_CHECKING([whether $1 must be declared])
56 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
72 [char *(*pfn) = (char *(*)) $1],
73 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
74 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
75 if test $bfd_cv_decl_needed_$1 = yes; then
76 bfd_tr_decl=NEED_DECLARATION_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
77 AC_DEFINE_UNQUOTED($bfd_tr_decl)
81 # Do all the work for Automake. This macro actually does too much --
82 # some checks are only needed if your package does certain things.
83 # But this isn't really a big deal.
88 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
90 AC_DEFUN(AM_INIT_AUTOMAKE,
91 [AC_REQUIRE([AM_PROG_INSTALL])
96 dnl test to see if srcdir already configured
97 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
98 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
101 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
102 AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
103 AC_REQUIRE([AM_SANITY_CHECK])
104 AC_REQUIRE([AC_ARG_PROGRAM])
105 dnl FIXME This is truly gross.
106 missing_dir=`cd $ac_aux_dir && pwd`
107 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
108 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
109 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
110 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
111 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
112 AC_REQUIRE([AC_PROG_MAKE_SET])])
117 AC_DEFUN(AM_PROG_INSTALL,
118 [AC_REQUIRE([AC_PROG_INSTALL])
119 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
120 AC_SUBST(INSTALL_SCRIPT)dnl
124 # Check to make sure that the build environment is sane.
127 AC_DEFUN(AM_SANITY_CHECK,
128 [AC_MSG_CHECKING([whether build environment is sane])
131 echo 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
138 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
139 if test "[$]*" = "X"; then
141 set X `ls -t $srcdir/configure conftestfile`
143 if test "[$]*" != "X $srcdir/configure conftestfile" \
144 && test "[$]*" != "X conftestfile $srcdir/configure"; then
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
151 alias in your environment])
154 test "[$]2" = conftestfile
160 AC_MSG_ERROR([newly created file is older than distributed files!
161 Check your system clock])
166 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
167 dnl The program must properly implement --version.
168 AC_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.
173 if ($2 --version) < /dev/null > /dev/null 2>&1; then
178 AC_MSG_RESULT(missing)
183 # serial 24 AM_PROG_LIBTOOL
184 AC_DEFUN(AM_PROG_LIBTOOL,
185 [AC_REQUIRE([AM_ENABLE_SHARED])dnl
186 AC_REQUIRE([AM_ENABLE_STATIC])dnl
187 AC_REQUIRE([AC_CANONICAL_HOST])dnl
188 AC_REQUIRE([AC_PROG_RANLIB])dnl
189 AC_REQUIRE([AC_PROG_CC])dnl
190 AC_REQUIRE([AM_PROG_LD])dnl
191 AC_REQUIRE([AM_PROG_NM])dnl
192 AC_REQUIRE([AC_PROG_LN_S])dnl
194 # Always use our own libtool.
195 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
198 # Check for any special flags to pass to ltconfig.
200 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
201 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
202 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
203 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
204 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
206 # Some flags need to be propagated to the compiler or linker for good
210 # Find out which ABI we are using.
211 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
212 if AC_TRY_EVAL(ac_compile); then
213 case "`/usr/bin/file conftest.o`" in
229 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
230 CFLAGS="$CFLAGS -belf"
234 # Actually configure libtool. ac_aux_dir is where install-sh is found.
235 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
236 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
237 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \
238 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
239 || AC_MSG_ERROR([libtool configure failed])
242 # AM_ENABLE_SHARED - implement the --enable-shared flag
243 # Usage: AM_ENABLE_SHARED[(DEFAULT)]
244 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
246 AC_DEFUN(AM_ENABLE_SHARED,
247 [define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
248 AC_ARG_ENABLE(shared,
249 changequote(<<, >>)dnl
250 << --enable-shared build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT]
252 [ --enable-shared=PKGS only build shared libraries if the current package
253 appears as an element in the PKGS list],
254 [p=${PACKAGE-default}
256 yes) enable_shared=yes ;;
257 no) enable_shared=no ;;
260 # Look at the argument we got. We use all the common list separators.
261 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
262 for pkg in $enableval; do
263 if test "X$pkg" = "X$p"; then
270 enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
273 # AM_DISABLE_SHARED - set the default shared flag to --disable-shared
274 AC_DEFUN(AM_DISABLE_SHARED,
275 [AM_ENABLE_SHARED(no)])
277 # AM_DISABLE_STATIC - set the default static flag to --disable-static
278 AC_DEFUN(AM_DISABLE_STATIC,
279 [AM_ENABLE_STATIC(no)])
281 # AM_ENABLE_STATIC - implement the --enable-static flag
282 # Usage: AM_ENABLE_STATIC[(DEFAULT)]
283 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
285 AC_DEFUN(AM_ENABLE_STATIC,
286 [define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
287 AC_ARG_ENABLE(static,
288 changequote(<<, >>)dnl
289 << --enable-static build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT]
291 [ --enable-static=PKGS only build shared libraries if the current package
292 appears as an element in the PKGS list],
293 [p=${PACKAGE-default}
295 yes) enable_static=yes ;;
296 no) enable_static=no ;;
299 # Look at the argument we got. We use all the common list separators.
300 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
301 for pkg in $enableval; do
302 if test "X$pkg" = "X$p"; then
309 enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
313 # AM_PROG_LD - find the path to the GNU or non-GNU linker
316 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
317 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
318 AC_REQUIRE([AC_PROG_CC])
320 if test "$ac_cv_prog_gcc" = yes; then
321 # Check if gcc -print-prog-name=ld gives a path.
322 AC_MSG_CHECKING([for ld used by GCC])
323 ac_prog=`($CC -print-prog-name=ld) 2>&5`
325 # Accept absolute paths.
327 test -z "$LD" && LD="$ac_prog"
330 # If it fails, then pretend we aren't using GCC.
334 # If it is relative, then search for the first ld in PATH.
338 elif test "$with_gnu_ld" = yes; then
339 AC_MSG_CHECKING([for GNU ld])
341 AC_MSG_CHECKING([for non-GNU ld])
343 AC_CACHE_VAL(ac_cv_path_LD,
344 [if test -z "$LD"; then
345 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
346 for ac_dir in $PATH; do
347 test -z "$ac_dir" && ac_dir=.
348 if test -f "$ac_dir/$ac_prog"; then
349 ac_cv_path_LD="$ac_dir/$ac_prog"
350 # Check to see if the program is GNU ld. I'd rather use --version,
351 # but apparently some GNU ld's only accept -v.
352 # Break only if it was the GNU/non-GNU ld that we prefer.
353 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
354 test "$with_gnu_ld" != no && break
356 test "$with_gnu_ld" != yes && break
362 ac_cv_path_LD="$LD" # Let the user override the test with a path.
365 if test -n "$LD"; then
370 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
375 AC_DEFUN(AM_PROG_LD_GNU,
376 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
377 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
378 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
379 ac_cv_prog_gnu_ld=yes
385 # AM_PROG_NM - find the path to a BSD-compatible name lister
387 [AC_MSG_CHECKING([for BSD-compatible nm])
388 AC_CACHE_VAL(ac_cv_path_NM,
391 ac_cv_path_NM="$NM" # Let the user override the test with a path.
394 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
395 for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
396 test -z "$ac_dir" && ac_dir=.
397 if test -f $ac_dir/nm; then
398 # Check to see if the nm accepts a BSD-compat flag.
399 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
400 # nm: unknown option "B" ignored
401 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
402 ac_cv_path_NM="$ac_dir/nm -B"
403 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
404 ac_cv_path_NM="$ac_dir/nm -p"
406 ac_cv_path_NM="$ac_dir/nm"
412 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
420 # Like AC_CONFIG_HEADER, but automatically create stamp file.
422 AC_DEFUN(AM_CONFIG_HEADER,
424 AC_CONFIG_HEADER([$1])
425 dnl When config.status generates a header, we must update the stamp-h file.
426 dnl This file resides in the same directory as the config header
427 dnl that is generated. We must strip everything past the first ":",
428 dnl and everything past the last "/".
429 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
430 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
431 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
433 for am_file in <<$1>>; do
434 case " <<$>>CONFIG_HEADERS " in
435 *" <<$>>am_file "*<<)>>
436 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
439 am_indx=`expr "<<$>>am_indx" + 1`
443 # Add --enable-maintainer-mode option to configure.
448 AC_DEFUN(AM_MAINTAINER_MODE,
449 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
450 dnl maintainer-mode is disabled by default
451 AC_ARG_ENABLE(maintainer-mode,
452 [ --enable-maintainer-mode enable make rules and dependencies not useful
453 (and sometimes confusing) to the casual installer],
454 USE_MAINTAINER_MODE=$enableval,
455 USE_MAINTAINER_MODE=no)
456 AC_MSG_RESULT($USE_MAINTAINER_MODE)
457 if test $USE_MAINTAINER_MODE = yes; then
466 # Check to see if we're running under Cygwin32, without using
467 # AC_CANONICAL_*. If so, set output variable CYGWIN32 to "yes".
468 # Otherwise set it to "no".
471 AC_DEFUN(AM_CYGWIN32,
472 [AC_CACHE_CHECK(for Cygwin32 environment, am_cv_cygwin32,
473 [AC_TRY_COMPILE(,[return __CYGWIN32__;],
474 am_cv_cygwin32=yes, am_cv_cygwin32=no)
477 test "$am_cv_cygwin32" = yes && CYGWIN32=yes])
479 # Check to see if we're running under Win32, without using
480 # AC_CANONICAL_*. If so, set output variable EXEEXT to ".exe".
481 # Otherwise set it to "".
484 dnl This knows we add .exe if we're building in the Cygwin32
485 dnl environment. But if we're not, then it compiles a test program
486 dnl to see if there is a suffix for executables.
488 [AC_REQUIRE([AM_CYGWIN32])
489 AC_REQUIRE([AM_MINGW32])
490 AC_MSG_CHECKING([for executable suffix])
491 AC_CACHE_VAL(am_cv_exeext,
492 [if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then
495 cat > am_c_test.c << 'EOF'
497 /* Nothing needed here */
500 ${CC-cc} -o am_c_test $CFLAGS $CPPFLAGS $LDFLAGS am_c_test.c $LIBS 1>&5
501 am_cv_exeext=`echo am_c_test.* | grep -v am_c_test.c | sed -e s/am_c_test//`
503 test x"${am_cv_exeext}" = x && am_cv_exeext=no
506 test x"${am_cv_exeext}" != xno && EXEEXT=${am_cv_exeext}
507 AC_MSG_RESULT(${am_cv_exeext})
510 # Check to see if we're running under Mingw, without using
511 # AC_CANONICAL_*. If so, set output variable MINGW32 to "yes".
512 # Otherwise set it to "no".
516 [AC_CACHE_CHECK(for Mingw32 environment, am_cv_mingw32,
517 [AC_TRY_COMPILE(,[return __MINGW32__;],
518 am_cv_mingw32=yes, am_cv_mingw32=no)
521 test "$am_cv_mingw32" = yes && MINGW32=yes])