diff --git a/ChangeLog b/ChangeLog index 611b4c01..98e97ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-09-12 Ralf Wildenhues + + * 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 * libtoolize.m4sh (TAR): Allow the user to override the tar diff --git a/HACKING b/HACKING index e722d82e..28d0c673 100644 --- a/HACKING +++ b/HACKING @@ -241,6 +241,9 @@ yyyy-mm-dd Name of Author (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 2ee02b53..bb6e051a 100644 --- 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 ------------ diff --git a/libltdl/m4/ltdl.m4 b/libltdl/m4/ltdl.m4 index e0476f64..ff14d60a 100644 --- a/libltdl/m4/ltdl.m4 +++ b/libltdl/m4/ltdl.m4 @@ -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 diff --git a/libltdl/m4/ltoptions.m4 b/libltdl/m4/ltoptions.m4 index c6fe3bdc..8e81b8b0 100644 --- a/libltdl/m4/ltoptions.m4 +++ b/libltdl/m4/ltoptions.m4 @@ -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