From b28de94488bf469c74b270ca5be03072b38d1d97 Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Tue, 21 Oct 2003 15:03:57 +0000 Subject: [PATCH] Start to eliminate the double run of configure in a fresh CVS checkout by generating ltmain.sh, using that to create libtool, and then adding the tags to that, all from config.status. * configure.ac (AC_CONFIG_FILES): Make config/ltmain.sh, and copy it to libltdl. * Makefile.am ($(srcdir)/config/ltmain.sh): This file is now created by config.status. Adjust this rule. (libtoolize): Set CONFIG_COMMANDS to empty to prevent regenerating the libtool script as a side effect of running this rule. * libtool.m4: Bump serial number. Fix comment typos. (_LT_CONFIG_LIBTOOL_INIT, _LT_CONFIG_LIBTOOL, _LT_CONFIG_SAVE_COMMANDS, _LT_CONFIG_COMMANDS: New macros. They don't work for some reason - the variable value quoting in the init section is all wrong. Not used at the moment. (AC_LIBTOOL_CONFIG): Generate libtool from config.status. (_LT_AC_TAG_CONFIG): Add the tags in config.status. (compiler_DEFAULT): Save the compiler value for the DEFAULT tag, or it gets overwritten by the other macros. (EOF): Globally replace with _LT_EOF to avoid namespace pollution. * tests/demo/configure.ac (STATIC): Check $enable_static instead of running ./libtool which doesn't exist yet. (BINARY_HELLDL): Check $lt_cv_sys_global_symbol_pipe with case instead of grepping ./libtool which doesn't exist yet. * tests/pdemo/configure.ac (STATIC, BINARY_HELLDL): Ditto. * doc/libtool.texi (AC_PROG_LIBTOOL): Add some notes about trying to get config details from `libtool --config'. * NEWS: Updated. --- ChangeLog | 31 +++ Makefile.am | 17 +- NEWS | 5 +- config/config.guess | 4 +- config/config.sub | 2 - configure.ac | 3 + doc/libtool.texi | 25 ++ m4/libtool.m4 | 508 ++++++++++++++++++++++++++------------- tests/demo/configure.ac | 13 +- tests/pdemo/configure.ac | 13 +- 10 files changed, 423 insertions(+), 198 deletions(-) diff --git a/ChangeLog b/ChangeLog index 993d57f2d..b59451cad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,34 @@ +2003-10-21 Gary V. Vaughan + + Start to eliminate the double run of configure in a fresh CVS + checkout by generating ltmain.sh, using that to create libtool, + and then adding the tags to that, all from config.status. + + * configure.ac (AC_CONFIG_FILES): Make config/ltmain.sh, and copy + it to libltdl. + * Makefile.am ($(srcdir)/config/ltmain.sh): This file is now + created by config.status. Adjust this rule. + (libtoolize): Set CONFIG_COMMANDS to empty to prevent regenerating + the libtool script as a side effect of running this rule. + * libtool.m4: Bump serial number. Fix comment typos. + (_LT_CONFIG_LIBTOOL_INIT, _LT_CONFIG_LIBTOOL, + _LT_CONFIG_SAVE_COMMANDS, _LT_CONFIG_COMMANDS: New macros. They + don't work for some reason - the variable value quoting in the + init section is all wrong. Not used at the moment. + (AC_LIBTOOL_CONFIG): Generate libtool from config.status. + (_LT_AC_TAG_CONFIG): Add the tags in config.status. + (compiler_DEFAULT): Save the compiler value for the DEFAULT tag, + or it gets overwritten by the other macros. + (EOF): Globally replace with _LT_EOF to avoid namespace pollution. + * tests/demo/configure.ac (STATIC): Check $enable_static instead + of running ./libtool which doesn't exist yet. + (BINARY_HELLDL): Check $lt_cv_sys_global_symbol_pipe with case + instead of grepping ./libtool which doesn't exist yet. + * tests/pdemo/configure.ac (STATIC, BINARY_HELLDL): Ditto. + * doc/libtool.texi (AC_PROG_LIBTOOL): Add some notes about trying + to get config details from `libtool --config'. + * NEWS: Updated. + 2003-10-21 Gary V. Vaughan * ChangeLog, ChangeLog.0, ChangeLog.1: Refactored... diff --git a/Makefile.am b/Makefile.am index 7817b65d8..2f537d193 100644 --- a/Makefile.am +++ b/Makefile.am @@ -40,23 +40,16 @@ aclocal_DATA = $(aclocal_macros) # The standalone libtool script, and the libtool distributor. bin_SCRIPTS = libtool libtoolize -libtool: $(srcdir)/config/ltmain.sh $(top_builddir)/configure.ac - $(SHELL) $(top_builddir)/config.status --recheck +config_status = $(top_builddir)/config.status + +libtool: $(srcdir)/config/ltmain.sh $(top_builddir)/configure + CONFIG_FILES= CONFIG_HEADERS= $(SHELL) $(config_status) chmod +x $@ libtoolize: $(srcdir)/libtoolize.in $(top_builddir)/config.status - CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) $(top_builddir)/config.status + CONFIG_FILES=$@ CONFIG_HEADERS= CONFIG_COMMANDS= $(SHELL) $(config_status) chmod +x $@ -$(srcdir)/config/ltmain.sh: $(srcdir)/ltmain.in $(TSDEPS) - -rm -f ltmain.shT - date=`$(SHELL) $(srcdir)/config/mkstamp < $(srcdir)/ChangeLog` && \ - sed -e 's/@''PACKAGE@/@PACKAGE@/' -e 's/@''VERSION@/@VERSION@/' \ - -e "s%@""TIMESTAMP@%$$date%" $(srcdir)/ltmain.in > ltmain.shT - mv -f ltmain.shT $@ || \ - (rm -f $@ && cp ltmain.shT $@ && rm -f ltmain.shT) - cp $@ $(srcdir)/libltdl/ - # TSDEPS will be defined to TSDEPS_DIST at `make dist' time TSDEPS = TSDEPS_DIST = ChangeLog m4/libtool.m4 diff --git a/NEWS b/NEWS index 42d33eed3..be2a39553 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ NEWS - list of user-visible changes between releases of GNU Libtool New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team: +* libtool script is now created by config.status. Instead of interrogating + `./libtool' from configure.ac after calling AC_PROG_LIBTOOL, use the + variable names directly. * --tag, --silent and --debug options are preserved and reused when libtool calls itself for relinking etc. * -no-suppress in compile mode shows compiler output for both PIC and non-PIC @@ -12,7 +15,7 @@ New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team: * If you configure libtool with --disable-shared (or if libtool does not support shared libraries on your platform) trying to build a library using `-shared' is a fatal error. -* libtoolize installs libtool.m4 (and ltdl.m4 if used) to AC_CONFIG_M4_DIR. +* libtoolize installs libtool.m4 (and ltdl.m4 if used) to AC_CONFIG_MACRO_DIR. * Mode inferrence removed, shorthand for choosing modes added. * Specifying -allow-undefined is now an error. * Initial support for amigaos-ppc. diff --git a/config/config.guess b/config/config.guess index 500ee74b0..d56c46d84 100755 --- a/config/config.guess +++ b/config/config.guess @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2003-10-03' +timestamp='2003-08-18' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -1167,7 +1167,7 @@ EOF *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) diff --git a/config/config.sub b/config/config.sub index 1f31816b9..689009918 100755 --- a/config/config.sub +++ b/config/config.sub @@ -248,7 +248,6 @@ case $basic_machine in | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ @@ -321,7 +320,6 @@ case $basic_machine in | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ diff --git a/configure.ac b/configure.ac index 094fd67a7..af95ac33a 100644 --- a/configure.ac +++ b/configure.ac @@ -130,6 +130,9 @@ AM_CONDITIONAL(HAVE_RC, [test "x$RC" != xno]) ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## +AC_CONFIG_FILES([config/ltmain.sh:./ltmain.in]) +AC_CONFIG_COMMANDS([libltdl/ltmain.sh], + [cp -f config/ltmain.sh libltdl/ltmain.sh]) AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL diff --git a/doc/libtool.texi b/doc/libtool.texi index b2da0dc68..1120a1856 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -1827,6 +1827,31 @@ Program to use rather than checking for @code{as}. Only used on Cygwin/MS-Windows at the moment. @end defvar +With 1.3 era libtool, if you wanted to know any details of what +libtool had discovered about your architecture and environment, you +had to run the script with @samp{--config} and grep through the +results. This ideom was supported up to and including 1.5.x era +libtool, where it was possible to call the generated libtool script +from @file{configure.in} as soon as @code{AC_PROG_LIBTOOL} had +completed. However, one of the features of libtool 1.4 was that the +libtool configuration was migrated out of a separate @file{ltconfig} +file, and added to the @code{AC_PROG_LIBTOOL} macro, so the results of +the configuration tests were available directly to code in +@file{configure.in}, rendering the call out to the generated libtool +script obsolete. + +Starting with libtool 1.6, the multipass generation of the libtool +script has been consolidated into a single @file{config.status} pass, +which happens after all the code in @file{configure.in} has +completed. The implication of this is that the libtool script does +not exist during execution of code from @file{configure.in}, and so +obviously it cannot be called for @samp{--config} details anymore. If +you are upgrading projects that used this ideom to libtool 1.6 or +newer, you should replace those calls with direct references to the +equivalent Autoconf shell variables that are set by the configure time +tests before being passed to @file{config.status} for inclusion in the +generated libtool script. + @pindex aclocal When you invoke the @code{libtoolize} program (@pxref{Invoking libtoolize}), it will tell you where to find a definition of diff --git a/m4/libtool.m4 b/m4/libtool.m4 index d792953cd..c6790039d 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1,5 +1,5 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- -## Copyright 1996, 1997, 1998, 1999, 2000, 2001 +## Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003 ## Free Software Foundation, Inc. ## Originally by Gordon Matzigkeit , 1996 ## @@ -22,7 +22,7 @@ ## configuration script generated by Autoconf, you may include it under ## the same distribution terms that you use for the rest of that program. -# serial 48 AC_PROG_LIBTOOL +# serial 49 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) @@ -200,9 +200,62 @@ test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAG_CONFIG +dnl _LT_CONFIG_COMMANDS ])# AC_LIBTOOL_SETUP + + +## ------------------------------------- ## +## Accumulate code for creating libtool. ## +## ------------------------------------- ## + +# So that we can recreate a full libtool script including additional +# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS +# in macros and then make a single call at the end using the `libtool' +# label. + +# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) +# ---------------------------------------- +# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL_INIT], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_INIT], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_INIT]) + +# _LT_CONFIG_LIBTOOL([COMMANDS]) +# ------------------------------ +# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. +m4_define([_LT_CONFIG_LIBTOOL], +[m4_ifval([$1], + [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], + [$1 +])])]) + +# Initialize. +m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) + +# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) +# --------------------------------------------------- +m4_define([_LT_CONFIG_SAVE_COMMANDS], +[_LT_CONFIG_LIBTOOL([$1]) +_LT_CONFIG_LIBTOOL_INIT([$2]) +]) + +# _LT_CONFIG_COMMANDS +# ------------------- +# Send accumulated output to $CONFIG_STATUS. +m4_define([_LT_CONFIG_COMMANDS], +[AC_CONFIG_COMMANDS([libtool-bogus], + [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_INIT]) +]) + + + # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], @@ -280,9 +333,9 @@ fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift - cat < conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" @@ -759,7 +812,7 @@ int main () exit (status); }] -EOF +_LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? @@ -1625,64 +1678,62 @@ AC_DEFUN([_LT_AC_TAG_CHECK], # _LT_AC_TAG_CONFIG # ----------------- AC_DEFUN([_LT_AC_TAG_CONFIG], -[AC_PROVIDE_IFELSE([AC_LIBTOOL_TAGS],, - [AC_LIBTOOL_TAGS([CXX F77 GCJ RC])]) - -if test -f "$ltmain"; then - if test ! -f "${ofile}"; then - AC_MSG_WARN([output file `$ofile' does not exist]) - fi - - if test -z "$LTCC"; then - eval "`$SHELL ${ofile} --config | grep '^LTCC='`" - if test -z "$LTCC"; then - AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) - else - AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) - fi - fi - - # Extract list of available tagged configurations in $ofile. - # Note that this assumes the entire list is on one line. - available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` - +[AC_PROVIDE_IFELSE([AC_LIBTOOL_TAGS], [], [ + AC_LIBTOOL_TAGS([CXX F77 GCJ RC])])dnl + available_tags="" AC_FOREACH([_LT_TAG], _LT_TAGS, [m4_case(_LT_TAG, [CXX], [_LT_AC_TAG_CHECK([CXX]) - echo appending configuration tag \"CXX\" to $ofile if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG available_tags="$available_tags _LT_TAG" fi], [F77], [_LT_AC_TAG_CHECK(_LT_TAG) - echo appending configuration tag \"_LT_TAG\" to $ofile if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG available_tags="$available_tags _LT_TAG" fi], [GCJ], [_LT_AC_TAG_CHECK(_LT_TAG) - echo appending configuration tag \"_LT_TAG\" to $ofile if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG available_tags="$available_tags _LT_TAG" fi], [RC], [_LT_AC_TAG_CHECK(_LT_TAG) - echo appending configuration tag \"_LT_TAG\" to $ofile - AC_LIBTOOL_LANG_RC_CONFIG - available_tags="$available_tags _LT_TAG"], + if test -n "$RC" && test "X$RC" != "Xno"; then + AC_LIBTOOL_LANG_RC_CONFIG + available_tags="$available_tags _LT_TAG" + fi], [m4_errprintn(m4_location[: error: invalid tag name: ]"_LT_TAG") m4_exit(1)]) ]) - # Now substitute the updated list of available tags. - if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then - mv "${ofile}T" "$ofile" - chmod +x "$ofile" - else - rm -f "${ofile}T" - AC_MSG_ERROR([unable to update list of available tagged configurations.]) - fi -fi + AC_CONFIG_COMMANDS([libtool-tags], [ + if test -f "$ltmain"; then + if test ! -f "${ofile}"; then + AC_MSG_ERROR([output file `$ofile' does not exist]) + fi + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_ERROR([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi + fi + ], [ + libtool='$ofile' + available_tags='$available_tags' + ])dnl ])# _LT_AC_TAG_CONFIG @@ -1861,7 +1912,7 @@ dnl not every word. This closes a longstanding sh security hole. $EGREP "$file_magic_regex" > /dev/null; then : else - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. @@ -1872,7 +1923,7 @@ dnl not every word. This closes a longstanding sh security hole. *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org -EOF +_LT_EOF fi ;; esac fi @@ -2431,6 +2482,9 @@ lt_simple_compile_test_code="int some_variable = 0;\n" lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER +# Save the default compiler, since it gets overwritten when the other +# tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP. +compiler_DEFAULT=$CC # # Check for any special shared library compilation flags. @@ -2477,7 +2531,7 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF($1) -# Report which librarie types wil actually be built +# Report which library types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) @@ -2776,7 +2830,8 @@ case $host_os in # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. + # Determine the default libpath from the value encoded in an empty + # executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" @@ -2787,7 +2842,8 @@ case $host_os in _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else - # Determine the default libpath from the value encoded in an empty executable. + # Determine the default libpath from the value encoded in an + # empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, @@ -3458,11 +3514,11 @@ dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... -ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } -EOF -],[$1],[CXX],[cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF class Foo { public: @@ -3470,23 +3526,23 @@ public: private: int a; }; -EOF -],[$1],[F77],[cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end -EOF -],[$1],[GCJ],[cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; -EOF +_LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. @@ -3783,99 +3839,23 @@ CC="$lt_save_CC" # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], -[# The else clause should only fire when bootstrapping the -# libtool distribution, otherwise you forgot to ship ltmain.sh -# with your package, and you will get complaints that there are -# no rules to generate ltmain.sh. -if test -f "$ltmain"; then - # See if we are running on zsh, and set the options which allow our commands through - # without removal of \ escapes. +[AC_CONFIG_COMMANDS([libtool]$1, [ + # See if we are running on zsh, and set the options which allow our + # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi - # Now quote all the things that may contain metacharacters while being - # careful not to overquote the AC_SUBSTed values. We take copies of the - # variables and quote the copies for generation of the libtool script. - for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL STRIP \ - libname_spec library_names_spec soname_spec extract_expsyms_cmds \ - old_striplib striplib file_magic_cmd finish_cmds finish_eval \ - deplibs_check_method reload_flag reload_cmds need_locks \ - lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ - lt_cv_sys_global_symbol_to_c_name_address \ - sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ - old_postinstall_cmds old_postuninstall_cmds \ - _LT_AC_TAGVAR(compiler, $1) \ - _LT_AC_TAGVAR(CC, $1) \ - _LT_AC_TAGVAR(LD, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ - _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ - _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ - _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ - _LT_AC_TAGVAR(old_archive_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ - _LT_AC_TAGVAR(predep_objects, $1) \ - _LT_AC_TAGVAR(postdep_objects, $1) \ - _LT_AC_TAGVAR(predeps, $1) \ - _LT_AC_TAGVAR(postdeps, $1) \ - _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ - _LT_AC_TAGVAR(archive_cmds, $1) \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ - _LT_AC_TAGVAR(postinstall_cmds, $1) \ - _LT_AC_TAGVAR(postuninstall_cmds, $1) \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ - _LT_AC_TAGVAR(allow_undefined_flag, $1) \ - _LT_AC_TAGVAR(no_undefined_flag, $1) \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ - _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ - _LT_AC_TAGVAR(hardcode_automatic, $1) \ - _LT_AC_TAGVAR(module_cmds, $1) \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) \ - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ - _LT_AC_TAGVAR(exclude_expsyms, $1) \ - _LT_AC_TAGVAR(include_expsyms, $1); do - - case $var in - _LT_AC_TAGVAR(old_archive_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ - _LT_AC_TAGVAR(archive_cmds, $1) | \ - _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(module_cmds, $1) | \ - _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ - _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ - _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ - extract_expsyms_cmds | reload_cmds | finish_cmds | \ - postinstall_cmds | postuninstall_cmds | \ - old_postinstall_cmds | old_postuninstall_cmds | \ - sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) - # Double-quote double-evaled strings. - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" - ;; - *) - eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" - ;; - esac - done - case $lt_echo in - *'\[$]0 --fallback-echo"') - lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` - ;; - esac - -ifelse([$1], [], - [cfgfile="${ofile}T" - trap "$rm \"$cfgfile\"; exit 1" 1 2 15 - $rm -f "$cfgfile" - AC_MSG_NOTICE([creating $ofile])], - [cfgfile="$ofile"]) + ifelse([$1], [], + [cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + AC_MSG_NOTICE([creating $ofile])], + [cfgfile="$ofile" + AC_MSG_NOTICE([appending configuration tag `$1' to $ofile]) + ]) - cat <<__EOF__ >> "$cfgfile" + cat <<_LT_EOF >> "$cfgfile" ifelse([$1], [], [#! $SHELL @@ -4220,12 +4200,12 @@ ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $1]) -__EOF__ +_LT_EOF ifelse([$1],[], [ case $host_os in aix3*) - cat <<\EOF >> "$cfgfile" + cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems @@ -4234,7 +4214,7 @@ if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi -EOF +_LT_EOF ;; esac @@ -4248,12 +4228,204 @@ EOF (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) -else - # If there is no Makefile yet, we rely on a make rule to execute - # `config.status --recheck' to rerun these tests and create the - # libtool script then. - test -f Makefile && make "$ltmain" -fi +], +[ifelse([$1], [], [ + rm="$rm" + PACKAGE="$PACKAGE" + VERSION="$VERSION" + TIMESTAMP="$TIMESTAMP" + ltmain="$ltmain" + ofile="$ofile" + sed_quote_subst='$sed_quote_subst' + double_quote_subst='$double_quote_subst' + delay_variable_subst='$delay_variable_subst' + SED="$SED" + Xsed="$Xsed" + + SHELL='$SHELL' + enable_shared='$enable_shared' + enable_static='$enable_static' + enable_fast_install='$enable_fast_install' + host_alias='$host_alias' + host='$host' + echo='$echo' + AR='$AR' + AR_FLAGS='$AR_FLAGS' + LTCC='$LTCC' + EGREP='$EGREP' + LN_S='$LN_S' + NM='$NM' + STRIP='$STRIP' + MAGIC_CMD='$MAGIC_CMD' + DLLTOOL='$DLLTOOL' + OBJDUMP='$OBJDUMP' + AS='$AS' + objdir='$objdir' + reload_flag='$reload_flag' + reload_cmds='$reload_cmds' + ac_objext='$ac_objext' + libext='$libext' + shrext='$shrext' + exeext='$exeext' + pic_mode='$pic_mode' + lt_cv_sys_max_cmd_len='$lt_cv_sys_max_cmd_len' + need_locks='$need_locks' + need_lib_prefix='$need_lib_prefix' + need_version='$need_version' + enable_dlopen='$enable_dlopen' + enable_dlopen_self='$enable_dlopen_self' + enable_dlopen_self_static='$enable_dlopen_self_static' + version_type='$version_type' + libname_spec='$libname_spec' + library_names_spec='$library_names_spec' + soname_spec='$soname_spec' + RANLIB='$RANLIB' + old_postinstall_cmds='$old_postinstall_cmds' + old_postuninstall_cmds='$old_postuninstall_cmds' + postinstall_cmds='$postinstall_cmds' + postuninstall_cmds='$postuninstall_cmds' + striplib='$striplib' + old_striplib='$old_striplib' + deplibs_check_method='$deplibs_check_method' + file_magic_cmd='$file_magic_cmd' + finish_cmds='$finish_cmds' + finish_eval='$finish_eval' + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe" + lt_cv_sys_global_symbol_to_cdecl="$lt_cv_sys_global_symbol_to_cdecl" + lt_cv_sys_global_symbol_to_c_name_address=`echo "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$sed_quote_subst" -e 's,^,",;s,$,",'` + runpath_var='$runpath_var' + shlibpath_var='$shlibpath_var' + hardcode_into_libs='$hardcode_into_libs' + shlibpath_overrides_runpath='$shlibpath_overrides_runpath' + variables_saved_for_relink='$variables_saved_for_relink' + sys_lib_search_path_spec='$sys_lib_search_path_spec' + sys_lib_dlsearch_path_spec='$sys_lib_dlsearch_path_spec' + extract_expsyms_cmds='$extract_expsyms_cmds' + + dnl ## --------------------------------------- ## + dnl ## Carefully restore the default compiler. ## + dnl ## --------------------------------------- ## + compiler='$compiler_DEFAULT'], + [_LT_AC_TAGVAR(compiler, $1)='$_LT_AC_TAGVAR(compiler, $1)']) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)='$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)='$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)' + _LT_AC_TAGVAR(GCC, $1)='$_LT_AC_TAGVAR(GCC, $1)' + _LT_AC_TAGVAR(LD, $1)='$_LT_AC_TAGVAR(LD, $1)' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)' + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)='$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)' + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)='$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='$_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$_LT_AC_TAGVAR(whole_archive_flag_spec, $1)' + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)='$_LT_AC_TAGVAR(thread_safe_flag_spec, $1)' + _LT_AC_TAGVAR(old_archive_cmds, $1)='$_LT_AC_TAGVAR(old_archive_cmds, $1)' + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='$_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)' + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)='$_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)' + _LT_AC_TAGVAR(archive_cmds, $1)='$_LT_AC_TAGVAR(archive_cmds, $1)' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$_LT_AC_TAGVAR(archive_expsym_cmds, $1)' + _LT_AC_TAGVAR(module_cmds, $1)='$_LT_AC_TAGVAR(module_cmds, $1)' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='$_LT_AC_TAGVAR(module_expsym_cmds, $1)' + _LT_AC_TAGVAR(predep_objects, $1)='$_LT_AC_TAGVAR(predep_objects, $1)' + _LT_AC_TAGVAR(postdep_objects, $1)='$_LT_AC_TAGVAR(postdep_objects, $1)' + _LT_AC_TAGVAR(predeps, $1)='$_LT_AC_TAGVAR(predeps, $1)' + _LT_AC_TAGVAR(postdeps, $1)='$_LT_AC_TAGVAR(postdeps, $1)' + _LT_AC_TAGVAR(compiler_lib_search_path, $1)='$_LT_AC_TAGVAR(compiler_lib_search_path, $1)' + _LT_AC_TAGVAR(allow_undefined_flag, $1)='$_LT_AC_TAGVAR(allow_undefined_flag, $1)' + _LT_AC_TAGVAR(no_undefined_flag, $1)='$_LT_AC_TAGVAR(no_undefined_flag, $1)' + _LT_AC_TAGVAR(hardcode_action, $1)='$_LT_AC_TAGVAR(hardcode_action, $1)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='$_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)='$_LT_AC_TAGVAR(hardcode_libdir_separator, $1)' + _LT_AC_TAGVAR(hardcode_direct, $1)='$_LT_AC_TAGVAR(hardcode_direct, $1)' + _LT_AC_TAGVAR(hardcode_minus_L, $1)='$_LT_AC_TAGVAR(hardcode_minus_L, $1)' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)='$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)' + _LT_AC_TAGVAR(hardcode_automatic, $1)='$_LT_AC_TAGVAR(hardcode_automatic, $1)' + _LT_AC_TAGVAR(link_all_deplibs, $1)='$_LT_AC_TAGVAR(link_all_deplibs, $1)' + _LT_AC_TAGVAR(fix_srcfile_path, $1)='$_LT_AC_TAGVAR(fix_srcfile_path, $1)' + _LT_AC_TAGVAR(always_export_symbols, $1)='$_LT_AC_TAGVAR(always_export_symbols, $1)' + _LT_AC_TAGVAR(export_symbols_cmds, $1)=`echo "$_LT_AC_TAGVAR(export_symbols_cmds, $1)" | $Xsed -e "$sed_quote_subst" -e 's,^,",;s,$,",'` + _LT_AC_TAGVAR(exclude_expsyms, $1)='$_LT_AC_TAGVAR(exclude_expsyms, $1)' + _LT_AC_TAGVAR(include_expsyms, $1)='$_LT_AC_TAGVAR(include_expsyms, $1)' + + + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in ifelse([$1], [], + [SED SHELL echo AR AR_FLAGS LTCC EGREP RANLIB LN_S NM STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ +])dnl + _LT_AC_TAGVAR(compiler, $1) \ + _LT_AC_TAGVAR(CC, $1) \ + _LT_AC_TAGVAR(LD, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ + _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ + _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ + _LT_AC_TAGVAR(old_archive_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ + _LT_AC_TAGVAR(predep_objects, $1) \ + _LT_AC_TAGVAR(postdep_objects, $1) \ + _LT_AC_TAGVAR(predeps, $1) \ + _LT_AC_TAGVAR(postdeps, $1) \ + _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ + _LT_AC_TAGVAR(archive_cmds, $1) \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ + _LT_AC_TAGVAR(postinstall_cmds, $1) \ + _LT_AC_TAGVAR(postuninstall_cmds, $1) \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ + _LT_AC_TAGVAR(allow_undefined_flag, $1) \ + _LT_AC_TAGVAR(no_undefined_flag, $1) \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ + _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ + _LT_AC_TAGVAR(hardcode_automatic, $1) \ + _LT_AC_TAGVAR(module_cmds, $1) \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) \ + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ + _LT_AC_TAGVAR(exclude_expsyms, $1) \ + _LT_AC_TAGVAR(include_expsyms, $1); do + + case \$var in \ + _LT_AC_TAGVAR(old_archive_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ + _LT_AC_TAGVAR(archive_cmds, $1) | \ + _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(module_cmds, $1) | \ + _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ + _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_\$var=\\\\\"\\\`\\\$echo \"X\\\$\$var\" | \\\$Xsed -e \"\\\$double_quote_subst\" -e \"\\\$sed_quote_subst\" -e \"\\\$delay_variable_subst\"\\\`\\\\\"" + ;; + *) + eval "lt_\$var=\\\\\"\\\`\\\$echo \"X\\\$\$var\" | \\\$Xsed -e \"\\\$sed_quote_subst\"\\\`\\\\\"" + ;; + esac + done + + case \$lt_echo in + *'\\\[$]0 --fallback-echo"') + lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` + ;; + esac +]) ])# AC_LIBTOOL_CONFIG @@ -4356,7 +4528,7 @@ for ac_symprfx in "" "_"; do pipe_works=no rm -f conftest* - cat > conftest.$ac_ext < conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif @@ -4366,7 +4538,7 @@ void nm_test_func(){} } #endif int main(){nm_test_var='a';nm_test_func();return(0);} -EOF +_LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. @@ -4382,16 +4554,16 @@ EOF # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then - cat < conftest.$ac_ext + cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif -EOF +_LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' - cat <> conftest.$ac_ext + cat <<_LT_EOF >> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else @@ -4406,16 +4578,16 @@ const struct { } lt_preloaded_symbols[[]] = { -EOF +_LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext - cat <<\EOF >> conftest.$ac_ext + cat <<\_LT_EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif -EOF +_LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" @@ -5016,7 +5188,7 @@ ifelse([$1],[CXX],[ # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. @@ -5024,7 +5196,7 @@ ifelse([$1],[CXX],[ *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. -EOF +_LT_EOF fi ;; @@ -5093,7 +5265,7 @@ EOF solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <&2 + cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool @@ -5102,7 +5274,7 @@ EOF *** your PATH or compiler configuration so that the native linker is *** used, and then restart. -EOF +_LT_EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' @@ -5244,17 +5416,19 @@ EOF # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty executable. + # Determine the default libpath from the value encoded in an + # empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else + else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else - # Determine the default libpath from the value encoded in an empty executable. + # Determine the default libpath from the value encoded in an + # empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, diff --git a/tests/demo/configure.ac b/tests/demo/configure.ac index e51b12c8d..68d008890 100644 --- a/tests/demo/configure.ac +++ b/tests/demo/configure.ac @@ -49,15 +49,14 @@ AC_LIBTOOL_WIN32_DLL AM_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) -if ./libtool --features | grep '^enable static libraries$' > /dev/null 2>&1; then - STATIC=-static -else - STATIC= -fi +STATIC= +test "X$enable_static" = Xyes && STATIC=-static AC_SUBST([STATIC]) -AM_CONDITIONAL([BINARY_HELLDL], - [grep '^global_symbol_pipe=..*$' ./libtool >/dev/null]) +case $lt_cv_sys_global_symbol_pipe in + ?*) binary_helldl=yes ;; +esac +AM_CONDITIONAL([BINARY_HELLDL], [test "X$binary_helldl" = Xyes]) ## ---------------------------- ## diff --git a/tests/pdemo/configure.ac b/tests/pdemo/configure.ac index bf880ee29..099454363 100644 --- a/tests/pdemo/configure.ac +++ b/tests/pdemo/configure.ac @@ -47,15 +47,14 @@ AC_LIBTOOL_DLOPEN AM_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) -if ${CONFIG_SHELL} ./libtool --features | grep "enable static" >/dev/null; then - STATIC=-static -else - STATIC= -fi +STATIC= +test "X$enable_static" = Xyes && STATIC=-static AC_SUBST([STATIC]) -AM_CONDITIONAL([BINARY_HELLDL], - [grep '^global_symbol_pipe=..*$' ./libtool >/dev/null]) +case $lt_cv_sys_global_symbol_pipe in + ?*) binary_helldl=yes ;; +esac +AM_CONDITIONAL([BINARY_HELLDL], [test "X$binary_helldl" = Xyes]) ## ---------------------------- ## -- 2.47.2