libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23-gary-eliminate-double-configure-at-bootstrap.patch


From: Gary V. Vaughan
Subject: Re: 23-gary-eliminate-double-configure-at-bootstrap.patch
Date: Tue, 21 Oct 2003 12:23:50 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 Thunderbird/0.3

Peter O'Gorman wrote:
Peter O'Gorman wrote:

Gary V. Vaughan wrote:

This is a work in progress really. I am trying to get libtool, when bootstrap from fresh CVS, to not reconfigure itself at the make step. This patch is almost there, but my head is about to explode with the multi-level quoting required.

This is, however, a significant improvement over HEAD and generates a correct and complete libtool script (including tags) in a single pass. I'd like to commit this patch as a milestone, and pick away at refactoring it into the new macros so that libtool can be remade from a single AC_CONFIG_COMMANDS tag.

Comments?



Well, I would suggest a branch, but if it continues to bootstrap correctly, I see no need. Haven't tried it to verify that though :).


Having now actually tried this patch, I'll have to reverse myself. make check no fails on darwin (and likely loads of other machines) because some of the tests configure scripts attemt to run the generated libtool script to get at settings. This no longer works because libtool is not generated yet, it is generated at the same time as the Makefiles are by config.status, which makes running the libtool script in configure in order to change the generated Makefiles a noop (unless you run configure twice, but that is hardly an option). This is a major behavioral change which, in my opinion, should not go into HEAD yet.

Argh! I had no idea we were doing that!!! Why fork and exec to run a command to find the value of a variable you already have (otherwise we wouldn't be able to generate that value in the libtool script in the first place), when we could just test the value of the variable directly? :-/

I guess this is a relic from the days of ltconfig, when configure could not see the variable values without peeking at the file.

Please put it in a branch.

No need.  Here is a revised version which passes all tests again.

Cheers,
        Gary.
--
  ())_.  Gary V. Vaughan    gary@(lilith.warpmail.net|gnu.org)
  ( '/   Research Scientist http://www.oranda.demon.co.uk       ,_())____
  / )=   GNU Hacker         http://www.gnu.org/software/libtool  \'      `&
`(_~)_   Tech' Author       http://sources.redhat.com/autobook   =`---d__/
Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>
        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.

2003-10-21  Gary V. Vaughan  <address@hidden>

Index: Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/Makefile.am,v
retrieving revision 1.72
diff -u -p -u -r1.72 Makefile.am
--- Makefile.am 14 Oct 2003 21:45:01 -0000 1.72
+++ Makefile.am 21 Oct 2003 11:17:33 -0000
@@ -40,22 +40,15 @@ 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%@""address@hidden" $(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 =
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.7
diff -u -p -u -r1.7 libtool.m4
--- m4/libtool.m4 17 Oct 2003 03:52:01 -0000 1.7
+++ m4/libtool.m4 21 Oct 2003 11:17:33 -0000
@@ -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 <address@hidden>, 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 <<EOF
+  cat <<_LT_EOF
 [$]*
-EOF
+_LT_EOF
   exit 0
 fi
 
@@ -698,7 +751,7 @@ if test "$cross_compiling" = yes; then :
 else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
+  cat > 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 longs
            $EGREP "$file_magic_regex" > /dev/null; then
            :
          else
-           cat <<EOF 1>&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 longs
 *** may want to report the problem to your system manager and/or to
 *** address@hidden
 
-EOF
+_LT_EOF
          fi ;;
        esac
       fi
@@ -2431,6 +2482,9 @@ lt_simple_compile_test_code="int some_va
 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 fo
 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 <<EOF
+ifelse([$1],[],[cat > conftest.$ac_ext <<_LT_EOF
 int a;
 void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+_LT_EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<_LT_EOF
 class Foo
 {
 public:
@@ -3470,23 +3526,23 @@ public:
 private:
   int a;
 };
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+_LT_EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<_LT_EOF
       subroutine foo
       implicit none
       integer*4 a
       a=0
       return
       end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+_LT_EOF
+],[$1],[GCJ],[cat > 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;
   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 <<EOF
+  cat > 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 <<EOF > 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 <<EOF >> 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 <<EOF 1>&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 <<EOF 1>&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,
Index: tests/demo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/demo/configure.ac,v
retrieving revision 1.2
diff -u -p -u -r1.2 configure.ac
--- tests/demo/configure.ac 21 Oct 2003 10:56:23 -0000 1.2
+++ tests/demo/configure.ac 21 Oct 2003 11:17:33 -0000
@@ -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])
 
 
 ## ---------------------------- ##
Index: tests/f77demo/config.h
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/f77demo/config.h,v
retrieving revision 1.2
diff -u -p -u -r1.2 config.h
--- tests/f77demo/config.h 15 Oct 2003 16:02:04 -0000 1.2
+++ tests/f77demo/config.h 21 Oct 2003 11:17:33 -0000
@@ -1,7 +1,7 @@
 /* config.h.  Generated by configure.  */
 /* config-h.in.  Generated from configure.ac by autoheader.  */
 
-/* Define to dummy `main' function (if any) required to link to the Fortran 77
+/* Define to dummy `main' function (if any) required to link to the Fortran
    libraries. */
 /* #undef F77_DUMMY_MAIN */
 
@@ -11,6 +11,9 @@
 
 /* As F77_FUNC, but for C identifiers containing underscores. */
 #define F77_FUNC_(name,NAME) name ## __
+
+/* Define if F77 and FC dummy `main' functions are identical. */
+/* #undef FC_DUMMY_MAIN_EQ_F77 */
 
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #define HAVE_DLFCN_H 1
Index: tests/pdemo/configure.ac
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/pdemo/configure.ac,v
retrieving revision 1.2
diff -u -p -u -r1.2 configure.ac
--- tests/pdemo/configure.ac 21 Oct 2003 10:56:24 -0000 1.2
+++ tests/pdemo/configure.ac 21 Oct 2003 11:17:33 -0000
@@ -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])
 
 
 ## ---------------------------- ##

reply via email to

[Prev in Thread] Current Thread [Next in Thread]