diff options
author | Ian Lance Taylor <ian@airs.com> | 1998-02-05 00:16:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1998-02-05 00:16:01 +0000 |
commit | 9a8379033e492bbf52f6d10add7d17763bf89145 (patch) | |
tree | 7c63ad5a1ae2d6c661c143d0a645ff1c89cbc299 /bfd | |
parent | 9322566035aaff7c3d9f928d1db1007a739aa8bb (diff) | |
download | binutils-9a8379033e492bbf52f6d10add7d17763bf89145.zip binutils-9a8379033e492bbf52f6d10add7d17763bf89145.tar.gz binutils-9a8379033e492bbf52f6d10add7d17763bf89145.tar.bz2 |
* configure.in: Set libtool_enable_shared rather than
libtool_shared. Remove diversion hack.
* configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
with new libtool.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 7 | ||||
-rw-r--r-- | bfd/aclocal.m4 | 129 | ||||
-rwxr-xr-x | bfd/configure | 317 | ||||
-rw-r--r-- | bfd/configure.in | 11 |
4 files changed, 307 insertions, 157 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 47d7f11..d26da93 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,10 @@ +Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com> + + * configure.in: Set libtool_enable_shared rather than + libtool_shared. Remove diversion hack. + * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild + with new libtool. + Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org> * syms.c (struct stab_cache): Define. diff --git a/bfd/aclocal.m4 b/bfd/aclocal.m4 index e37e2ad..0a66076 100644 --- a/bfd/aclocal.m4 +++ b/bfd/aclocal.m4 @@ -5,7 +5,7 @@ AC_DEFUN(BFD_BINARY_FOPEN, [AC_REQUIRE([AC_CANONICAL_SYSTEM]) case "${host}" in changequote(,)dnl -i[345]86-*-msdos* | i[345]86-*-go32* | *-*-cygwin32 | *-*-windows) +i[345]86-*-msdos* | i[345]86-*-go32* | i[345]86-*-mingw32* | *-*-cygwin32* | *-*-windows) changequote([,])dnl AC_DEFINE(USE_BINARY_FOPEN) ;; esac])dnl @@ -159,12 +159,13 @@ fi AC_SUBST($1)]) -# serial 9 AM_PROG_LIBTOOL +# serial 18 AM_PROG_LIBTOOL AC_DEFUN(AM_PROG_LIBTOOL, [AC_REQUIRE([AC_CANONICAL_HOST]) -AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_PROG_RANLIB]) +AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AM_PROG_LD]) +AC_REQUIRE([AM_PROG_NM]) AC_REQUIRE([AC_PROG_LN_S]) # Always use our own libtool. @@ -177,14 +178,15 @@ AC_ARG_ENABLE(shared, [ --enable-shared build shared libraries [default=yes]], [p=${PACKAGE-bogus-package-name} case "$enableval" in - yes) enable_shared=yes ;; - no) enable_shared=no ;; + yes) libtool_enable_shared=yes ;; + no) libtool_enable_shared=no ;; # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE. # If it didn't, it'll be `bogus-package-name', thus making this condition # not be used. - *$p*) enable_shared=yes ;; - *) shared=no ;; + *$p*) libtool_enable_shared=yes ;; + *) libtool_enable_shared=no ;; esac]) +test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared" libtool_shared= test "$enable_shared" = no && libtool_shared=" --disable-shared" dnl END CYGNUS LOCAL @@ -193,10 +195,11 @@ dnl Allow the --disable-static flag to stop us from building static libs. AC_ARG_ENABLE(static, [ --enable-static build static libraries [default=yes]], [if test "$enableval" = no; then - enable_static=no + libtool_enable_static=no else - enable_static=yes + libtool_enable_static=yes fi]) +test -n "$libtool_enable_static" && enable_static="$libtool_enable_static" libtool_static= test "$enable_static" = no && libtool_static=" --disable-static" @@ -210,12 +213,28 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" [case "$host" in *-*-irix6*) ac_save_CFLAGS="$CFLAGS" - # -n32 always needs to be added to the linker when using GCC. - test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32" - for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do - if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then - LD="${LD-ld} $f" - fi + flag_passed=no + for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do + case "$f" in + ABI) + test -n "$SGI_ABI" && flag_passed=yes + if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then + # Choose the ABI flag according to GCC's specs. + if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then + LD="${LD-ld} -32" + else + LD="${LD-ld} -n32" + fi + fi + ;; + + *) + if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then + flag_passed=yes + LD="${LD-ld} $f" + fi + ;; + esac done CFLAGS="$ac_save_CFLAGS" ;; @@ -228,7 +247,7 @@ esac] # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \ +LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || AC_MSG_ERROR([libtool configure failed]) @@ -239,35 +258,52 @@ AC_DEFUN(AM_PROG_LD, [AC_ARG_WITH(gnu-ld, [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) -if test "$with_gnu_ld" = yes; then +AC_REQUIRE([AC_PROG_CC]) +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(ac_cv_path_LD, -[case "$LD" in - "") +[if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/ld"; then - ac_cv_path_LD="$ac_dir/ld" + if test -f "$ac_dir/$ac_prog"; then + ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then - test "$with_gnu_ld" = yes && break + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" - ;; - *) +else ac_cv_path_LD="$LD" # Let the user override the test with a path. - ;; -esac]) +fi]) LD="$ac_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) @@ -280,15 +316,50 @@ AM_PROG_LD_GNU ]) AC_DEFUN(AM_PROG_LD_GNU, -[AC_CACHE_CHECK([whether we are using GNU ld], ac_cv_prog_gnu_ld, +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no fi]) ]) +# AM_PROG_NM - find the path to a BSD-compatible name lister +AC_DEFUN(AM_PROG_NM, +[AC_MSG_CHECKING([for BSD-compatible nm]) +AC_CACHE_VAL(ac_cv_path_NM, +[case "$NM" in +/*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; +*) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1!d' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + else + ac_cv_path_NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + ;; +esac]) +NM="$ac_cv_path_NM" +AC_MSG_RESULT([$NM]) +AC_SUBST(NM) +]) + # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, diff --git a/bfd/configure b/bfd/configure index 4df8f36..a129d2c 100755 --- a/bfd/configure +++ b/bfd/configure @@ -29,8 +29,6 @@ ac_help="$ac_help --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer" -enable_shared=no - # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. @@ -586,7 +584,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:590: checking host system type" >&5 +echo "configure:588: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -607,7 +605,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:611: checking target system type" >&5 +echo "configure:609: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -625,7 +623,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:629: checking build system type" >&5 +echo "configure:627: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -650,7 +648,7 @@ test "$host_alias" != "$target_alias" && # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:654: checking for $ac_word" >&5 +echo "configure:652: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -679,7 +677,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:683: checking for $ac_word" >&5 +echo "configure:681: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -727,7 +725,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:731: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -737,11 +735,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 741 "configure" +#line 739 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -761,12 +759,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:765: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:763: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:770: checking whether we are using GNU C" >&5 +echo "configure:768: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -775,7 +773,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -790,7 +788,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:794: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:792: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -818,7 +816,7 @@ else fi echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 -echo "configure:822: checking for POSIXized ISC" >&5 +echo "configure:820: checking for POSIXized ISC" >&5 if test -d /etc/conf/kconfig.d && grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 then @@ -851,7 +849,7 @@ fi # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:855: checking for a BSD compatible install" >&5 +echo "configure:853: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -921,7 +919,7 @@ cat >> confdefs.h <<EOF EOF echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:925: checking whether build environment is sane" >&5 +echo "configure:923: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -968,7 +966,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:972: checking for working aclocal" >&5 +echo "configure:970: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -981,7 +979,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:985: checking for working autoconf" >&5 +echo "configure:983: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -994,7 +992,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:998: checking for working automake" >&5 +echo "configure:996: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1007,7 +1005,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:1011: checking for working autoheader" >&5 +echo "configure:1009: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1020,7 +1018,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:1024: checking for working makeinfo" >&5 +echo "configure:1022: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -1033,7 +1031,7 @@ else fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:1037: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:1035: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1069,7 +1067,7 @@ fi # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1073: checking for $ac_word" >&5 +echo "configure:1071: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1100,7 +1098,7 @@ fi # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1104: checking for $ac_word" >&5 +echo "configure:1102: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1131,7 +1129,7 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1135: checking for $ac_word" >&5 +echo "configure:1133: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1163,6 +1161,8 @@ fi fi +libtool_enable_shared=no + # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 @@ -1200,39 +1200,57 @@ else with_gnu_ld=no fi -if test "$with_gnu_ld" = yes; then + +ac_prog=ld +if test "$ac_cv_prog_gcc" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 +echo "configure:1209: checking for ld used by GCC" >&5 + ac_prog=`($CC -print-prog-name=ld) 2>&5` + case "$ac_prog" in + # Accept absolute paths. + /*) + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1206: checking for GNU ld" >&5 +echo "configure:1227: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1209: checking for non-GNU ld" >&5 +echo "configure:1230: checking for non-GNU ld" >&5 fi if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - case "$LD" in - "") + if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/ld"; then - ac_cv_path_LD="$ac_dir/ld" + if test -f "$ac_dir/$ac_prog"; then + ac_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. - if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then - test "$with_gnu_ld" = yes && break + if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break else test "$with_gnu_ld" != yes && break fi fi done IFS="$ac_save_ifs" - ;; - *) +else ac_cv_path_LD="$LD" # Let the user override the test with a path. - ;; -esac +fi fi LD="$ac_cv_path_LD" @@ -1243,13 +1261,13 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } -echo $ac_n "checking whether we are using GNU ld""... $ac_c" 1>&6 -echo "configure:1248: checking whether we are using GNU ld" >&5 +echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 +echo "configure:1266: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. -if $LD -v 2>&1 </dev/null | egrep '(GNU ld|with BFD)' > /dev/null; then +if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then ac_cv_prog_gnu_ld=yes else ac_cv_prog_gnu_ld=no @@ -1259,8 +1277,45 @@ fi echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 +echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 +echo "configure:1282: checking for BSD-compatible nm" >&5 +if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$NM" in +/*) + ac_cv_path_NM="$NM" # Let the user override the test with a path. + ;; +*) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do + test -z "$ac_dir" && dir=. + if test -f $ac_dir/nm; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1!d' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + if ($ac_dir/nm -B /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -B" + elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1!d'; exit 0) | egrep /dev/null >/dev/null; then + ac_cv_path_NM="$ac_dir/nm -p" + else + ac_cv_path_NM="$ac_dir/nm" + fi + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm + ;; +esac +fi + +NM="$ac_cv_path_NM" +echo "$ac_t""$NM" 1>&6 + + echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1264: checking whether ln -s works" >&5 +echo "configure:1319: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1286,6 +1341,7 @@ fi + # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' @@ -1295,16 +1351,17 @@ if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-bogus-package-name} case "$enableval" in - yes) enable_shared=yes ;; - no) enable_shared=no ;; + yes) libtool_enable_shared=yes ;; + no) libtool_enable_shared=no ;; # The value of $p (aka $PACKAGE) is assumed to come from AM_INIT_AUTOMAKE. # If it didn't, it'll be `bogus-package-name', thus making this condition # not be used. - *$p*) enable_shared=yes ;; - *) shared=no ;; + *$p*) libtool_enable_shared=yes ;; + *) libtool_enable_shared=no ;; esac fi +test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared" libtool_shared= test "$enable_shared" = no && libtool_shared=" --disable-shared" @@ -1312,12 +1369,13 @@ test "$enable_shared" = no && libtool_shared=" --disable-shared" if test "${enable_static+set}" = set; then enableval="$enable_static" if test "$enableval" = no; then - enable_static=no + libtool_enable_static=no else - enable_static=yes + libtool_enable_static=yes fi fi +test -n "$libtool_enable_static" && enable_static="$libtool_enable_static" libtool_static= test "$enable_static" = no && libtool_static=" --disable-static" @@ -1331,12 +1389,28 @@ test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" case "$host" in *-*-irix6*) ac_save_CFLAGS="$CFLAGS" - # -n32 always needs to be added to the linker when using GCC. - test "$ac_cv_prog_gcc" = yes && CFLAGS="$CFLAGS -n32" - for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do - if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then - LD="${LD-ld} $f" - fi + flag_passed=no + for f in -32 -64 -n32 ABI -cckr -mips1 -mips2 -mips3 -mips4; do + case "$f" in + ABI) + test -n "$SGI_ABI" && flag_passed=yes + if test "$flag_passed" = no && test "$ac_cv_prog_gcc" = yes; then + # Choose the ABI flag according to GCC's specs. + if $CC -dumpspecs 2>&1 | sed '/^\*link:$/,/^$/!d' | egrep -e '[ ]-32' >/dev/null; then + LD="${LD-ld} -32" + else + LD="${LD-ld} -n32" + fi + fi + ;; + + *) + if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then + flag_passed=yes + LD="${LD-ld} $f" + fi + ;; + esac done CFLAGS="$ac_save_CFLAGS" ;; @@ -1349,7 +1423,7 @@ esac # Actually configure libtool. ac_aux_dir is where install-sh is found. CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \ -LD="$LD" RANLIB="$RANLIB" LN_S="$LN_S" \ +LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \ ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig \ $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \ || { echo "configure: error: libtool configure failed" 1>&2; exit 1; } @@ -1425,7 +1499,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:1429: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:1503: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" @@ -1443,19 +1517,19 @@ fi echo $ac_n "checking for Cygwin32 environment""... $ac_c" 1>&6 -echo "configure:1447: checking for Cygwin32 environment" >&5 +echo "configure:1521: checking for Cygwin32 environment" >&5 if eval "test \"`echo '$''{'am_cv_cygwin32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1452 "configure" +#line 1526 "configure" #include "confdefs.h" int main() { return __CYGWIN32__; ; return 0; } EOF -if { (eval echo configure:1459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_cygwin32=yes else @@ -1472,19 +1546,19 @@ echo "$ac_t""$am_cv_cygwin32" 1>&6 CYGWIN32= test "$am_cv_cygwin32" = yes && CYGWIN32=yes echo $ac_n "checking for Mingw32 environment""... $ac_c" 1>&6 -echo "configure:1476: checking for Mingw32 environment" >&5 +echo "configure:1550: checking for Mingw32 environment" >&5 if eval "test \"`echo '$''{'am_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1481 "configure" +#line 1555 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:1488: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_mingw32=yes else @@ -1503,7 +1577,7 @@ test "$am_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:1507: checking for executable suffix" >&5 +echo "configure:1581: checking for executable suffix" >&5 if eval "test \"`echo '$''{'am_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1536,7 +1610,7 @@ target64=false # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1540: checking for $ac_word" >&5 +echo "configure:1614: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1565,7 +1639,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1569: checking for $ac_word" >&5 +echo "configure:1643: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1613,7 +1687,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1617: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1623,11 +1697,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <<EOF -#line 1627 "configure" +#line 1701 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1647,12 +1721,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1651: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1656: checking whether we are using GNU C" >&5 +echo "configure:1730: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1661,7 +1735,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1676,7 +1750,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1680: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1754: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1742,7 +1816,7 @@ if test "x$cross_compiling" = "xno"; then EXEEXT_FOR_BUILD='$(EXEEXT)' else echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6 -echo "configure:1746: checking for build system executable suffix" >&5 +echo "configure:1820: checking for build system executable suffix" >&5 if eval "test \"`echo '$''{'bfd_cv_build_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1764,7 +1838,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1768: checking how to run the C preprocessor" >&5 +echo "configure:1842: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1779,13 +1853,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 1783 "configure" +#line 1857 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1796,13 +1870,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 1800 "configure" +#line 1874 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1806: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1828,17 +1902,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1832: checking for $ac_hdr" >&5 +echo "configure:1906: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1837 "configure" +#line 1911 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1842: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1868,17 +1942,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1872: checking for $ac_hdr" >&5 +echo "configure:1946: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1877 "configure" +#line 1951 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1905,12 +1979,12 @@ fi done echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:1909: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:1983: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1914 "configure" +#line 1988 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -1919,7 +1993,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:1923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -1942,12 +2016,12 @@ fi for ac_func in fcntl getpagesize setitimer sysconf fdopen do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1946: checking for $ac_func" >&5 +echo "configure:2020: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1951 "configure" +#line 2025 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1970,7 +2044,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2005,12 +2079,12 @@ EOF esac echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6 -echo "configure:2009: checking whether strstr must be declared" >&5 +echo "configure:2083: checking whether strstr must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_strstr'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2014 "configure" +#line 2088 "configure" #include "confdefs.h" #include <stdio.h> @@ -2031,7 +2105,7 @@ int main() { char *(*pfn) = (char *(*)) strstr ; return 0; } EOF -if { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_strstr=no else @@ -2053,12 +2127,12 @@ EOF fi echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6 -echo "configure:2057: checking whether malloc must be declared" >&5 +echo "configure:2131: checking whether malloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_malloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2062 "configure" +#line 2136 "configure" #include "confdefs.h" #include <stdio.h> @@ -2079,7 +2153,7 @@ int main() { char *(*pfn) = (char *(*)) malloc ; return 0; } EOF -if { (eval echo configure:2083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_malloc=no else @@ -2101,12 +2175,12 @@ EOF fi echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6 -echo "configure:2105: checking whether realloc must be declared" >&5 +echo "configure:2179: checking whether realloc must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_realloc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2110 "configure" +#line 2184 "configure" #include "confdefs.h" #include <stdio.h> @@ -2127,7 +2201,7 @@ int main() { char *(*pfn) = (char *(*)) realloc ; return 0; } EOF -if { (eval echo configure:2131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_realloc=no else @@ -2149,12 +2223,12 @@ EOF fi echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6 -echo "configure:2153: checking whether free must be declared" >&5 +echo "configure:2227: checking whether free must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_free'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2158 "configure" +#line 2232 "configure" #include "confdefs.h" #include <stdio.h> @@ -2175,7 +2249,7 @@ int main() { char *(*pfn) = (char *(*)) free ; return 0; } EOF -if { (eval echo configure:2179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_free=no else @@ -2197,12 +2271,12 @@ EOF fi echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6 -echo "configure:2201: checking whether getenv must be declared" >&5 +echo "configure:2275: checking whether getenv must be declared" >&5 if eval "test \"`echo '$''{'bfd_cv_decl_needed_getenv'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2206 "configure" +#line 2280 "configure" #include "confdefs.h" #include <stdio.h> @@ -2223,7 +2297,7 @@ int main() { char *(*pfn) = (char *(*)) getenv ; return 0; } EOF -if { (eval echo configure:2227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_decl_needed_getenv=no else @@ -2502,19 +2576,19 @@ EOF # Define HAVE_SYS_PROCFS_H if the file exists and defines # prstatus_t. echo $ac_n "checking for sys/procfs.h""... $ac_c" 1>&6 -echo "configure:2506: checking for sys/procfs.h" >&5 +echo "configure:2580: checking for sys/procfs.h" >&5 if eval "test \"`echo '$''{'bfd_cv_header_sys_procfs_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2511 "configure" +#line 2585 "configure" #include "confdefs.h" #include <sys/procfs.h> int main() { prstatus_t t; ; return 0; } EOF -if { (eval echo configure:2518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2592: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* bfd_cv_header_sys_procfs_h=yes else @@ -2835,17 +2909,17 @@ for ac_hdr in unistd.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2839: checking for $ac_hdr" >&5 +echo "configure:2913: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2844 "configure" +#line 2918 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2874,12 +2948,12 @@ done for ac_func in getpagesize do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2878: checking for $ac_func" >&5 +echo "configure:2952: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2883 "configure" +#line 2957 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -2902,7 +2976,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:2906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2927,7 +3001,7 @@ fi done echo $ac_n "checking for working mmap""... $ac_c" 1>&6 -echo "configure:2931: checking for working mmap" >&5 +echo "configure:3005: checking for working mmap" >&5 if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2935,7 +3009,7 @@ else ac_cv_func_mmap_fixed_mapped=no else cat > conftest.$ac_ext <<EOF -#line 2939 "configure" +#line 3013 "configure" #include "confdefs.h" /* Thanks to Mike Haertel and Jim Avera for this test. @@ -3075,7 +3149,7 @@ main() } EOF -if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_mmap_fixed_mapped=yes else @@ -3100,12 +3174,12 @@ fi for ac_func in madvise mprotect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3104: checking for $ac_func" >&5 +echo "configure:3178: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3109 "configure" +#line 3183 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3128,7 +3202,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3322,6 +3396,7 @@ s%@SET_MAKE@%$SET_MAKE%g s%@AR@%$AR%g s%@RANLIB@%$RANLIB%g s%@LD@%$LD%g +s%@NM@%$NM%g s%@LN_S@%$LN_S%g s%@LIBTOOL@%$LIBTOOL%g s%@MAINT@%$MAINT%g diff --git a/bfd/configure.in b/bfd/configure.in index 7093006..85fd54e 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -1,13 +1,6 @@ dnl Process this file with autoconf to produce a configure script. dnl -dnl Default to a non shared library. This may be overridden by the -dnl configure option --enable-shared. The divert stuff is a hack -dnl to set the variable before argument parsing is done. -divert(AC_DIVERSION_INIT) -enable_shared=no -divert(-1) - AC_PREREQ(2.5) AC_INIT(libbfd.c) @@ -21,6 +14,10 @@ dnl to call AC_CHECK_PROG. AC_CHECK_TOOL(AR, ar) AC_CHECK_TOOL(RANLIB, ranlib, :) +dnl Default to a non shared library. This may be overridden by the +dnl configure option --enable-shared. +libtool_enable_shared=no + AM_PROG_LIBTOOL AC_ARG_ENABLE(64-bit-bfd, |