summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap4
-rw-r--r--libtoolize.in2
-rw-r--r--tests/libtoolize.at28
3 files changed, 32 insertions, 2 deletions
diff --git a/bootstrap b/bootstrap
index 671a5454..29fa4386 100755
--- 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
diff --git a/libtoolize.in b/libtoolize.in
index d5818201..612c37f4 100644
--- a/libtoolize.in
+++ b/libtoolize.in
@@ -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
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 28bf04b3..0e743b0b 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -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. ##
## ------------------------------------ ##