Thu Mar 28 08:33:21 1996 Tom Tromey <tromey@creche.cygnus.com>
+ * automake.in (require_conf_file_with_conf_line): Yet another
+ function of this form.
+ (libtool_line): New variable.
+ (handle_libraries): Handle libtool.
+
+ * libraries-vars.am: Removed.
+
+ * automake.in (seen_libtool): New variable.
+ (scan_configure): Look for gm_PROG_LIBTOOL or AC_PROG_LIBTOOL.
+
* automake.in (handle_dist_worker): Handle dist-local.
* Makefile.am (maintainer-check): Do "make check" after all syntax
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
compile.am data.am depend.am \
dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am libraries-vars.am \
+kr-vars.am \
libraries.am library.am mans-vars.am \
program.am programs.am remake-hdr.am \
remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
compile.am data.am depend.am \
dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am libraries-vars.am \
+kr-vars.am \
libraries.am library.am mans-vars.am \
program.am programs.am remake-hdr.am \
remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
* AC_ARG_PROGRAM only required when an actual program exists
* dist-local target now run before distribution packaged up; idea from
Dieter Baron.
+* Preliminary (unfinished) support for libtool
\f
New in 0.31:
* Bug fixes
This will allow the callers to be a little smarter.
* Rewrite clean targets.
* Must rewrite error handling code. Right now it is a real mess
+ Should fix up require_file junk at the same time
+
+Things to finish libtool support:
+* Handle grody compilation issue
+* Handle install changes
+* Handle clean changes
+* New definition for LINK
Currently gettext requires @INTLSUB@ and @POSUB@ in SUBDIRS. In the
future this will be just intl and po. When that happens, re-enable
warnings in handle_subdirs.
-Consider supporting guile-style PLUGIN directories automatically?
-
-Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
-code to make directory foo at dist time
-
-Consider putting ansi2knr in AC_CONFIG_AUX_DIR
-
Check to make sure various scripts are executable (IE when looking for
them in a directory)
Jim Meyering says just rely on configure to make links as appropriate.
Maybe introduce syntax like this:
AUTOMAKE_OPTIONS = ../ansi2knr
-?
+? Consider putting it into AC_CONFIG_AUX_DIR
Lex, yacc support:
* It would be nice to automatically support using bison's better features
* Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
* Must handle SUBDIRS in subdir Makefile.am's
+These can both be handled via dist-local:
+. Consider supporting guile-style PLUGIN directories automatically?
+. Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
+ code to make directory foo at dist time
+
================================================================
Document:
* Should support standalone library along with subdir library in same
Makefile.am. Maybe: turn off "standalone" mode if library's Makefile.am
is not only one specd? [ add an option for this ]
-* Need a way to handle shared libraries.
- It would be really interesting to be able to easily (as the end-user)
- make many different versions of the library: shared, static, profiling,
- debug, optimized...
- How does Perl handle this? How does glibc handle this?
- This needs autoconf support
-
-Some examples to keep in mind while doing this:
-* readline
-* kpathsea
-
-Gord Matzigkeit is doing work on this issue, mostly from the Autoconf
-side of things.
================================================================
# TRUE if we've seen AC_ARG_PROGRAM.
$seen_arg_prog = 0;
+# TRUE if we've seen gm_PROG_LIBTOOL or AC_PROG_LIBTOOL.
+$seen_libtool = 0;
+$libtool_line = 0;
+
# Charsets used by maintainer and in distribution. MAINT_CHARSET is
# handled in a funny way: if seen in the top-level Makefile.am, it is
# used for every directory which does not specify a different value.
'lib', 'pkglib', 'noinst', 'check');
return if ! @liblist;
- if (! $seen_ranlib)
+ if ($seen_libtool)
+ {
+ # libtool requires some files.
+ &require_conf_file_with_conf_line ($libtool_line, $FOREIGN,
+ 'config.sub', 'config.guess',
+ 'libtool');
+ }
+ elsif (! $seen_ranlib)
{
# FIXME need am_line_error here. But we don't know which
# variable exists. Must add a loop... No. Must have
# am_install_var return a hash. Otherwise the user could add
# install directories that we'd never find.
- &am_error ("building a library but \`AC_PROG_RANLIB' not in configure.in");
+ &am_error ("library requires either \`AC_PROG_RANLIB' or `gm_PROG_LIBTOOL' in configure.in");
# Only get this error once.
$seen_ranlib = 1;
}
{
&pretty_print ('LIBFILES = ', "", @liblist);
}
- $output_vars .= &file_contents ('libraries-vars');
+
+ if ($seen_libtool)
+ {
+ $output_vars .= ('AR = $(LIBTOOL) archive' . "\n"
+ . 'RANLIB = $(LIBTOOL) ranlib' . "\n"
+ . 'LCOMPILE = $(LIBTOOL) compile $(DEFS) $(INCLUDES)'
+ . ' $(CPPFLAGS) $(CFLAGS)' . "\n");
+ }
+ else
+ {
+ $output_vars .= ('AR = ar' . "\n"
+ . 'RANLIB = @RANLIB@' . "\n");
+ }
}
# Handle scripts.
$seen_prog_install = 2 if ! $seen_prog_install && /fp_PROG_INSTALL/;
$seen_arg_prog = 1 if /AC_ARG_PROGRAM/;
$seen_ranlib = 1 if /AC_PROG_RANLIB/;
+
+ if (/AC_PROG_LIBTOOL/ || /gm_PROG_LIBTOOL/)
+ {
+ $seen_libtool = 1;
+ $libtool_line = $.;
+ }
}
# Set input files if not specified by user.
}
}
-# Assumes that the line number is in configure.in.
+# Assumes that the line number is in Makefile.am.
sub require_conf_file_with_line
+{
+ @require_file_paths = @config_aux_path;
+ &require_file_internal (0, @_);
+ local ($dir) = $require_file_paths[0];
+ @config_aux_path = @require_file_paths;
+ if ($dir eq '.')
+ {
+ $config_aux_dir = '.';
+ }
+ else
+ {
+ $config_aux_dir = '$(top_srcdir)/' . $dir;
+ }
+}
+
+# Assumes that the line number is in Makefile.am.
+sub require_conf_file_with_conf_line
{
@require_file_paths = @config_aux_path;
&require_file_internal (1, @_);
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
compile.am data.am depend.am \
dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am libraries-vars.am \
+kr-vars.am \
libraries.am library.am mans-vars.am \
program.am programs.am remake-hdr.am \
remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
+++ /dev/null
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-## 02111-1307, USA.
-AR = ar
-RANLIB = @RANLIB@