]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/m4/ltdl.m4 (LT_WITH_LTDL, LTDL_CONVENIENCE)
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Sep 2005 11:21:40 +0000 (11:21 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Sep 2005 11:21:40 +0000 (11:21 +0000)
(LTDL_INSTALLABLE): Use less quoting for expanded LIBLTDL,
LTDLINCL.  Use m4_default instead of m4_if, to work
around AU_ALIAS bug with empty macro arguments.
(LTDL_INIT): Likewise.
* libltdl/m4/ltoptions.m4 (_LT_WITH_PIC): Likewise.
* TODO, HACKING: Updated.

ChangeLog
HACKING
TODO
libltdl/m4/ltdl.m4
libltdl/m4/ltoptions.m4

index 611b4c01ffa628678b2d89cd8fa95825143c6d75..98e97ee485de89e27eebd1f7bfbe78d0d4afce1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-09-12  Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+       * libltdl/m4/ltdl.m4 (LT_WITH_LTDL, LTDL_CONVENIENCE)
+       (LTDL_INSTALLABLE): Use less quoting for expanded LIBLTDL,
+       LTDLINCL.  Use m4_default instead of m4_if, to work
+       around AU_ALIAS bug with empty macro arguments.
+       (LTDL_INIT): Likewise.
+       * libltdl/m4/ltoptions.m4 (_LT_WITH_PIC): Likewise.
+       * TODO, HACKING: Updated.
+
 2005-09-10  Gary V. Vaughan  <gary@gnu.org>
 
        * libtoolize.m4sh (TAR): Allow the user to override the tar
diff --git a/HACKING b/HACKING
index e722d82e39f6e2fcedb9d534afdb6a89a70d487b..28d0c67328b0b7ed7d491e805e0043006d481971 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -241,6 +241,9 @@ yyyy-mm-dd  Name of Author  <email@address>  (tiny change)
    $ECHO ".."          for strings without leading hyphen,
    $ECHO "X.." | $Xsed otherwise.
 
+* Do not use the number of macro arguments `$#' in public macros;
+  AU_ALIAS may change it.
+
 
 9. Abstraction layers in libltdl
 ================================
diff --git a/TODO b/TODO
index 2ee02b53514e24335e38da0efa96cf9783b9875a..bb6e051a92d30919a727d53d39c77f125b147913 100644 (file)
--- a/TODO
+++ b/TODO
@@ -76,6 +76,9 @@ GNU Libtool
 * Look at better -no-undefined support, maybe along the idea of
   [support #103719] for CC.
 
+* Check dangerous use of the number of macro arguments `$#' in public macros
+  (because of AU_ALIAS).
+
 
 1.2. libtldl
 ------------
index e0476f64e108b0293fd62d84d15b11de4a45a559..ff14d60a77a3e6c29979b8b6b61a7ff47725c5cb 100644 (file)
@@ -33,7 +33,7 @@ fi
 if test "x$enable_ltdl_install" != xyes; then
   # If the user did not specify an installable libltdl, then default
   # to a convenience lib.
-  LTDL_CONVENIENCE([$1])
+  LTDL_CONVENIENCE(m4_default([$1], [libltdl]))
 fi
 
 if test "x$with_included_ltdl" = xno; then
@@ -48,7 +48,7 @@ fi
 AC_MSG_CHECKING([whether to use included libltdl])
 AC_MSG_RESULT([$with_included_ltdl])
 
-AC_CONFIG_SUBDIRS(m4_if($#, 1, [$1], [libltdl]))
+AC_CONFIG_SUBDIRS(m4_default([$1], [libltdl]))
 ])# LT_WITH_LTDL
 
 # Old name:
@@ -74,8 +74,8 @@ AC_DEFUN([LTDL_CONVENIENCE],
   "") enable_ltdl_convenience=yes
       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
   esac
-LIBLTDL='${top_builddir}/'m4_if($#, 1, [$1], ['libltdl'])/libltdlc.la
-LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
+LIBLTDL='${top_builddir}/'m4_default([$1], [libltdl])/libltdlc.la
+LTDLINCL='-I${top_srcdir}/'m4_default([$1], [libltdl])
 
 AC_SUBST([LIBLTDL])
 AC_SUBST([LTDLINCL])
@@ -114,8 +114,8 @@ AC_DEFUN([LTDL_INSTALLABLE],
   ])
 if test x"$enable_ltdl_install" = x"yes"; then
   ac_configure_args="$ac_configure_args --enable-ltdl-install"
-  LIBLTDL='${top_builddir}/'m4_if($#, 1, [$1], ['libltdl'])/libltdl.la
-  LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
+  LIBLTDL='${top_builddir}/'m4_default([$1], [libltdl])/libltdl.la
+  LTDLINCL='-I${top_srcdir}/'m4_default([$1], [libltdl])
 else
   ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
   LIBLTDL="-lltdl"
@@ -141,7 +141,7 @@ dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
 # Perform all the checks necessary for compilation of the ltdl objects
 #  -- including compiler checks and header checks.
 AC_DEFUN([LTDL_INIT],
-[m4_if([$#], 1, [m4_divert_push([DEFAULTS])dnl
+[m4_ifval([$1], [m4_divert_push([DEFAULTS])dnl
 # libltdl will be built in the named DIRECTORY, relative to $top_builddir.
 lt_ltdl_dir='$1'
 m4_divert_pop([DEFAULTS])])dnl
index c6fe3bdc4489387d1ce298e131860f3cb94f6d8c..8e81b8b02d9373a0543e792d33b86d65e0237853 100644 (file)
@@ -360,7 +360,7 @@ m4_define([_LT_WITH_PIC],
     [pic_mode="$withval"],
     [pic_mode=default])
 
-test -z "$pic_mode" && pic_mode=m4_if($#, 1, $1, default)
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
 _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
 ])# _LT_WITH_PIC