From 4d644c39d835fe92878f1aace081ba46187fe4ca Mon Sep 17 00:00:00 2001 From: "Gary V. Vaughan" Date: Thu, 18 Oct 2012 20:37:03 +0700 Subject: libtoolize: migrate to new AC_CONFIG_MACRO_DIRS api. * libtoolize.in (func_install_pkgmacro_files): Uee AC_CONFIG_MACRO_DIRS. (func_check_macros): Advise using AC_CONFIG_MACRO_DIRS. (require_ac_macro_dir): Give priority to AC_CONFIG_MACRO_DIRS. (require_macro_dir): Likewise. * bootstrap: Give priority to AC_CONFIG_MACRO_DIRS. * configure.ac: Define dummy AC_CONFIG_MACRO_DIRS for older Autotools, that is allow bootstrap with current release versions. Use AC_CONFIG_MACRO_DIRS instead of AC_CONFIG_MACRO_DIR. * tests/testsuite.at: Source build-aux/extract-trace for access to func_extract_trace. (LT_AT_ACLOCAL): Use it to get the AC_CONFIG_MACRO_DIRS argument to pass manually to aclocal for compatibility with old Automake. Add a fallback AC_CONFIG_MACRO_DIRS definition to acinclude.m4 in the test directory. (LT_AT_AUTORECONF): Likewise. * tests/cdemo.at, tests/configure-iface.at, tests/darwin.at, tests/demo.at, tests/depdemo.at, tests/early-libtool.at, tests/libtoolize.at, tests/mdemo.at, tests/no-executables.at, tests/nonrecursive.at, tests/old-ltdl-iface.at, tests/recursive.at, tests/subproject.at, tests/tagdemo.at, tests/template.at: Likewise. * doc/libtool.texi: Update. * NEWS: Update. Signed-off-by: Gary V. Vaughan --- libtoolize.in | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'libtoolize.in') diff --git a/libtoolize.in b/libtoolize.in index 6f63a518..d5818201 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -855,7 +855,7 @@ func_install_pkgmacro_files () # Install the libltdl autoconf macros to this project's source tree. $opt_quiet || if test -n "$ac_macro_dir"; then - my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$ac_macro_dir'." + my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIRS, \`$ac_macro_dir'." else my_pkgmacro_header="putting macros in \`$macro_dir'." fi @@ -1169,12 +1169,12 @@ func_check_macros () # Suggest modern idioms for storing autoconf macros: $ac_config_macro_dir_advised || if test -z "$macro_dir" || test . = "$macro_dir"; then - func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac and" + func_echo "Consider adding \`AC_CONFIG_MACRO_DIRS([m4])' to $configure_ac and" func_echo "rerunning $progname, to keep the correct libtool macros in-tree." ac_config_macro_dir_advised=: elif test -z "$ac_macro_dir"; then - func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macro_dir])' to $configure_ac," + func_echo "Consider adding \`AC_CONFIG_MACRO_DIRS([$macro_dir])' to $configure_ac," func_echo "and rerunning $progname and aclocal." ac_config_macro_dir_advised=: fi @@ -1515,7 +1515,7 @@ cannot expand unknown variable in LTDL_INIT argument." # require_ac_macro_dir # -------------------- -# Extract ac_macro_dir from AC_CONFIG_MACRO_DIR. +# Extract ac_macro_dir from AC_CONFIG_MACRO_DIRS. require_ac_macro_dir=func_require_ac_macro_dir func_require_ac_macro_dir () { @@ -1524,8 +1524,13 @@ func_require_ac_macro_dir () $require_configure_ac if test -n "$configure_ac"; then - func_extract_trace_first AC_CONFIG_MACRO_DIR + func_extract_trace_first AC_CONFIG_MACRO_DIRS ac_macro_dir=$func_extract_trace_first_result + + test -n "$ac_macro_dir" || { + func_extract_trace_first AC_CONFIG_MACRO_DIR + ac_macro_dir=$func_extract_trace_first_result + } fi require_ac_macro_dir=: @@ -1797,7 +1802,7 @@ func_require_ltdl_mode () # require_macro_dir # ----------------- # If both are specified, ensure both ACLOCAL_AMFLAGS and -# AC_CONFIG_MACRO_DIR agree, and set macro_dir to the value of either. +# AC_CONFIG_MACRO_DIRS agree, and set macro_dir to the value of either. require_macro_dir=func_require_macro_dir func_require_macro_dir () { @@ -1806,7 +1811,7 @@ func_require_macro_dir () $require_ac_macro_dir $require_am_macro_dir - # AC_CONFIG_MACRO_DIR takes precedence. + # AC_CONFIG_MACRO_DIRS takes precedence. macro_dir=$ac_macro_dir # Followed by first -I optarg from ACLOCAL_AMFLAGS. @@ -1827,7 +1832,7 @@ func_require_macro_dir () # Diagnose conflicts. if test -n "$ac_macro_dir" && test -n "$am_macro_dir"; then test "$ac_macro_dir" = "$am_macro_dir" || func_fatal_error "\ -AC_CONFIG_MACRO_DIR([$ac_macro_dir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macro_dir." +AC_CONFIG_MACRO_DIRS([$ac_macro_dir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macro_dir." fi require_macro_dir=: -- cgit v1.2.1