]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtoolize: select the first directory from AC_CONFIG_MACRO_DIRS.
authorGary V. Vaughan <gary@gnu.org>
Fri, 19 Oct 2012 09:21:27 +0000 (16:21 +0700)
committerGary V. Vaughan <gary@gnu.org>
Sat, 20 Oct 2012 04:21:56 +0000 (11:21 +0700)
* tests/libtoolize.at (multiple AC_CONFIG_MACRO_DIRS directories):
New test to ensure multiple directory arguments mork correctly.
* libtoolize.in (func_require_ac_macro_dir): Use expr to discard
any additional space delimited entries in the first
AC_CONFIG_MACRO_DIRS argument.
* bootstrap (func_require_macro_dir): Likewise.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
bootstrap
libtoolize.in
tests/libtoolize.at

index 671a5454632a0eccf85fa8995b5f98deef1787a9..29fa4386bd602e1546e5e7570ffda1993f6ab4ea 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1484,8 +1484,10 @@ func_require_macro_dir ()
 
     # Sometimes this is stored in `configure.ac'.
     test -n "$macro_dir" || {
+      # AC_CONFIG_MACRO_DIRS takes a space delimited list of directories,
+      # but we only care about the first one in bootstrap.
       func_extract_trace_first AC_CONFIG_MACRO_DIRS
-      macro_dir=$func_extract_trace_first_result
+      macro_dir=`expr "x$func_extract_trace_first_result" : 'x\([^      ]*\)'`
     }
     test -n "$macro_dir" || {
       func_extract_trace_first AC_CONFIG_MACRO_DIR
index d5818201780d9d5f6eddf4dd77187020fb3bed7f..612c37f4f62c9e5c1d80360e9d529f49e15bd1ff 100644 (file)
@@ -1525,7 +1525,7 @@ func_require_ac_macro_dir ()
 
     if test -n "$configure_ac"; then
       func_extract_trace_first AC_CONFIG_MACRO_DIRS
-      ac_macro_dir=$func_extract_trace_first_result
+      ac_macro_dir=`expr "x$func_extract_trace_first_result" : 'x\([^   ]*\)'`
 
       test -n "$ac_macro_dir" || {
         func_extract_trace_first AC_CONFIG_MACRO_DIR
index 28bf04b3abf79d39d61bacc1e507d04fe443aa01..0e743b0bd49f0f36e59d32dcbafe0fb44665a408 100644 (file)
@@ -155,6 +155,34 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
 AT_CLEANUP
 
 
+AT_SETUP([multiple AC_CONFIG_MACRO_DIRS directories])
+
+AT_DATA([configure.ac],
+[[AC_INIT([libtooize-demo], ]AT_PACKAGE_VERSION[, ]AT_PACKAGE_BUGREPORT[)
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_MACRO_DIRS([first second third])
+LT_INIT
+AC_OUTPUT
+]])
+
+AT_DATA(expout,
+[[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
+libtoolize: copying file `build-aux/ltmain.sh'
+libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, `first'.
+libtoolize: copying file `first/libtool.m4'
+libtoolize: copying file `first/ltoptions.m4'
+libtoolize: copying file `first/ltsugar.m4'
+libtoolize: copying file `first/ltversion.m4'
+libtoolize: copying file `first/lt~obsolete.m4'
+libtoolize: Consider adding `-I first' to ACLOCAL_AMFLAGS in Makefile.am.
+]])
+
+LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
+
+AT_CLEANUP
+
+
+
 ## ------------------------------------ ##
 ## ACLOCAL_AMFLAGS macrodir extraction. ##
 ## ------------------------------------ ##