Support for library names with dots.
authorBruno Haible <bruno@clisp.org>
Tue, 14 Nov 2006 10:22:12 +0000 (10:22 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 14 Nov 2006 10:22:12 +0000 (10:22 +0000)
ChangeLog
m4/lib-link.m4

index bb56d00..1501000 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-11-12  Bruno Haible  <bruno@clisp.org>
+
+       * m4/lib-link.m4: Require at least autoconf-2.54.
+       (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
+       name to underscores for the --with option.
+
 2006-11-13  Bruno Haible  <bruno@clisp.org>
 
        * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
index f95b7ba..4f588ce 100644 (file)
@@ -6,7 +6,7 @@ dnl with or without modifications, as long as this notice is preserved.
 
 dnl From Bruno Haible.
 
-AC_PREREQ(2.50)
+AC_PREREQ(2.54)
 
 dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
 dnl the libraries corresponding to explicit and implicit dependencies.
@@ -129,15 +129,17 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
   AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
   define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
                                [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+  dnl Autoconf >= 2.61 supports dots in --with options.
+  define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
   dnl By default, look in $includedir and $libdir.
   use_additional=yes
   AC_LIB_WITH_FINAL_PREFIX([
     eval additional_includedir=\"$includedir\"
     eval additional_libdir=\"$libdir\"
   ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
+  AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[  --with-lib]N_A_M_E[-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
+  --without-lib]N_A_M_E[-prefix     don't search for lib$1 in includedir and libdir],
 [
     if test "X$withval" = "Xno"; then
       use_additional=no