]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* ltdl.m4 (AC_CHECK_TYPES): This macro was introduced in Autoconf
authorGary V. Vaughan <gary@gnu.org>
Mon, 3 Sep 2001 01:22:13 +0000 (01:22 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 3 Sep 2001 01:22:13 +0000 (01:22 +0000)
2.5x.  Backported a fallback implementation (directly to ltdl.m4)
from Autoconf 2.50, so that we can still bootstrap with Autoconf
2.13.

ChangeLog
ltdl.m4

index 584735355892d0516383a083d93dd1dabac2b19b..7599f56b7811d85b407a564d8112fbc66e158392 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2001-09-03  Gary V. Vaughan  <gary@gnu.org>
 
+       * ltdl.m4 (AC_CHECK_TYPES):  This macro was introduced in Autoconf
+       2.5x.  Backported a fallback implementation (directly to ltdl.m4)
+       from Autoconf 2.50, so that we can still bootstrap with Autoconf
+       2.13.
+
        From Marius Vollmer <mvo@zagadka.ping.de>:
        * libltdl/ltdl.c (tryall_dlopen_module): Don't forget to propogate
        errors over recurse levels.
diff --git a/ltdl.m4 b/ltdl.m4
index 0038be241399565c51cca4657ce76458beebb8c1..75be4725854c82f2ab855d5a33cc7c5c599f28ad 100644 (file)
--- a/ltdl.m4
+++ b/ltdl.m4
@@ -285,6 +285,28 @@ fi
 ])# AC_LTDL_DLSYM_USCORE
 
 
+# AC_CHECK_TYPES(TYPES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                [INCLUDES])
+# ---------------------------------------------------------------
+# This macro did not exist in Autoconf 2.13, which we do still support
+ifdef([AC_CHECK_TYPES], [],
+[define([AC_CHECK_TYPES],
+  [AC_CACHE_CHECK([for $1], ac_Type,
+    [AC_TRY_LINK([$4],
+       [if (($1 *) 0)
+         return 0;
+       if (sizeof ($1))
+         return 0;],
+       [ac_Type=yes],
+       [ac_Type=no])])
+  if test "x$ac_Type" = xyes; then
+    ifelse([$2], [], [:], [$2])
+  else
+    ifelse([$3], [], [:], [$3])
+  fi])
+])# AC_CHECK_TYPES
+
+
 # AC_LTDL_FUNC_ARGZ
 # -----------------
 AC_DEFUN([AC_LTDL_FUNC_ARGZ],
@@ -293,7 +315,7 @@ AC_DEFUN([AC_LTDL_FUNC_ARGZ],
 AC_CHECK_TYPES([error_t],
   [],
   [AC_DEFINE([error_t], [int],
-    [Define to a type to use for `error_t' if it is not otherwise available.])],
+    [Define to a type to use for \`error_t' if it is not otherwise available.])],
   [#if HAVE_ARGZ_H
 #  include <argz.h>
 #endif])