From: Akim Demaille Date: Mon, 8 Oct 2001 08:27:15 +0000 (+0000) Subject: * bin/autoreconf.in (autoreconf): Run libtoolize when appropriate. X-Git-Tag: AUTOCONF-2.52f~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=218609130b7e215313ba2a320fcdb1e1a969b3db;p=thirdparty%2Fautoconf.git * bin/autoreconf.in (autoreconf): Run libtoolize when appropriate. --- diff --git a/ChangeLog b/ChangeLog index 98eac8dfe..1cb05a4ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2001-10-08 Akim Demaille + + * bin/autoreconf.in (autoreconf): Run libtoolize when appropriate. + 2001-10-08 Akim Demaille * doc/autoconf.texi (autoreconf Invocation): Adjust. diff --git a/NEWS b/NEWS index dbef94b06..eaac11bc6 100644 --- a/NEWS +++ b/NEWS @@ -38,7 +38,7 @@ No longer passes --cygnus, --foreign, --gnits, --gnu, --include-deps: automake options are to be given via AUTOMAKE_OPTIONS. - autoreconf - Runs gettextize when appropriate. + Runs gettextize and libtoolize when appropriate. ** Bug fixes - The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures. diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 885dbf431..bc8b9910e 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -45,13 +45,13 @@ use strict; # ----- $help = "Usage: $0 [OPTION] ... [TEMPLATE-FILE] -Run `autoconf' (and `autoheader', `aclocal', `automake' and -`gettextize', where appropriate) repeatedly to remake the GNU Build +Run `autoconf' (and `autoheader', `aclocal', `automake', `gettextize', +and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their -predecessors. If you install a new version of GNU Build System -components, running `autoreconf' remakes all of the files by giving it -the `--force' option. +predecessors. If you install new versions of the GNU Build System, +running `autoreconf' remakes all of the files by giving it the +`--force' option. Operation modes: -h, --help print this help, then exit @@ -73,8 +73,8 @@ Library directories: Unless specified, heuristics try to compute `M4DIR' from the `Makefile.am', or defaults to `m4' if it exists. -The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, and ACLOCAL -are honored. +The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL, +GETTEXTIZE, LIBTOOLIZE are honored. Report bugs to . "; @@ -94,7 +94,8 @@ my $autoconf = $ENV{'AUTOCONF'} || '@autoconf-name@'; my $autoheader = $ENV{'AUTOHEADER'} || '@autoheader-name@'; my $automake = $ENV{'AUTOMAKE'} || 'automake'; my $aclocal = $ENV{'ACLOCAL'} || 'aclocal'; -my $gettextize = $ENV{'GETTEXTIZE'} || 'gettexize'; +my $libtoolize = $ENV{'LIBTOOLIZE'} || 'libtoolize'; +my $gettextize = $ENV{'GETTEXTIZE'} || 'gettextize'; # --install -- as --add-missing in other tools. @@ -139,6 +140,10 @@ sub parse_args () print STDERR "\n"; xsystem ("$aclocal --version | sed 1q >&2"); print STDERR "\n"; + xsystem ("$gettextize --version | sed 1q >&2"); + print STDERR "\n"; + xsystem ("$libtoolize --version | sed 1q >&2"); + print STDERR "\n"; } # Dispatch autoreconf's option to the tools. @@ -151,6 +156,7 @@ sub parse_args () $autoconf .= ' --force'; $autoheader .= ' --force'; $gettextize .= ' --force'; + $libtoolize .= ' --force'; } else { @@ -161,7 +167,6 @@ sub parse_args () { $autoconf .= ' --verbose'; $autoheader .= ' --verbose'; - $automake .= ' --verbose'; $aclocal .= ' --verbose'; } # --debug; @@ -170,6 +175,7 @@ sub parse_args () $autoconf .= ' --debug'; $autoheader .= ' --debug'; $automake .= ' --verbose'; + $libtoolize .= ' --debug'; } # --install and --symlink; if ($install) @@ -179,6 +185,8 @@ sub parse_args () unless $symlink; $gettextize .= ' --copy' unless $symlink; + $libtoolize .= ' --copy' + unless $symlink; } } @@ -208,10 +216,11 @@ sub autoreconf () } if (!$uses_autoconf) { - verbose "$configure_ac: not Autoconf"; + verbose "$configure_ac: not using Autoconf"; return; } + # -------------------- # # Running gettexitze. # # -------------------- # @@ -225,7 +234,7 @@ sub autoreconf () } if (!$uses_gettext) { - verbose "$configure_ac: not Gettext"; + verbose "$configure_ac: not using Gettext"; } else { @@ -233,6 +242,27 @@ sub autoreconf () } + # -------------------- # + # Running libtoolize. # + # -------------------- # + + my $uses_libtool = 0; + my $traces = new Autom4te::XFile "$autoconf --trace=AM_PROG_LIBTOOL |"; + while ($_ = $traces->getline) + { + $uses_libtool = 1 + if /AM_PROG_LIBTOOL/; + } + if (!$uses_libtool) + { + verbose "$configure_ac: not using Libtool"; + } + else + { + xsystem ($libtoolize); + } + + # ----------------- # # Running aclocal. # # ----------------- # @@ -271,7 +301,11 @@ sub autoreconf () # ------------------ # # Assumes that there is a Makefile.am in the topmost directory. - if (-f 'Makefile.am') + if (!-f 'Makefile.am') + { + verbose "$configure_ac: not using Automake"; + } + else { # We should always run automake, and let it decide whether it shall # update the file or not. In fact, the effect of `$force' is already @@ -305,7 +339,7 @@ sub autoreconf () } if (!$uses_autoheader) { - verbose "$configure_ac: not Autoheader"; + verbose "$configure_ac: not using Autoheader"; } else { diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 4ffb05c12..3cf10bceb 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -1373,6 +1373,8 @@ AUTOMAKE|:::::|automake|:::::|$missing_dir @section Using @code{autoreconf} to Update @code{configure} Scripts @cindex @code{autoreconf} +@c FIXME: Now completely outdated. + If you have a lot of Autoconf-generated @code{configure} scripts, the @code{autoreconf} program can save you some work. It runs @code{autoconf} (and @code{autoheader}, where appropriate) repeatedly to diff --git a/man/autoreconf.1 b/man/autoreconf.1 index 961ffb466..f73087d7c 100644 --- a/man/autoreconf.1 +++ b/man/autoreconf.1 @@ -6,13 +6,13 @@ autoreconf \- Update generated configuration files .B autoreconf [\fIOPTION\fR] ... [\fITEMPLATE-FILE\fR] .SH DESCRIPTION -Run `autoconf' (and `autoheader', `aclocal', `automake' and -`gettextize', where appropriate) repeatedly to remake the GNU Build +Run `autoconf' (and `autoheader', `aclocal', `automake', `gettextize', +and `libtoolize' where appropriate) repeatedly to remake the GNU Build System files in the directory tree rooted at the current directory. By default, it only remakes those files that are older than their -predecessors. If you install a new version of GNU Build System -components, running `autoreconf' remakes all of the files by giving it -the `--force' option. +predecessors. If you install new versions of the GNU Build System, +running `autoreconf' remakes all of the files by giving it the +`--force' option. .SS "Operation modes:" .TP \fB\-h\fR, \fB\-\-help\fR @@ -52,8 +52,8 @@ this package's Autoconf extensions Unless specified, heuristics try to compute `M4DIR' from the `Makefile.am', or defaults to `m4' if it exists. .PP -The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, and ACLOCAL -are honored. +The environment variables AUTOCONF, AUTOHEADER, AUTOMAKE, ACLOCAL, +GETTEXTIZE, LIBTOOLIZE are honored. .SH AUTHOR Written by David J. MacKenzie and Akim Demaille. .PP