[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_LIBLTDL_CONVENIENCE
From: |
Ralf Wildenhues |
Subject: |
Re: AC_LIBLTDL_CONVENIENCE |
Date: |
Tue, 22 Apr 2008 21:39:26 +0200 |
User-agent: |
Mutt/1.5.17+20080114 (2008-01-14) |
Hello Andreas,
* Andreas Schwab wrote on Tue, Apr 22, 2008 at 10:11:11AM CEST:
> >> --- libltdl/m4/ltdl.m4 1 Apr 2008 18:23:20 -0000 1.46
> >> +++ libltdl/m4/ltdl.m4 16 Apr 2008 08:04:41 -0000
> >> @@ -79,7 +79,7 @@ _$0()
> >> # AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
> >> # now we have LT_CONFIG_LTDL_DIR:
> >> AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
> >> -[_LT_CONFIG_LTDL_DIR([$1])
> >> +[_LT_CONFIG_LTDL_DIR(m4_ifval([$1], [$1], [libltdl]))
> >
> > This looks like to few parens (outside of m4_ifval), although I haven't
> > tested that and _LT_CONFIG_LTDL_DIR may require absence of quoting;
> > also, m4_default should be able to simplify:
> > _LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
>
> I removed the outer parens because I had some expansion error, but I
> can't reproduce that now.
Thanks for the feedback and the example. I'm applying this patch.
Cheers,
Ralf
2008-04-22 Andreas Schwab <address@hidden>
and Ralf Wildenhues <address@hidden>
Fix default argument for AC_LIBLTDL_CONVENIENCE.
* libltdl/m4/ltdl.m4 (AC_LIBLTDL_CONVENIENCE): Default argument
to libltdl.
(AC_LIBLTDL_INSTALLABLE): Likewise.
* tests/configure-iface.at (convenience libltdl): New test.
diff --git a/libltdl/m4/ltdl.m4 b/libltdl/m4/ltdl.m4
index bdecc9d..f6b1064 100644
--- a/libltdl/m4/ltdl.m4
+++ b/libltdl/m4/ltdl.m4
@@ -79,7 +79,7 @@ _$0()
# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
# now we have LT_CONFIG_LTDL_DIR:
AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[_LT_CONFIG_LTDL_DIR([$1])
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
_LTDL_CONVENIENCE])
dnl aclocal-1.4 backwards compatibility:
@@ -135,7 +135,7 @@ _$0()
# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
# now we have LT_CONFIG_LTDL_DIR:
AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[_LT_CONFIG_LTDL_DIR([$1])
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
_LTDL_INSTALLABLE])
dnl aclocal-1.4 backwards compatibility:
diff --git a/tests/configure-iface.at b/tests/configure-iface.at
index 3fcb0da..9a311dc 100644
--- a/tests/configure-iface.at
+++ b/tests/configure-iface.at
@@ -275,5 +275,33 @@ AT_CHECK([$MAKE -q main$EXEEXT || exit 1], [1], [ignore],
[ignore])
AT_CLEANUP
+
+## -------------------- ##
+## Convenience libltdl. ##
+## -------------------- ##
+
+AT_SETUP([convenience libltdl])
+
+AT_DATA([configure.ac],
+[[AC_INIT
+AC_CONFIG_AUX_DIR([libltdl/config])
+AC_LIBLTDL_CONVENIENCE
+AC_LIBTOOL_DLOPEN
+AC_PROG_LIBTOOL
+AC_CONFIG_FILES(Makefile)
+AC_OUTPUT
+]])
+AT_DATA([Makefile.in],
+[[LIBLTDL = @LIBLTDL@
+print-ltdl:
+ echo $(LIBLTDL)
+]])
+
+LT_AT_BOOTSTRAP([--ltdl], [-I libltdl/m4], [ignore], [ignore], [], [],
[ignore])
+AT_CHECK([$MAKE print-ltdl], [], [stdout])
+AT_CHECK([grep libltdl/libltdlc.la stdout], [], [ignore])
+
+AT_CLEANUP
+
dnl Be careful not to let the definition leak into other tests
m4_popdef([_LT_AT_LTDL_SETUP])