/[libtool]/libtool/libtool.m4
ViewVC logotype

Diff of /libtool/libtool.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.166 by gary, Tue Apr 24 23:40:42 2001 UTC revision 1.167 by gary, Sun May 27 23:20:45 2001 UTC
# Line 22  Line 22 
22  ## configuration script generated by Autoconf, you may include it under  ## configuration script generated by Autoconf, you may include it under
23  ## the same distribution terms that you use for the rest of that program.  ## the same distribution terms that you use for the rest of that program.
24    
25  # serial 46 AC_PROG_LIBTOOL  # serial 47 AC_PROG_LIBTOOL
26  AC_DEFUN([AC_PROG_LIBTOOL],  AC_DEFUN([AC_PROG_LIBTOOL],
27    [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
28    dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
29    dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
30      AC_PROVIDE_IFELSE([AC_PROG_CXX],
31        [AC_LIBTOOL_CXX],
32        [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
33      ])])
34    
35    dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
36    dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
37    dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
38      AC_PROVIDE_IFELSE([AC_PROG_GCJ],
39        [AC_LIBTOOL_GCJ],
40        [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
41          [AC_LIBTOOL_GCJ],
42          [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
43            [AC_LIBTOOL_GCJ],
44          [ifdef([AC_PROG_GCJ],
45                 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
46           ifdef([A][M_PROG_GCJ],
47                 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
48           ifdef([LT_AC_PROG_GCJ],
49                 [define([LT_AC_PROG_GCJ],
50                    defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
51    ])])# AC_PROG_LIBTOOL
52    
53    AC_DEFUN([_AC_PROG_LIBTOOL],
54  [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl  [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
55    AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
56    AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
57    
58  # This can be used to rebuild libtool when needed  # This can be used to rebuild libtool when needed
59  LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"  LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
# Line 50  AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl Line 79  AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
79  AC_REQUIRE([AC_PROG_NM])dnl  AC_REQUIRE([AC_PROG_NM])dnl
80  AC_REQUIRE([AC_PROG_LN_S])dnl  AC_REQUIRE([AC_PROG_LN_S])dnl
81  AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl  AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
82    # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
83  AC_REQUIRE([AC_OBJEXT])dnl  AC_REQUIRE([AC_OBJEXT])dnl
84  AC_REQUIRE([AC_EXEEXT])dnl  AC_REQUIRE([AC_EXEEXT])dnl
85  dnl  dnl
# Line 154  AC_DEFUN(_LT_AC_CHECK_DLFCN, Line 184  AC_DEFUN(_LT_AC_CHECK_DLFCN,
184  [AC_CHECK_HEADERS(dlfcn.h)  [AC_CHECK_HEADERS(dlfcn.h)
185  ])# _LT_AC_CHECK_DLFCN  ])# _LT_AC_CHECK_DLFCN
186    
187    # AC_LIBTOOL_SYS_MAX_CMD_LEN
188    # --------------------------
189    AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
190    [max_cmd_len=
191    # find the maximum length of command line arguments
192    AC_MSG_CHECKING([the maximum length of command line arguments])
193    AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
194      i=0
195      testring="ABCD"
196    
197      # If test is not a shell built-in, we'll probably end up computing a
198      # maximum length that is only half of the actual maximum length, but
199      # we can't tell.
200      while test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
201                 = "XX$testring" &&
202              new_result=`expr "X$testring" : ".*" 2>&1` &&
203              lt_cv_sys_max_cmd_len=$new_result &&
204              test $i != 18 # 1 MB should be enough
205      do
206        i=`expr $i + 1`
207        testring=$testring$testring
208      done
209      testring=
210      # add a significant safety factor because C++ compilers can tack on massive
211      # amounts of additional arguments before passing them to the linker.  1/4
212      #  should be good.
213      len=`expr $lt_cv_sys_max_cmd_len \/ 4`
214      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
215    ])
216    if test -n $lt_cv_sys_max_cmd_len ; then
217      max_cmd_len=$lt_cv_sys_max_cmd_len
218    else
219      max_cmd_len=none
220    fi
221    AC_MSG_RESULT($max_cmd_len)
222    ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
223    
224  # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE  # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
225  # ---------------------------------  # ---------------------------------
226  AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],  AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
# Line 347  fi Line 414  fi
414  # _LT_AC_PROG_ECHO_BACKSLASH  # _LT_AC_PROG_ECHO_BACKSLASH
415  # --------------------------  # --------------------------
416  # Add some code to the start of the generated configure script which  # Add some code to the start of the generated configure script which
417  # will find an echo command which doesn;t interpret backslashes.  # will find an echo command which doesn't interpret backslashes.
418  AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],  AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
419  [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],  [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
420                                [AC_DIVERT_PUSH(NOTICE)])                                [AC_DIVERT_PUSH(NOTICE)])
# Line 382  if test "X[$]1" = X--fallback-echo; then Line 449  if test "X[$]1" = X--fallback-echo; then
449    # used as fallback echo    # used as fallback echo
450    shift    shift
451    cat <<EOF    cat <<EOF
452  $*  [$]*
453  EOF  EOF
454    exit 0    exit 0
455  fi  fi
# Line 681  else Line 748  else
748  fi  fi
749  ])# AC_LIBTOOL_DLOPEN_SELF  ])# AC_LIBTOOL_DLOPEN_SELF
750    
751    AC_DEFUN([_LT_AC_TAGCONFIG],
752    [tagname=
753    
754    ## Dependencies to place before and after the object being linked:
755    predep_objects=
756    postdep_objects=
757    predeps=
758    postdeps=
759    compiler_lib_search_path=
760    ])# _LT_AC_TAGCONFIG
761    
762  AC_DEFUN([_LT_AC_LTCONFIG_HACK],  AC_DEFUN([_LT_AC_LTCONFIG_HACK],
763  [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl  [AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
764    AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
765    
766  # Sed substitution that helps us do robust quoting.  It backslashifies  # Sed substitution that helps us do robust quoting.  It backslashifies
767  # metacharacters that are still active within double-quoted strings.  # metacharacters that are still active within double-quoted strings.
768  Xsed='sed -e s/^X//'  Xsed='sed -e s/^X//'
# Line 718  test -z "$AR" && AR=ar Line 798  test -z "$AR" && AR=ar
798  test -z "$AR_FLAGS" && AR_FLAGS=cru  test -z "$AR_FLAGS" && AR_FLAGS=cru
799  test -z "$AS" && AS=as  test -z "$AS" && AS=as
800  test -z "$CC" && CC=cc  test -z "$CC" && CC=cc
801    test -z "$LTCC" && LTCC=$CC
802  test -z "$DLLTOOL" && DLLTOOL=dlltool  test -z "$DLLTOOL" && DLLTOOL=dlltool
803  test -z "$LD" && LD=ld  test -z "$LD" && LD=ld
804  test -z "$LN_S" && LN_S="ln -s"  test -z "$LN_S" && LN_S="ln -s"
# Line 762  if test -n "$RANLIB"; then Line 843  if test -n "$RANLIB"; then
843    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"    old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
844  fi  fi
845    
846    # If no C compiler was specified, use CC.
847    LTCC=${LTCC-"$CC"}
848    
849  # Allow CC to be a program name with arguments.  # Allow CC to be a program name with arguments.
850  set dummy $CC  set dummy $CC
851  compiler="[$]2"  compiler="[$]2"
# Line 2385  echo=$lt_echo Line 2469  echo=$lt_echo
2469  AR=$lt_AR  AR=$lt_AR
2470  AR_FLAGS=$lt_AR_FLAGS  AR_FLAGS=$lt_AR_FLAGS
2471    
2472    # A C compiler.
2473    LTCC=$LTCC
2474    
2475  # The default C compiler.  # The default C compiler.
2476  CC=$lt_CC  CC=$lt_CC
2477    
# Line 2438  exeext="$exeext" Line 2525  exeext="$exeext"
2525  pic_flag=$lt_pic_flag  pic_flag=$lt_pic_flag
2526  pic_mode=$pic_mode  pic_mode=$pic_mode
2527    
2528    # What is the maximum length of a command?
2529    max_cmd_len=$max_cmd_len
2530    
2531  # Does compiler simultaneously support -c and -o options?  # Does compiler simultaneously support -c and -o options?
2532  compiler_c_o=$lt_compiler_c_o  compiler_c_o=$lt_compiler_c_o
2533    
# Line 3149  darwin* | rhapsody*) Line 3239  darwin* | rhapsody*)
3239    lt_cv_file_magic_cmd='/usr/bin/file -L'    lt_cv_file_magic_cmd='/usr/bin/file -L'
3240    case "$host_os" in    case "$host_os" in
3241    rhapsody* | darwin1.[012])    rhapsody* | darwin1.[012])
3242      lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`      lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
3243      ;;      ;;
3244    *) # Darwin 1.3 on    *) # Darwin 1.3 on
3245      lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'      lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
# Line 3177  gnu*) Line 3267  gnu*)
3267    lt_cv_deplibs_check_method=pass_all    lt_cv_deplibs_check_method=pass_all
3268    ;;    ;;
3269    
3270  hpux10.20*|hpux11*)  hpux10.20* | hpux11*)
3271    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
3272    lt_cv_file_magic_cmd=/usr/bin/file    lt_cv_file_magic_cmd=/usr/bin/file
3273    lt_cv_file_magic_test_file=/usr/lib/libc.sl    lt_cv_file_magic_test_file=/usr/lib/libc.sl
# Line 3384  AC_DEFUN([AC_LIBLTDL_INSTALLABLE], Line 3474  AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3474    fi    fi
3475  ])  ])
3476    
3477    # If this macro is not defined by Autoconf, define it here.
3478    ifdef([AC_PROVIDE_IFELSE],
3479          [],
3480          [define([AC_PROVIDE_IFELSE],
3481                  [ifdef([AC_PROVIDE_$1],
3482                         [$2], [$3])])])
3483    
3484    # AC_LIBTOOL_CXX - enable support for C++ libraries
3485    AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
3486    
3487    AC_DEFUN([_AC_LIBTOOL_CXX],
3488    [AC_REQUIRE([AC_PROG_CXX])
3489    AC_REQUIRE([AC_PROG_CXXCPP])
3490    LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
3491    lt_save_CC="$CC"
3492    lt_save_CFLAGS="$CFLAGS"
3493    dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
3494    dnl is set to the C++ compiler.
3495    AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
3496    MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3497    LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3498    AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
3499    objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
3500    deplibs_check_method="$deplibs_check_method" \
3501    file_magic_cmd="$file_magic_cmd" \
3502    ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
3503    --build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
3504    || AC_MSG_ERROR([libtool tag configuration failed])
3505    CC="$lt_save_CC"
3506    CFLAGS="$lt_save_CFLAGS"
3507    
3508    # Redirect the config.log output again, so that the ltconfig log is not
3509    # clobbered by the next message.
3510    exec 5>>./config.log
3511    ])# _AC_LIBTOOL_CXX -
3512    
3513    # AC_LIBTOOL_GCJ - enable support for GCJ libraries
3514    AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
3515    
3516    AC_DEFUN([_AC_LIBTOOL_GCJ],
3517    [AC_REQUIRE([AC_PROG_LIBTOOL])
3518    AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3519      [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3520        [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3521          [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3522             [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3523               [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3524    LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
3525    lt_save_CC="$CC"
3526    lt_save_CFLAGS="$CFLAGS"
3527    dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
3528    dnl is set to the C++ compiler.
3529    AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
3530    MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
3531    LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
3532    AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
3533    objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
3534    deplibs_check_method="$deplibs_check_method" \
3535    file_magic_cmd="$file_magic_cmd" \
3536    ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
3537    --build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
3538    || AC_MSG_ERROR([libtool tag configuration failed])
3539    CC="$lt_save_CC"
3540    CFLAGS="$lt_save_CFLAGS"
3541    
3542    # Redirect the config.log output again, so that the ltconfig log is not
3543    # clobbered by the next message.
3544    exec 5>>./config.log
3545    ])
3546    
3547  # old names  # old names
3548  AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])  AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
3549  AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])  AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
# Line 3395  AC_DEFUN([AM_PROG_NM],        [AC_PROG_N Line 3555  AC_DEFUN([AM_PROG_NM],        [AC_PROG_N
3555    
3556  # This is just to silence aclocal about the macro not being used  # This is just to silence aclocal about the macro not being used
3557  ifelse([AC_DISABLE_FAST_INSTALL])  ifelse([AC_DISABLE_FAST_INSTALL])
3558    
3559    AC_DEFUN([LT_AC_PROG_GCJ],
3560    [AC_CHECK_TOOL(GCJ, gcj, no)
3561      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
3562      AC_SUBST(GCJFLAGS)
3563    ])

Legend:
Removed from v.1.166  
changed lines
  Added in v.1.167

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26