]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix the bugs where libtoolize needs to use `dir/file' instead of
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 13 Jun 2006 19:08:33 +0000 (19:08 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 13 Jun 2006 19:08:33 +0000 (19:08 +0000)
`./dir/file', where ltdldir is `.', so that libtoolize correctly
checks for (and suggests) `config' and `m4' instead of
`./config' and `./m4' as auxiliary resp. macro directories.
The change is necessary for unambiguous naming, the chosen way
plays better with non-GNU make in VPATH builds.

* libtoolize.m4sh (ltdlprefix): New variable, to use as prefix
instead of `$ltdldir/'.
(func_check_macros): Use it.  Bug report by Eric Blake.

ChangeLog
libtoolize.m4sh

index 8b39c192c96f427f2c5a5328a324eed46be38253..7a4af7d211f7da324f6ddd5df669b9a8e67da689 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2006-06-13  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix the bugs where libtoolize needs to use `dir/file' instead of
+       `./dir/file', where ltdldir is `.', so that libtoolize correctly
+       checks for (and suggests) `config' and `m4' instead of
+       `./config' and `./m4' as auxiliary resp. macro directories.
+       The change is necessary for unambiguous naming, the chosen way
+       plays better with non-GNU make in VPATH builds.
+
+       * libtoolize.m4sh (ltdlprefix): New variable, to use as prefix
+       instead of `$ltdldir/'.
+       (func_check_macros): Use it.  Bug report by Eric Blake.
+
 2006-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Fix several libtoolize-related bugs:
index 3853530a8b1abfc63716ce5fbd083464f46991ad..87e6959c74c90fb5824195a527e6dc07c00bf45c 100644 (file)
@@ -904,8 +904,8 @@ func_check_macros ()
        func_echo "and rerunning libtoolize."
       fi
     elif test -z "$m4dir"; then
-      if $opt_ltdl && test "$ltdldir/m4" != "$m4dir"; then
-       acmacrodir="$ltdldir/m4"
+      if $opt_ltdl && test "${ltdlprefix}m4" != "$m4dir"; then
+       acmacrodir="${ltdlprefix}m4"
       else
        acmacrodir="$aclocaldir"
       fi
@@ -940,10 +940,10 @@ func_check_macros ()
 
       # Offer some suggestions for avoiding duplicate files in a project
       # that uses libltdl:
-      test "$ltdldir/config" = "$auxdir" ||
-        func_echo "Consider using \`AC_CONFIG_AUX_DIR([[$ltdldir/config]])' in $configure_ac."
-      $ac_config_macro_dir_advised || test "$ltdldir/m4" = "$m4dir" ||
-        func_echo "Consider using \`AC_CONFIG_MACRO_DIR([[$ltdldir/m4]])' in $configure_ac."
+      test "${ltdlprefix}config" = "$auxdir" ||
+        func_echo "Consider using \`AC_CONFIG_AUX_DIR([[${ltdlprefix}config]])' in $configure_ac."
+      $ac_config_macro_dir_advised || test "${ltdlprefix}m4" = "$m4dir" ||
+        func_echo "Consider using \`AC_CONFIG_MACRO_DIR([[${ltdlprefix}m4]])' in $configure_ac."
     else
       # Don't trace for this, we're just checking the user didn't invoke it
       # directly from configure.ac.
@@ -1086,12 +1086,17 @@ func_nonemptydir_p ()
 
   func_scan_files
 
+  case $ltdldir in
+  .) ltdlprefix= ;;
+  *) ltdlprefix=$ltdldir/ ;;
+  esac
+
   # Unless we share CONFIG_AUX_DIR with the libltdl subproject, then
   # if they are newer, copy all the installed utility files to the
   # auxiliary directory if `--install' was passed, or else copy just
   # ltmain.sh.
   if test -n "$auxdir"; then
-    if test "$ltdldir/config" != "$auxdir"; then
+    if test "${ltdlprefix}config" != "$auxdir"; then
       $opt_quiet || if test "$auxdir" != .; then
         func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
       fi
@@ -1150,9 +1155,9 @@ func_nonemptydir_p ()
 
     # Unless we share CONFIG_MACRO_DIR with our parent project,
     # copy macros here.
-    if test "$ltdldir/m4" != "$m4dir"; then
+    if test "${ltdlprefix}m4" != "$m4dir"; then
       func_copy_some_files "$pkgmacro_files:libtool.m4:ltdl.m4" \
-        "$aclocaldir" "$ltdldir/m4"
+        "$aclocaldir" "${ltdlprefix}m4"
     fi
 
     func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"