libtool cleanups
authorTom Tromey <tromey@redhat.com>
Fri, 22 Nov 1996 07:25:41 +0000 (07:25 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 22 Nov 1996 07:25:41 +0000 (07:25 +0000)
ChangeLog
NEWS
TODO
automake.in
configure
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/stdlib.test [new file with mode: 0755]

index e98ab4a..884ee44 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 22 00:01:45 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (handle_lib_objects): Fixed error message
+       processing.
+
 Thu Nov 21 22:29:30 1996  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (scan_configure): AC_FUNC_FNMATCH doesn't add to
@@ -27,6 +32,12 @@ Tue Nov 19 19:03:30 1996  Tom Tromey  <tromey@cygnus.com>
        output_rules.
        (handle_footer): Put .SUFFIXES into output_header, for AIX.
 
+Mon Nov 18 19:11:53 1996  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
+
+       * automake.in: Added a lot of libtool support.  New variable
+       prog_LDFLAGS to pass linker flags.  Use libtoolize to install
+       libtool support files.
+
 Mon Nov 18 13:29:55 1996  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (handle_lib_objects): Push @LIBOBJS@ and @ALLOCA@
@@ -62,12 +73,6 @@ Fri Nov 15 18:58:04 1996  Tom Tromey  <tromey@cygnus.com>
        files.
        (pretty_print_internal): Initialize $bol depending on the column.
 
-Mon Nov 18 19:11:53 1996  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
-
-       * automake.in: Added a lot of libtool support.  New variable
-       prog_LDFLAGS to pass linker flags.  Use libtoolize to install
-       libtool support files.
-
 Fri Nov 15 16:22:15 1996  Gordon Matzigkeit  <gord@gnu.ai.mit.edu>
 
        * library.am: Fixed references to LIBRARY according to new scheme.
diff --git a/NEWS b/NEWS
index 9d7143f..37dab64 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,9 @@ New in 1.1h:
 * OMIT_DEPENDENCIES can now hold list of dependencies to be omitted
   when making distribution.  Some dependencies are auto-ignored.
 * Changed how libraries are specified in _LIBRARIES variable
+* Full libtool support, from Gord Matzigkeit
+* No longer have to explicitly touch stamp-h when using AC_CONFIG_HEADER;
+  AM_CONFIG_HEADER handles it automatically
 \f
 New in 1.0:
 * Bug fixes
diff --git a/TODO b/TODO
index 60ce502..ad9c7e3 100644 (file)
--- a/TODO
+++ b/TODO
@@ -6,6 +6,16 @@ Priorities for release:
 * `missing' program
 * copyrights on m4 files, aclocal output
 
+* for new autoconf:
+  * completely handle multi-":" mode for AC_CONFIG_HEADER
+  * Scan multiple input files when Makefile is generated?
+    This would provide flexibility for large projects
+  * figure out what to pass as CONFIG_HEADER to config.status
+
+* look @ jim's $(t:=foo) problem
+
+================================================================
+
 * only remove libtool at top level?
 
 * clean up source directory by moving stuff into subdirs
@@ -13,12 +23,6 @@ Priorities for release:
 * consider adding pkglibexecdir, maybe others?
   requests for pkg-dirs with version included
 
-* for new autoconf:
-  * completely handle multi-":" mode for AC_CONFIG_HEADER
-  * Scan multiple input files when Makefile is generated?
-    This would provide flexibility for large projects
-  * figure out what to pass as CONFIG_HEADER to config.status
-
 Fix ansi2knr so that knr-style function decls aren't incorrectly
 rewritten.  Or, fix automake so that not all sources in a directory
 must be ansi.  Should also fix things so that a separate ._o file is
index 19bc1ac..b06fabb 100755 (executable)
@@ -1075,23 +1075,19 @@ sub handle_lib_objects
 
     foreach $lsearch (&variable_value_as_list ($var))
     {
-       # Skip -lfoo and -Ldir.
+       # Skip -lfoo and -Ldir; these are explicitly allowed.
        next if $lsearch =~ /^-[lL]/;
        if (! $flagvar && $lsearch =~ /^-/)
        {
            if ($var =~ /^(.*)LDADD$/)
            {
-               $flagvar = $1 . 'LDFLAGS';
-           }
-           if ($flagvar)
-           {
-               &am_line_error ($var, "linker flags such as \`$lsearch' belong in $flagvar");
+               &am_line_error ($var, "linker flags such as \`$lsearch' belong in \`${1}LDFLAGS");
            }
            else
            {
                # Only get this error once.
                $flagvar = 1;
-               &am_line_error ($var, "you cannot use linker flags such as \`$lsearch' in $var");
+               &am_line_error ($var, "you cannot use linker flags such as \`$lsearch' in \`$var'");
            }
        }
 
@@ -1322,8 +1318,9 @@ sub handle_libraries
        if ($onelib !~ /^lib.*\.a$/)
        {
            # FIXME this should only be a warning for foreign packages
-           &am_line_error ($onelib . $xt,
-                           "\`$onelib' is not a standard library name");
+           # FIXME should put line number here.  That means mapping
+           # from library name back to variable name.
+           &am_error ("\`$onelib' is not a standard library name");
        }
 
        local ($obj) = &get_object_extension ($onelib);
@@ -2393,7 +2390,7 @@ sub handle_configure
        if ($local =~ /^(.*):(.*)$/)
        {
            # This is the ":" syntax of AC_OUTPUT.
-           @inputs = split (':', $2)
+           @inputs = split (':', $2);
            $local = $1;
        }
        else
index f582014..b9073e9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 # Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.10 
+# Generated automatically using autoconf version 2.11.2 
 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
 #
 # This configure script is free software; the Free Software Foundation
@@ -49,6 +49,8 @@ mandir='${prefix}/man'
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
 
 ac_prev=
 for ac_option
@@ -330,7 +332,7 @@ EOF
     verbose=yes ;;
 
   -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.10"
+    echo "configure generated by autoconf version 2.11.2"
     exit 0 ;;
 
   -with-* | --with-*)
@@ -432,11 +434,14 @@ do
 done
 
 # NLS nuisances.
-# Only set LANG and LC_ALL to C if already set.
-# These must not be set unconditionally because not all systems understand
-# e.g. LANG=C (notably SCO).
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -rf conftest* confdefs.h
@@ -498,6 +503,7 @@ ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
 
 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@@ -543,11 +549,12 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:553: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
-    IFS="${IFS=        }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
   for ac_dir in $PATH; do
     # Account for people who put trailing slashes in PATH elements.
     case "$ac_dir/" in
@@ -570,7 +577,7 @@ else
       ;;
     esac
   done
-  IFS="$ac_save_ifs"
+  IFS="$ac_save_IFS"
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
@@ -608,6 +615,7 @@ cat >> confdefs.h <<EOF
 EOF
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:619: checking whether build environment is sane" >&5
 echo timestamp > conftestfile
 # Do this in a subshell so we don't clobber the current shell's
 # arguments.  FIXME: maybe try `-L' hack like GETLOADAVG test?
@@ -641,7 +649,8 @@ test "$program_suffix" != NONE &&
 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | tr './\055' '___'`
+echo "configure:653: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -670,6 +679,7 @@ fi
 # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:683: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -719,11 +729,25 @@ cat > confcache <<\EOF
 # --recheck option to rerun configure.
 #
 EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
 # Ultrix sh set writes to stderr and can't be redirected directly,
 # and sets the high bit in the cache file unless we assign to the vars.
 (set) 2>&1 |
-  sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
-  >> confcache
+  case `(ac_space=' '; set) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
 if cmp -s $cache_file confcache; then
   :
 else
@@ -790,7 +814,7 @@ do
     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.10"
+    echo "$CONFIG_STATUS generated by autoconf version 2.11.2"
     exit 0 ;;
   -help | --help | --hel | --he | --h)
     echo "\$ac_cs_usage"; exit 0 ;;
@@ -841,20 +865,56 @@ s%@PERL@%$PERL%g
 
 CEOF
 EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
 cat >> $CONFIG_STATUS <<EOF
 
 CONFIG_FILES=\${CONFIG_FILES-"Makefile automake aclocal m4/Makefile tests/Makefile"}
 EOF
 cat >> $CONFIG_STATUS <<\EOF
 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile]", defaulting infile="outfile.in".
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
   case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
   *) ac_file_in="${ac_file}.in" ;;
   esac
 
-  # Adjust relative srcdir, etc. for subdirectories.
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
 
   # Remove last slash and all that follows it.  Not all systems have dirname.
   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
@@ -882,6 +942,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
   [/$]*) INSTALL="$ac_given_INSTALL" ;;
   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
   esac
+
   echo creating "$ac_file"
   rm -f "$ac_file"
   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
@@ -890,16 +951,22 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
 # $configure_input" ;;
   *) ac_comsub= ;;
   esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
   sed -e "$ac_comsub
 s%@configure_input@%$configure_input%g
 s%@srcdir@%$srcdir%g
 s%@top_srcdir@%$top_srcdir%g
 s%@INSTALL@%$INSTALL%g
-" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
 fi; done
-rm -f conftest.subs
+rm -f conftest.s*
 
+EOF
+cat >> $CONFIG_STATUS <<EOF
 
+EOF
+cat >> $CONFIG_STATUS <<\EOF
 chmod +x automake aclocal
 exit 0
 EOF
index 08305c4..8aefc52 100644 (file)
@@ -1,3 +1,7 @@
+Fri Nov 22 00:10:04 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * stdlib.test: New file.
+
 Thu Nov 21 22:51:35 1996  Tom Tromey  <tromey@cygnus.com>
 
        * confsub.test: Use AM_CONFIG_HEADER.
index 8ac21b0..9cf97c4 100644 (file)
@@ -18,6 +18,6 @@ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
 confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
-ranlib.test confvar.test confvar2.test
+ranlib.test confvar.test confvar2.test stdlib.test
 
 EXTRA_DIST = defs $(TESTS)
index 6b96422..5f35989 100644 (file)
@@ -57,7 +57,7 @@ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
 confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
-ranlib.test confvar.test confvar2.test
+ranlib.test confvar.test confvar2.test stdlib.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -74,6 +74,7 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
 TAR = tar
 default: all
 
+.SUFFIXES:
 
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in
        cd $(top_srcdir) && automake --strictness=gnits $(subdir)/Makefile
@@ -168,7 +169,6 @@ install-exec install-data install uninstall all installdirs \
 mostlyclean-generic distclean-generic clean-generic \
 maintainer-clean-generic clean mostlyclean distclean maintainer-clean
 
-.SUFFIXES:
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/stdlib.test b/tests/stdlib.test
new file mode 100755 (executable)
index 0000000..5e8031a
--- /dev/null
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Test "not a standard library" error.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = foo
+END
+
+$AUTOMAKE 2> output.log && exit 1
+# We're specifically testing for line-number information.
+# Well, when it is implemented.
+# grep 1 output.log
+exit 0