]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtool.m4, ltconfig.in: Merged in changes from most recent HEAD
authorOssama Othman <ossama@debian.org>
Sat, 26 Feb 2000 00:04:12 +0000 (00:04 +0000)
committerOssama Othman <ossama@debian.org>
Sat, 26 Feb 2000 00:04:12 +0000 (00:04 +0000)
branch version.
* ltmain.in: Merged in changes from most recent HEAD branch
version (ILD updates), and fixed parallel build error.
* tagdemo/acinclude.m4, tagdemo/aclocal.m4, tagdemo/configure:
regenerated these files against updated libtool.m4.

ChangeLog
libtool.m4
ltconfig.in
ltmain.in
tagdemo/acinclude.m4
tagdemo/aclocal.m4
tagdemo/configure

index 0acb424efcf3a1e402a4bc65a0373638e130d6c6..67541c07904b93a5438c4c1ec2bd34bb7c79fadd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-02-25  Ossama Othman  <ossama@debian.org>
+
+       * libtool.m4, ltconfig.in: Merged in changes from most recent HEAD
+       branch version.
+       * ltmain.in: Merged in changes from most recent HEAD branch
+       version (ILD updates), and fixed parallel build error.
+       * tagdemo/acinclude.m4, tagdemo/aclocal.m4, tagdemo/configure:
+       regenerated these files against updated libtool.m4.
+
 2000-02-22  Ossama Othman  <ossama@debian.org>
 
        * libtool.m4 (AC_LIBTOOL_CXX): Added missing "$lt_target" command
index 59864b2de7d119879dd39a0aa1822eee4572036c..6e069451a5b2042b6a5d612417d2415eb1a5b0aa 100644 (file)
@@ -30,7 +30,7 @@ AC_CACHE_SAVE
 
 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -75,8 +75,8 @@ dnl
 # Only perform the check for file, if the check method requires it
 case "$deplibs_check_method" in
 file_magic*)
-  if test "$file_magic_cmd" = '$FILE'; then
-    AC_PATH_FILE
+  if test "$file_magic_cmd" = '${MAGIC}'; then
+    AC_PATH_MAGIC
   fi
   ;;
 esac
@@ -138,7 +138,10 @@ case "$lt_target" in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+    [AC_LANG_SAVE
+     AC_LANG_C
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_RESTORE])
   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS="$SAVE_CFLAGS"
@@ -288,16 +291,16 @@ AC_ENABLE_FAST_INSTALL(no)])
 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 AC_DEFUN(AC_PATH_TOOL_PREFIX,
 [AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_FILE,
-[case "$FILE" in
+AC_CACHE_VAL(lt_cv_path_MAGIC,
+[case "$MAGIC" in
   /*)
-  lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
   ;;
   ?:/*)
-  ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
+  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
   ;;
   *)
-  ac_save_file="$FILE"
+  ac_save_MAGIC="$MAGIC"
   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
@@ -306,12 +309,12 @@ dnl not every word.  This closes a longstanding sh security hole.
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$1; then
-      lt_cv_path_FILE="$ac_dir/$1"
+      lt_cv_path_MAGIC="$ac_dir/$1"
       if test -n "$file_magic_test_file"; then
        case "$deplibs_check_method" in
        "file_magic "*)
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-         FILE="$lt_cv_path_FILE"
+         MAGIC="$lt_cv_path_MAGIC"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            egrep "$file_magic_regex" > /dev/null; then
            :
@@ -335,27 +338,27 @@ EOF
     fi
   done
   IFS="$ac_save_ifs"
-  FILE="$ac_save_file"
+  MAGIC="$ac_save_MAGIC"
   ;;
 esac])
-FILE="$lt_cv_path_FILE"
-if test -n "$FILE"; then
-  AC_MSG_RESULT($FILE)
+MAGIC="$lt_cv_path_MAGIC"
+if test -n "$MAGIC"; then
+  AC_MSG_RESULT($MAGIC)
 else
   AC_MSG_RESULT(no)
 fi
 ])
 
 
-# AC_PATH_FILE - find a file program which can recognise a shared library
-AC_DEFUN(AC_PATH_FILE,
+# AC_PATH_MAGIC - find a file program which can recognise a shared library
+AC_DEFUN(AC_PATH_MAGIC,
 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_FILE"; then
+if test -z "$lt_cv_path_MAGIC"; then
   if test -n "$ac_tool_prefix"; then
     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
   else
-    FILE=:
+    MAGIC=:
   fi
 fi
 ])
@@ -463,7 +466,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
 [AC_CACHE_CHECK([how to recognise dependant libraries],
 lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$FILE'
+[lt_cv_file_magic_cmd='${MAGIC}'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
@@ -483,7 +486,9 @@ aix4* | beos*)
   ;;
 
 bsdi4*)
+  changequote(,)dnl
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  changequote([, ])dnl
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -518,7 +523,9 @@ irix5* | irix6*)
     *) libmagic=never-match;;
     esac
     # this will be overridden with pass_all, but let us keep it just in case
+    changequote(,)dnl
     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    changequote([, ])dnl
     ;;
   esac
   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
@@ -528,11 +535,13 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux-gnu*)
   case "$host_cpu" in
-  alpha* | i*86 | sparc* )
+  alpha* | i*86 | powerpc* | sparc* )
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+    changequote([, ])dnl
   esac
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
@@ -559,7 +568,9 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     lt_cv_deplibs_check_method=pass_all
     ;;
   motorola)
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    changequote([, ])dnl
     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     ;;
   esac
@@ -662,7 +673,7 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   if test x"$enable_ltdl_install" = x"yes"; then
     ac_configure_args="$ac_configure_args --enable-ltdl-install"
     LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
-    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+    INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
   else
     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
     LIBLTDL="-lltdl"
@@ -680,7 +691,7 @@ lt_save_CFLAGS="$CFLAGS"
 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
 dnl is set to the C++ compiler.
 AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
index c9ff43935e5de120b8bec8c4892f713ed2a7a9b9..133d10a6325ee15269da4108e545ba8c289669cd 100755 (executable)
@@ -215,7 +215,6 @@ need_locks=yes
 ac_ext=c
 libext=a
 cache_file=
-ld_shlibs=yes
 
 ## Dependencies to place before and after the object being linked:
 predep_objects=
@@ -270,15 +269,22 @@ old_CC="$CC"
 old_CFLAGS="$CFLAGS"
 old_CPPFLAGS="$CPPFLAGS"
 old_LDFLAGS="$LDFLAGS"
+old_LIBS="$LIBS"
+old_MAGIC="$MAGIC"
 old_LD="$LD"
 old_LN_S="$LN_S"
-old_LIBS="$LIBS"
 old_LTCC="$LTCC"
 old_NM="$NM"
 old_RANLIB="$RANLIB"
+old_STRIP="$STRIP"
+old_AS="$AS"
 old_DLLTOOL="$DLLTOOL"
 old_OBJDUMP="$OBJDUMP"
-old_AS="$AS"
+old_OBJEXT="$OBJEXT"
+old_EXEEXT="$EXEEXT"
+old_reload_flag="$reload_flag"
+old_deplibs_check_method="$deplibs_check_method"
+old_file_magic_cmd="$file_magic_cmd"
 
 # Parse the command line options.
 args=
@@ -625,7 +631,7 @@ test -z "$AR" && AR=ar
 test -z "$AS" && AS=as
 test -z "$CC" && CC=cc
 test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$FILE" && FILE=file
+test -z "$MAGIC" && MAGIC=file
 test -z "$LD" && LD=ld
 test -z "$LN_S" && LN_S="ln -s"
 test -z "$NM" && NM=nm
@@ -1906,9 +1912,12 @@ LTCONFIG_VERSION="$VERSION"
 case "$ltmain" in
 *.sh)
   # Now quote all the things that may contain metacharacters.
-  for var in ltecho old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS \
+  for var in ltecho old_AR old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
+    old_MAGIC old_LD old_LDFLAGS old_LIBS \
+    old_LN_S old_NM old_RANLIB old_STRIP \
+    old_AS old_DLLTOOL old_OBJDUMP \
+    old_OBJEXT old_EXEEXT old_reload_flag \
+    old_deplibs_check_method old_file_magic_cmd \
     AR CC LTCC LD LN_S NM LTSHELL LTCONFIG_VERSION \
     reload_flag reload_cmds wl \
     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
@@ -2001,9 +2010,12 @@ EOF
 
 *)
   # Double-quote the variables that need it (for aesthetics).
-  for var in old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
-    old_LD old_LDFLAGS old_LIBS \
-    old_NM old_RANLIB old_LN_S old_DLLTOOL old_OBJDUMP old_AS; do
+  for var in old_AR old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
+    old_MAGIC old_LD old_LDFLAGS old_LIBS \
+    old_LN_S old_NM old_RANLIB old_STRIP \
+    old_AS old_DLLTOOL old_OBJDUMP \
+    old_OBJEXT old_EXEEXT old_reload_flag \
+    old_deplibs_check_method old_file_magic_cmd; do
     eval "$var=\\\"\$var\\\""
   done
 
@@ -2029,10 +2041,14 @@ esac
 cat <<EOF >> "$cfgfile"
 # Libtool was configured as follows, on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 #
-# LTCC=$old_LTCC CC=$old_CC CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
-# LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
-# NM=$old_NM RANLIB=$old_RANLIB LN_S=$old_LN_S \\
-# DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP AS=$old_AS \\
+# AR=$old_AR LTCC=$old_LTCC CC=$old_CC \\
+# CFLAGS=$old_CFLAGS CPPFLAGS=$old_CPPFLAGS \\
+# MAGIC=$old_MAGIC LD=$old_LD LDFLAGS=$old_LDFLAGS LIBS=$old_LIBS \\
+# LN_S=$old_LN_S NM=$old_NM RANLIB=$old_RANLIB STRIP=$old_STRIP \\
+# AS=$old_AS DLLTOOL=$old_DLLTOOL OBJDUMP=$old_OBJDUMP \\
+# objext=$old_OBJEXT exeext=$old_EXEEXT reload_flag=$old_reload_flag \\
+# deplibs_check_method=$old_deplibs_check_method \\
+# file_magic_cmd=$old_file_magic_cmd \\
 #   $0$ltconfig_args
 #
 # Compiler and other test output produced by $progname, useful for
@@ -2078,6 +2094,12 @@ LN_S=$LN_S
 # A BSD-compatible nm program.
 NM=$NM
 
+# A symbol stripping program
+STRIP=$STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC=$MAGIC
+
 # Used on cygwin: DLL creation program.
 DLLTOOL="$DLLTOOL"
 
index 44e263cea5c28695474833b58517cd2d76b27484..2cc3a4665d5c23221518fd673240680eec2d00d1 100644 (file)
--- a/ltmain.in
+++ b/ltmain.in
@@ -581,7 +581,7 @@ EOF
        $show "$mkdir $objdir"
        $run $mkdir $objdir
        status=$?
-       if test $status -ne 0 && test ! -d $dir; then
+       if test $status -ne 0 && test ! -d $objdir; then
          exit $status
         fi
       fi 
@@ -879,6 +879,7 @@ EOF
              dlprefiles="$dlprefiles $arg"
            fi
            prev=
+           continue
            ;;
          esac
          ;;
@@ -1421,10 +1422,19 @@ EOF
       linkmode=prog ;;
     esac
 
+    specialdeplibs=
+    libs=
+    # Find all interdependent deplibs that
+    # are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      case "$libs " in
+      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+      esac
+      libs="$libs $deplib"
+    done
+
     if test $linkmode = lib; then
-      libs="$predeps $deplibs $postdeps"
-    else
-      libs="$deplibs"
+      libs="$predeps $libs $postdeps"
     fi
 
     deplibs=
@@ -1446,6 +1456,8 @@ EOF
        done
        ;;
     prog)
+       compile_deplibs=
+       finalize_deplibs=
        alldeplibs=no
        newdlfiles=
        newdlprefiles=
@@ -1463,7 +1475,11 @@ EOF
        link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
        esac
       fi
-
+      if test $pass = dlopen; then
+       # Collect dlpreopened libraries
+       save_deplibs="$deplibs"
+       deplibs=
+      fi
       for deplib in $libs; do
        lib=
        found=no
@@ -1484,11 +1500,11 @@ EOF
          done
          if test "$found" != yes; then
            if test "$linkmode,$pass" = "prog,link"; then
-             compile_command="$compile_command $deplib"
-             finalize_command="$finalize_command $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
            else
-             deplibs="$deplibs $deplib"
-             test $linkmode = lib && newdependency_libs="$newdependency_libs $deplib"
+             deplibs="$deplib $deplibs"
+             test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
            fi
            continue
          fi
@@ -1496,22 +1512,17 @@ EOF
        -L*)
          case $linkmode in
          lib)
-           case "$deplibs " in
-           *" $deplib "*) ;;
-           *)
-             deplibs="$deplibs $deplib"
-             newdependency_libs="$newdependency_libs $deplib"
-             new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-             ;;
-           esac
+           deplibs="$deplib $deplibs"
+           newdependency_libs="$deplib $newdependency_libs"
+           new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
            ;;
          prog)
            if test $pass = scan; then
-             deplibs="$deplibs $deplib"
+             deplibs="$deplib $deplibs"
              new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
            else
-             compile_command="$compile_command $deplib"
-             finalize_command="$finalize_command $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
            fi
            ;;
          *)
@@ -1545,22 +1556,35 @@ EOF
              echo
              echo "*** Warning: Linking the shared library $output against the"
              echo "*** static library $deplib is not portable!"
-             deplibs="$deplibs $deplib"
+             deplibs="$deplib $deplibs"
            fi
            continue
            ;;
          prog)
-           if test $pass = scan; then
-             deplibs="$deplibs $deplib"
+           if test $pass != link; then
+             deplibs="$deplib $deplibs"
            else
-             compile_command="$compile_command $deplib"
-             finalize_command="$finalize_command $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
            fi
            continue
            ;;
          esac
          ;;
-       *.lo | *.$objext) continue ;;
+       *.lo | *.$objext)
+         if test $linkmode = prog; then
+           if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+             # If there is no dlopen support or we're linking statically,
+             # we need to preload.
+             newdlprefiles="$newdlprefiles $deplib"
+             compile_deplibs="$deplib $compile_deplibs"
+             finalize_deplibs="$deplib $finalize_deplibs"
+           else
+             newdlfiles="$newdlfiles $deplib"
+           fi
+         fi
+         continue
+         ;;
        %DEPLIBS%)
          alldeplibs=yes
          continue
@@ -1687,24 +1711,31 @@ EOF
 
        if test $linkmode = prog && test $pass != link; then
          new_lib_search_path="$new_lib_search_path $ladir"
-         deplibs="$deplibs $lib"
+         deplibs="$lib $deplibs"
 
          linkalldeplibs=no
          if test "$link_all_deplibs" != no || test "$fast_install" != no || \
             test "$build_libtool_libs" = no || test -z "$library_names"; then
            linkalldeplibs=yes
-         else
-           # Need to hardcode shared library paths
-           # or/and link against static libraries
-           newdependency_libs="$newdependency_libs $dependeny_libs"
          fi
 
+         tmp_libs=
          for deplib in $dependency_libs; do
            case "$deplib" in
            -L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
            esac
            # Need to link against all dependency_libs?
-           test $linkalldeplibs = yes && deplibs="$deplibs $deplib"
+           if test $linkalldeplibs = yes; then
+             deplibs="$deplib $deplibs"
+           else
+             # Need to hardcode shared library paths
+             # or/and link against static libraries
+             newdependency_libs="$deplib $newdependency_libs"
+           fi
+           case "$tmp_libs " in
+           *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+           esac
+           tmp_libs="$tmp_libs $deplib"
          done
          continue
        fi
@@ -1714,11 +1745,18 @@ EOF
          convenience="$convenience $dir/$old_library"
          old_convenience="$old_convenience $dir/$old_library"
          if test $linkmode = lib; then
-           deplibs="$deplibs $dir/$old_library"
-           newdependency_libs="$newdependency_libs $dependency_libs"
+           deplibs="$dir/$old_library $deplibs"
+           tmp_libs=
+           for deplib in $dependency_libs; do
+             newdependency_libs="$deplib $newdependency_libs"
+             case "$tmp_libs " in
+             *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+             esac
+             tmp_libs="$tmp_libs $deplib"
+           done
          elif test "$linkmode,$pass" = "prog,link"; then
-           compile_command="$compile_command $dir/$old_library"
-           finalize_command="$finalize_command $dir/$old_library"
+           compile_deplibs="$dir/$old_library $compile_deplibs"
+           finalize_deplibs="$dir/$old_library $finalize_deplibs"
          fi
          continue
        fi
@@ -1896,28 +1934,18 @@ EOF
              esac
            fi
            if test $linkmode = prog; then
-             if test -n "$add_dir"; then
-               case "$compile_command " in
-               *" $add_dir "*) ;;
-               *) compile_command="$compile_command $add_dir" ;;
-               esac
-             fi
-             test -n "$add" && compile_command="$compile_command $add"
+             test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+             test -n "$add" && compile_deplibs="$add $compile_deplibs"
            else
-             if test -n "$add_dir"; then
-               case "$deplibs " in
-               *" $add_dir "*) ;;
-               *) deplibs="$deplibs $add_dir" ;;
-               esac
-             fi
-             test -n "$add" && deplibs="$deplibs $add"
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add $deplibs"
              if test "$hardcode_direct" != yes && \
                 test "$hardcode_minus_L" != yes && \
                 test "$hardcode_shlibpath_var" = yes; then
-                 case ":$finalize_shlibpath:" in
-                 *":$libdir:"*) ;;
-                 *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-                 esac
+               case ":$finalize_shlibpath:" in
+               *":$libdir:"*) ;;
+               *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+               esac
              fi
            fi
          fi
@@ -1945,21 +1973,11 @@ EOF
            fi
 
            if test $linkmode = prog; then
-             if test -n "$add_dir"; then
-               case "$finalize_command " in
-               *" $add_dir "*) ;;
-               *) finalize_command="$finalize_command $add_dir" ;;
-               esac
-             fi
-             test -n "$add" && finalize_command="$finalize_command $add"
+             test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+             test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
            else
-             if test -n "$add_dir"; then
-               case "$deplibs " in
-               *" $add_dir "*) ;;
-               *) deplibs="$deplibs $add_dir" ;;
-               esac
-             fi
-             test -n "$add" && deplibs="$deplibs $add"
+             test -n "$add_dir" && deplibs="$add_dir $deplibs"
+             test -n "$add" && deplibs="$add deplibs"
            fi
          fi
        elif test $linkmode = prog; then
@@ -1968,19 +1986,11 @@ EOF
          # shared platforms.
          if test "$hardcode_direct" != unsupported; then
            test -n "$old_library" && linklib="$old_library"
-           compile_command="$compile_command $dir/$linklib"
-           finalize_command="$finalize_command $dir/$linklib"
+           compile_deplibs="$dir/$linklib $compile_deplibs"
+           finalize_deplibs="$dir/$linklib $finalize_deplibs"
          else
-           case "$compile_command " in
-           *" -L$dir "*) ;;
-           *) compile_command="$compile_command -L$dir";;
-           esac
-           compile_command="$compile_command -l$name"
-           case "$finalize_command " in
-           *" -L$dir "*) ;;
-           *) finalize_command="$finalize_command -L$dir";;
-           esac
-           finalize_command="$finalize_command -l$name"
+           compile_deplibs="-l$name -L$dir $compile_deplibs"
+           finalize_deplibs="-l$name -L$dir $finalize_deplibs"
          fi
        elif test "$build_libtool_libs" = yes; then
          # Not a shared library
@@ -1997,7 +2007,7 @@ EOF
          else
            convenience="$convenience $dir/$old_library"
            old_convenience="$old_convenience $dir/$old_library"
-           deplibs="$deplibs $dir/$old_library"
+           deplibs="$dir/$old_library $deplibs"
            link_static=yes
          fi
        fi
@@ -2023,9 +2033,16 @@ EOF
 
          new_lib_search_path="$new_lib_search_path $absdir"
          # Link against this library
-         test "$link_static" = no && newdependency_libs="$newdependency_libs $abs_ladir/$laname"
+         test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
          # ... and its dependency_libs
-         newdependency_libs="$newdependency_libs $dependency_libs"
+         tmp_libs=
+         for deplib in $dependency_libs; do
+           newdependency_libs="$deplib $newdependency_libs"
+           case "$tmp_libs " in
+           *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+           esac
+           tmp_libs="$tmp_libs $deplib"
+         done
 
          if test $link_all_deplibs != no; then
            # Add the search paths of all dependency libraries
@@ -2062,24 +2079,70 @@ EOF
                ;;
              *) continue ;;
              esac
-             case "$deplibs " in
+             case " $deplibs " in
              *" $path "*) ;;
-             *) deplibs="$path $deplibs" ;;
+             *) deplibs="$deplibs $path" ;;
              esac
            done
          fi
        fi
       done
       dependency_libs="$newdependency_libs"
-      # Make sure lib_search_path contains only unique directories.
-      lib_search_path=
-      for dir in $new_lib_search_path; do
-       case "$lib_search_path " in
-       *" $dir "*) ;;
-       *) lib_search_path="$lib_search_path $dir" ;;
-       esac
-      done
-      lib_search_path="$lib_search_path $sys_lib_search_path"
+      if test $pass = dlpreopen; then
+       # Link the dlpreopened libraries before other libraries
+       deplibs="$deplibs $save_deplibs"
+      elif test $pass != dlopen; then
+       # Make sure lib_search_path contains only unique directories.
+       lib_search_path=
+       for dir in $new_lib_search_path; do
+         case "$lib_search_path " in
+         *" $dir "*) ;;
+         *) lib_search_path="$lib_search_path $dir" ;;
+         esac
+       done
+       lib_search_path="$lib_search_path $sys_lib_search_path"
+
+       if test "$linkmode,$pass" != "prog,link"; then
+         vars="deplibs"
+       else
+         vars="compile_deplibs finalize_deplibs"
+       fi
+       for var in $vars dependency_libs; do
+         # Make sure that $var contains only unique libraries
+         # and add them in reverse order
+         eval tmp_libs=\"\$$var\"
+         new_libs=
+         for deplib in $tmp_libs; do
+           case "$deplib" in
+           -L*) new_libs="$deplib $new_libs" ;;
+           *)
+             case " $specialdeplibs " in
+             *" $deplib "*) new_libs="$deplib $new_libs" ;;
+             *)
+               case " $new_libs " in
+               *" $deplib "*) ;;
+               *) new_libs="$deplib $new_libs" ;;
+               esac
+               ;;
+             esac
+             ;;
+           esac
+         done
+         tmp_libs=
+         for deplib in $new_libs; do
+           case "$deplib" in
+           -L*)
+             case " $tmp_libs " in
+             *" $deplib "*) ;;
+             *) tmp_libs="$tmp_libs $deplib" ;;
+             esac
+             ;;
+           *) tmp_libs="$tmp_libs $deplib" ;;
+           esac
+         done
+         eval $var=\"$tmp_libs\"
+       done
+      fi
     done
     if test $linkmode = prog; then
       dlfiles="$newdlfiles"
@@ -3015,12 +3078,15 @@ EOF
       fi
 
       if test "$preload" = yes; then
-       if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
+       if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
           test "$dlopen_self_static" = unknown; then
          $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
        fi
       fi
 
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
+
       if test -n "$rpath$xrpath"; then
        # If the user specified any rpath flags, then add them.
        for libdir in $rpath $xrpath; do
index 59864b2de7d119879dd39a0aa1822eee4572036c..6e069451a5b2042b6a5d612417d2415eb1a5b0aa 100644 (file)
@@ -30,7 +30,7 @@ AC_CACHE_SAVE
 
 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -75,8 +75,8 @@ dnl
 # Only perform the check for file, if the check method requires it
 case "$deplibs_check_method" in
 file_magic*)
-  if test "$file_magic_cmd" = '$FILE'; then
-    AC_PATH_FILE
+  if test "$file_magic_cmd" = '${MAGIC}'; then
+    AC_PATH_MAGIC
   fi
   ;;
 esac
@@ -138,7 +138,10 @@ case "$lt_target" in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+    [AC_LANG_SAVE
+     AC_LANG_C
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_RESTORE])
   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS="$SAVE_CFLAGS"
@@ -288,16 +291,16 @@ AC_ENABLE_FAST_INSTALL(no)])
 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 AC_DEFUN(AC_PATH_TOOL_PREFIX,
 [AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_FILE,
-[case "$FILE" in
+AC_CACHE_VAL(lt_cv_path_MAGIC,
+[case "$MAGIC" in
   /*)
-  lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
   ;;
   ?:/*)
-  ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
+  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
   ;;
   *)
-  ac_save_file="$FILE"
+  ac_save_MAGIC="$MAGIC"
   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
@@ -306,12 +309,12 @@ dnl not every word.  This closes a longstanding sh security hole.
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$1; then
-      lt_cv_path_FILE="$ac_dir/$1"
+      lt_cv_path_MAGIC="$ac_dir/$1"
       if test -n "$file_magic_test_file"; then
        case "$deplibs_check_method" in
        "file_magic "*)
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-         FILE="$lt_cv_path_FILE"
+         MAGIC="$lt_cv_path_MAGIC"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            egrep "$file_magic_regex" > /dev/null; then
            :
@@ -335,27 +338,27 @@ EOF
     fi
   done
   IFS="$ac_save_ifs"
-  FILE="$ac_save_file"
+  MAGIC="$ac_save_MAGIC"
   ;;
 esac])
-FILE="$lt_cv_path_FILE"
-if test -n "$FILE"; then
-  AC_MSG_RESULT($FILE)
+MAGIC="$lt_cv_path_MAGIC"
+if test -n "$MAGIC"; then
+  AC_MSG_RESULT($MAGIC)
 else
   AC_MSG_RESULT(no)
 fi
 ])
 
 
-# AC_PATH_FILE - find a file program which can recognise a shared library
-AC_DEFUN(AC_PATH_FILE,
+# AC_PATH_MAGIC - find a file program which can recognise a shared library
+AC_DEFUN(AC_PATH_MAGIC,
 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_FILE"; then
+if test -z "$lt_cv_path_MAGIC"; then
   if test -n "$ac_tool_prefix"; then
     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
   else
-    FILE=:
+    MAGIC=:
   fi
 fi
 ])
@@ -463,7 +466,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
 [AC_CACHE_CHECK([how to recognise dependant libraries],
 lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$FILE'
+[lt_cv_file_magic_cmd='${MAGIC}'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
@@ -483,7 +486,9 @@ aix4* | beos*)
   ;;
 
 bsdi4*)
+  changequote(,)dnl
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  changequote([, ])dnl
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -518,7 +523,9 @@ irix5* | irix6*)
     *) libmagic=never-match;;
     esac
     # this will be overridden with pass_all, but let us keep it just in case
+    changequote(,)dnl
     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    changequote([, ])dnl
     ;;
   esac
   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
@@ -528,11 +535,13 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux-gnu*)
   case "$host_cpu" in
-  alpha* | i*86 | sparc* )
+  alpha* | i*86 | powerpc* | sparc* )
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+    changequote([, ])dnl
   esac
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
@@ -559,7 +568,9 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     lt_cv_deplibs_check_method=pass_all
     ;;
   motorola)
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    changequote([, ])dnl
     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     ;;
   esac
@@ -662,7 +673,7 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   if test x"$enable_ltdl_install" = x"yes"; then
     ac_configure_args="$ac_configure_args --enable-ltdl-install"
     LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
-    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+    INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
   else
     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
     LIBLTDL="-lltdl"
@@ -680,7 +691,7 @@ lt_save_CFLAGS="$CFLAGS"
 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
 dnl is set to the C++ compiler.
 AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
index d9116e7fef0458868182b07ca4936f01a2593fee..918893afc1e754ece9cade220a72400f8585ca85 100644 (file)
@@ -20,7 +20,7 @@ AC_CACHE_SAVE
 
 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -65,8 +65,8 @@ dnl
 # Only perform the check for file, if the check method requires it
 case "$deplibs_check_method" in
 file_magic*)
-  if test "$file_magic_cmd" = '$FILE'; then
-    AC_PATH_FILE
+  if test "$file_magic_cmd" = '${MAGIC}'; then
+    AC_PATH_MAGIC
   fi
   ;;
 esac
@@ -128,7 +128,10 @@ case "$lt_target" in
   SAVE_CFLAGS="$CFLAGS"
   CFLAGS="$CFLAGS -belf"
   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
+    [AC_LANG_SAVE
+     AC_LANG_C
+     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+     AC_LANG_RESTORE])
   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
     CFLAGS="$SAVE_CFLAGS"
@@ -278,16 +281,16 @@ AC_ENABLE_FAST_INSTALL(no)])
 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 AC_DEFUN(AC_PATH_TOOL_PREFIX,
 [AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_FILE,
-[case "$FILE" in
+AC_CACHE_VAL(lt_cv_path_MAGIC,
+[case "$MAGIC" in
   /*)
-  lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
   ;;
   ?:/*)
-  ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
+  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
   ;;
   *)
-  ac_save_file="$FILE"
+  ac_save_MAGIC="$MAGIC"
   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 dnl $ac_dummy forces splitting on constant user-supplied paths.
 dnl POSIX.2 word splitting is done only on the output of word expansions,
@@ -296,12 +299,12 @@ dnl not every word.  This closes a longstanding sh security hole.
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/$1; then
-      lt_cv_path_FILE="$ac_dir/$1"
+      lt_cv_path_MAGIC="$ac_dir/$1"
       if test -n "$file_magic_test_file"; then
        case "$deplibs_check_method" in
        "file_magic "*)
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-         FILE="$lt_cv_path_FILE"
+         MAGIC="$lt_cv_path_MAGIC"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            egrep "$file_magic_regex" > /dev/null; then
            :
@@ -325,27 +328,27 @@ EOF
     fi
   done
   IFS="$ac_save_ifs"
-  FILE="$ac_save_file"
+  MAGIC="$ac_save_MAGIC"
   ;;
 esac])
-FILE="$lt_cv_path_FILE"
-if test -n "$FILE"; then
-  AC_MSG_RESULT($FILE)
+MAGIC="$lt_cv_path_MAGIC"
+if test -n "$MAGIC"; then
+  AC_MSG_RESULT($MAGIC)
 else
   AC_MSG_RESULT(no)
 fi
 ])
 
 
-# AC_PATH_FILE - find a file program which can recognise a shared library
-AC_DEFUN(AC_PATH_FILE,
+# AC_PATH_MAGIC - find a file program which can recognise a shared library
+AC_DEFUN(AC_PATH_MAGIC,
 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_FILE"; then
+if test -z "$lt_cv_path_MAGIC"; then
   if test -n "$ac_tool_prefix"; then
     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
   else
-    FILE=:
+    MAGIC=:
   fi
 fi
 ])
@@ -453,7 +456,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
 [AC_CACHE_CHECK([how to recognise dependant libraries],
 lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$FILE'
+[lt_cv_file_magic_cmd='${MAGIC}'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
@@ -473,7 +476,9 @@ aix4* | beos*)
   ;;
 
 bsdi4*)
+  changequote(,)dnl
   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  changequote([, ])dnl
   lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
@@ -508,7 +513,9 @@ irix5* | irix6*)
     *) libmagic=never-match;;
     esac
     # this will be overridden with pass_all, but let us keep it just in case
+    changequote(,)dnl
     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    changequote([, ])dnl
     ;;
   esac
   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
@@ -518,11 +525,13 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux-gnu*)
   case "$host_cpu" in
-  alpha* | i*86 | sparc* )
+  alpha* | i*86 | powerpc* | sparc* )
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+    changequote([, ])dnl
   esac
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
@@ -549,7 +558,9 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     lt_cv_deplibs_check_method=pass_all
     ;;
   motorola)
+    changequote(,)dnl
     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    changequote([, ])dnl
     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     ;;
   esac
@@ -652,7 +663,7 @@ AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
   if test x"$enable_ltdl_install" = x"yes"; then
     ac_configure_args="$ac_configure_args --enable-ltdl-install"
     LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
-    INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
+    INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
   else
     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
     LIBLTDL="-lltdl"
@@ -670,7 +681,7 @@ lt_save_CFLAGS="$CFLAGS"
 dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
 dnl is set to the C++ compiler.
 AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
index e3e2262034d271b7898eabc6c0f338240acb5425..2747e22d3f649511d2906797c55803f9c2ecdf41 100755 (executable)
@@ -1803,7 +1803,7 @@ echo "configure:1803: checking how to recognise dependant libraries" >&5
 if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  lt_cv_file_magic_cmd='$FILE'
+  lt_cv_file_magic_cmd='${MAGIC}'
 lt_cv_file_magic_test_file=
 lt_cv_deplibs_check_method='unknown'
 # Need to set the preceding variable on all platforms that support
@@ -1823,8 +1823,8 @@ aix4* | beos*)
   ;;
 
 bsdi4*)
-  lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (shared object|dynamic lib)'
-  lt_cv_file_magic_test_file=/shlib/libc.so
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+    lt_cv_file_magic_test_file=/shlib/libc.so
   ;;
 
 cygwin* | mingw*)
@@ -1858,8 +1858,8 @@ irix5* | irix6*)
     *) libmagic=never-match;;
     esac
     # this will be overridden with pass_all, but let us keep it just in case
-    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-1234 dynamic lib MIPS - version 1"
-    ;;
+        lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+        ;;
   esac
   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
   lt_cv_deplibs_check_method=pass_all
@@ -1868,12 +1868,12 @@ irix5* | irix6*)
 # This must be Linux ELF.
 linux-gnu*)
   case "$host_cpu" in
-  alpha* | i*86 | sparc* )
+  alpha* | i*86 | powerpc* | sparc* )
     lt_cv_deplibs_check_method=pass_all ;;
   *)
     # glibc up to 2.1.1 does not perform some relocations on ARM
-    lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit LMSB (shared object|dynamic lib )' ;;
-  esac
+        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+      esac
   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
   ;;
 
@@ -1899,8 +1899,8 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
     lt_cv_deplibs_check_method=pass_all
     ;;
   motorola)
-    lt_cv_deplibs_check_method='file_magic ELF 0-90-9*-bit MLSB (shared object|dynamic lib) M0-90-9* Version 0-9'
-    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+        lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+        lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
     ;;
   esac
   ;;
@@ -1923,32 +1923,32 @@ fi
 # Only perform the check for file, if the check method requires it
 case "$deplibs_check_method" in
 file_magic*)
-  if test "$file_magic_cmd" = '$FILE'; then
+  if test "$file_magic_cmd" = '${MAGIC}'; then
     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
 echo "configure:1929: checking for ${ac_tool_prefix}file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_FILE'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case "$FILE" in
+  case "$MAGIC" in
   /*)
-  lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
   ;;
   ?:/*)
-  ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
+  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
   ;;
   *)
-  ac_save_file="$FILE"
+  ac_save_MAGIC="$MAGIC"
   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="/usr/bin:$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_FILE="$ac_dir/${ac_tool_prefix}file"
+      lt_cv_path_MAGIC="$ac_dir/${ac_tool_prefix}file"
       if test -n "$file_magic_test_file"; then
        case "$deplibs_check_method" in
        "file_magic "*)
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-         FILE="$lt_cv_path_FILE"
+         MAGIC="$lt_cv_path_MAGIC"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            egrep "$file_magic_regex" > /dev/null; then
            :
@@ -1972,45 +1972,45 @@ EOF
     fi
   done
   IFS="$ac_save_ifs"
-  FILE="$ac_save_file"
+  MAGIC="$ac_save_MAGIC"
   ;;
 esac
 fi
 
-FILE="$lt_cv_path_FILE"
-if test -n "$FILE"; then
-  echo "$ac_t""$FILE" 1>&6
+MAGIC="$lt_cv_path_MAGIC"
+if test -n "$MAGIC"; then
+  echo "$ac_t""$MAGIC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
-if test -z "$lt_cv_path_FILE"; then
+if test -z "$lt_cv_path_MAGIC"; then
   if test -n "$ac_tool_prefix"; then
     echo $ac_n "checking for file""... $ac_c" 1>&6
 echo "configure:1991: checking for file" >&5
-if eval "test \"`echo '$''{'lt_cv_path_FILE'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  case "$FILE" in
+  case "$MAGIC" in
   /*)
-  lt_cv_path_FILE="$FILE" # Let the user override the test with a path.
+  lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
   ;;
   ?:/*)
-  ac_cv_path_FILE="$FILE" # Let the user override the test with a dos path.
+  ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
   ;;
   *)
-  ac_save_file="$FILE"
+  ac_save_MAGIC="$MAGIC"
   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="/usr/bin:$PATH"
   for ac_dir in $ac_dummy; do
     test -z "$ac_dir" && ac_dir=.
     if test -f $ac_dir/file; then
-      lt_cv_path_FILE="$ac_dir/file"
+      lt_cv_path_MAGIC="$ac_dir/file"
       if test -n "$file_magic_test_file"; then
        case "$deplibs_check_method" in
        "file_magic "*)
          file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
-         FILE="$lt_cv_path_FILE"
+         MAGIC="$lt_cv_path_MAGIC"
          if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
            egrep "$file_magic_regex" > /dev/null; then
            :
@@ -2034,20 +2034,20 @@ EOF
     fi
   done
   IFS="$ac_save_ifs"
-  FILE="$ac_save_file"
+  MAGIC="$ac_save_MAGIC"
   ;;
 esac
 fi
 
-FILE="$lt_cv_path_FILE"
-if test -n "$FILE"; then
-  echo "$ac_t""$FILE" 1>&6
+MAGIC="$lt_cv_path_MAGIC"
+if test -n "$MAGIC"; then
+  echo "$ac_t""$MAGIC" 1>&6
 else
   echo "$ac_t""no" 1>&6
 fi
 
   else
-    FILE=:
+    MAGIC=:
   fi
 fi
 
@@ -2255,15 +2255,23 @@ echo "configure:2255: checking whether the C compiler needs -belf" >&5
 if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-  cat > conftest.$ac_ext <<EOF
-#line 2260 "configure"
+  
+     ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+     cat > conftest.$ac_ext <<EOF
+#line 2268 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:2267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   lt_cv_cc_needs_belf=yes
 else
@@ -2273,6 +2281,13 @@ else
   lt_cv_cc_needs_belf=no
 fi
 rm -f conftest*
+     ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
 fi
 
 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
@@ -2337,7 +2352,7 @@ rm -f confcache
 
 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
 AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -2373,7 +2388,7 @@ exec 5>>./config.log
 lt_save_CC="$CC"
 lt_save_CFLAGS="$CFLAGS"
 AR="$AR" LTCC="$CC" CC="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-FILE="$FILE" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC="$MAGIC" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -2390,17 +2405,17 @@ for ac_hdr in math.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2394: checking for $ac_hdr" >&5
+echo "configure:2409: 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 2399 "configure"
+#line 2414 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2404: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2434,7 +2449,7 @@ case "$lt_target" in
   ;;
 *-ncr-sysv4.3*)
   echo $ac_n "checking for _mwvalidcheckl in -lmw""... $ac_c" 1>&6
-echo "configure:2438: checking for _mwvalidcheckl in -lmw" >&5
+echo "configure:2453: checking for _mwvalidcheckl in -lmw" >&5
 ac_lib_var=`echo mw'_'_mwvalidcheckl | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2442,7 +2457,7 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lmw  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2446 "configure"
+#line 2461 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 #ifdef __cplusplus
@@ -2456,7 +2471,7 @@ int main() {
 _mwvalidcheckl()
 ; return 0; }
 EOF
-if { (eval echo configure:2460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2477,7 +2492,7 @@ else
 fi
 
   echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:2481: checking for main in -lm" >&5
+echo "configure:2496: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2485,14 +2500,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2489 "configure"
+#line 2504 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2515,7 +2530,7 @@ fi
   ;;
 *)
   echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:2519: checking for main in -lm" >&5
+echo "configure:2534: checking for main in -lm" >&5
 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2523,14 +2538,14 @@ else
   ac_save_LIBS="$LIBS"
 LIBS="-lm  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2527 "configure"
+#line 2542 "configure"
 #include "confdefs.h"
 
 int main() {
 main()
 ; return 0; }
 EOF
-if { (eval echo configure:2534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else