libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 366] Libtoolize now advises AC_CONFIG_MACRO_DIR use where appropr


From: Gary V. Vaughan
Subject: [PATCH 366] Libtoolize now advises AC_CONFIG_MACRO_DIR use where appropriate.
Date: Tue, 22 Apr 2008 02:51:39 -0400 (EDT)
User-agent: mailnotify/0.9

* libtoolize.at (func_check_macros): Always advise use of
AC_CONFIG_MACRO_DIR when not able to copy libtool macros into
the project tree.
* tests/libtoolize.at: Update expected test output.
* NEWS: Updated.
---

Okay to apply?

 ChangeLog           |    7 +++++++
 NEWS                |    2 ++
 libtoolize.m4sh     |   17 ++++++++---------
 tests/libtoolize.at |   15 ++++++++++++---
 4 files changed, 29 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 136f2b4..9f815db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-04-21  Gary V. Vaughan  <address@hidden>
 
+       Libtoolize now advises AC_CONFIG_MACRO_DIR use where appropriate.
+       * libtoolize.at (func_check_macros): Always advise use of
+       AC_CONFIG_MACRO_DIR when not able to copy libtool macros into
+       the project tree.
+       * tests/libtoolize.at: Update expected test output.
+       * NEWS: Updated.
+
        Only complain that files are up-to-date with --force.
        As a side effect, this also means that when `aclocal' copies the
        libtool macros into `aclocal.m4' libtoolize complains only about
diff --git a/NEWS b/NEWS
index df43da7..8e675c0 100644
--- a/NEWS
+++ b/NEWS
@@ -18,6 +18,8 @@ New in 2.2.4: 2008-??-??: CVS version 2.2.3a, Libtool team:
     (i.e. AC_CONFIG_MACRO_DIR is not being used), libtoolize no longer
     reports that all macros need to be added to `aclocal.m4', and
     diagnoses only the macro files that are missing or not up-to-date.
+  - libtoolize now advises use of AC_CONFIG_MACRO_DIR to keep matching
+    libtool macros in-tree where appropriate.
 
 New in 2.2.2: 2008-04-01: CVS version 2.2.1a, Libtool team:
 
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index f83353e..2a4cb1a 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -1325,16 +1325,15 @@ func_check_macros ()
     ac_config_macro_dir_advised=false
 
     # Suggest modern idioms for storing autoconf macros:
-    if test -z "$ac_macrodir$ltdldir"; then
-      if test -z "$macrodir" || test x"$macrodir" = x.; then
-        func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to 
$configure_ac and"
-        func_echo "rerunning libtoolize, to keep the correct libtool macros 
in-tree."
-      elif test -z "$ac_macrodir$ltdldir"; then
-        func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macrodir])' to 
$configure_ac,"
-        func_echo "and rerunning libtoolize and aclocal."
-      fi
+    if test -z "$macrodir" || test x"$macrodir" = x.; then
+      func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac 
and"
+      func_echo "rerunning libtoolize, to keep the correct libtool macros 
in-tree."
+    elif test -z "$ac_macrodir$ltdldir"; then
+      func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macrodir])' to 
$configure_ac,"
+      func_echo "and rerunning libtoolize and aclocal."
+    fi
 
-    elif test -z "$macrodir"; then
+    if test -n "$ac_macrodir$ltdldir" && test -z "$macrodir"; then
       my_ac_config_macro_srcdir="$aclocaldir"
       if $opt_ltdl && test "$macrodir" != "$subproject_macrodir"; then
        my_ac_config_macro_srcdir="$subproject_macrodir"
diff --git a/tests/libtoolize.at b/tests/libtoolize.at
index 4f67386..3ed3290 100644
--- a/tests/libtoolize.at
+++ b/tests/libtoolize.at
@@ -505,6 +505,8 @@ AC_OUTPUT
 AT_DATA([expout],
 [[libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `build-aux'.
 libtoolize: copying file `build-aux/ltmain.sh'
+libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
+libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
 libtoolize: You should add the contents of the following files to `aclocal.m4':
 libtoolize:   `/usr/local/share/aclocal/libtool.m4'
 libtoolize:   `/usr/local/share/aclocal/ltoptions.m4'
@@ -634,6 +636,8 @@ AC_DEFUN([LT_INIT],
 AT_DATA([expout],
 [[libtoolize: putting auxiliary files in `.'.
 libtoolize: copying file `./ltmain.sh'
+libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
+libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
 libtoolize: You should add the contents of the following files to `aclocal.m4':
 libtoolize:   `/usr/local/share/aclocal/libtool.m4'
 libtoolize:   `/usr/local/share/aclocal/ltversion.m4'
@@ -648,8 +652,6 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
 ## Upgrading an aclocal maintained aclocal.m4 without AC_CONFIG_MACRO_DIR. ##
 ## ----------------------------------------------------------------------- ##
 
-rm -f aclocal.m4
-
 LT_AT_ACLOCAL()
 
 ## The following code is adapted (and simplified) from libtoolize.m4sh
@@ -711,7 +713,12 @@ $SED -e 's,^#.*serial.*ltoptions.m4$,# serial 99999 
ltoptions.m4,' \
  < aclocal.m4 > aclocal.m4t
 mv -f aclocal.m4t aclocal.m4
 
-LT_AT_CHECK_LIBTOOLIZE([--copy], 0)
+AT_DATA([expout],
+[[libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
+libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
+]])
+
+LT_AT_CHECK_LIBTOOLIZE([--copy], 0, expout)
 
 
 ## --------------------- ##
@@ -721,6 +728,8 @@ LT_AT_CHECK_LIBTOOLIZE([--copy], 0)
 AT_DATA(expout,
 [[libtoolize: putting auxiliary files in `.'.
 libtoolize: copying file `./ltmain.sh'
+libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
+libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
 ]])
 
 LT_AT_CHECK_LIBTOOLIZE([--copy --force], 0, expout)
-- 
1.5.4.3

Attachment: pgpxAaWLSLk4R.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]