]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_CHECK_LIB): Ah ah! I recognized you, even
authorAkim Demaille <akim@epita.fr>
Sat, 25 Mar 2000 09:07:37 +0000 (09:07 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 25 Mar 2000 09:07:37 +0000 (09:07 +0000)
masked: you are AC_TRY_LINK_FUNC.
Fix quotation.
(AC_SEARCH_LIBS): Use AC_SHELL_IFELSE.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4

index 5d9ed3f26eed001b4b7a5908640d2111a24143dd..4ce07627973bc3c3aa7387a0912f92998dcaea3f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-03-25  Akim Demaille  <akim@epita.fr>
+
+       * acgeneral.m4 (AC_CHECK_LIB): Ah ah!  I recognized you, even
+       masked: you are AC_TRY_LINK_FUNC.
+       Fix quotation.
+       (AC_SEARCH_LIBS): Use AC_SHELL_IFELSE.
+
 2000-03-25  Akim Demaille  <akim@epita.fr>
 
        * tests/semantics.m4 (AC_TRY_LINK_FUNC, AC_CHECK_LIB): New tests.
index e67928d38448b548d6048a5401c0e4a87b2e8887..595a37e6bd02ead209cc534cdf13f3ed95c44d5e 100644 (file)
@@ -2770,12 +2770,11 @@ AC_TRY_LINK_FUNC([$1],
 break])
 done
 LIBS="$ac_func_search_save_LIBS"])
-if test "$ac_cv_search_$1" != "no"; then
-  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
-  $3
-else :
-  $4
-fi])
+AC_SHELL_IFELSE([test "$ac_cv_search_$1" != "no"],
+  [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
+  $3],
+                [$4])[]dnl
+])
 
 
 
@@ -2797,25 +2796,15 @@ AC_DEFUN(AC_CHECK_LIB,
 AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_save_LIBS="$LIBS"
 LIBS="-l$1 $5 $LIBS"
-AC_TRY_LINK(dnl
-AC_LANG_CASE([FORTRAN77], ,
-[ifelse([$2], [main], , dnl Avoid conflicting decl of main.
-[/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $2();
-])]),
-[$2()],
-AC_VAR_SET(ac_Lib, yes), AC_VAR_SET(ac_Lib, no))
+AC_TRY_LINK_FUNC([$2],
+                 [AC_VAR_SET(ac_Lib, yes)],
+                 [AC_VAR_SET(ac_Lib, no)])
 LIBS="$ac_save_LIBS"])
 AC_SHELL_IFELSE([test AC_VAR_GET(ac_Lib) = yes],
-                m4_default([$3],
+                [m4_default([$3],
                            [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
   LIBS="-l$1 $LIBS"
-]),
+])],
                 [$4])dnl
 AC_VAR_POPDEF([ac_Lib])dnl
 ])# AC_CHECK_LIB
index e67928d38448b548d6048a5401c0e4a87b2e8887..595a37e6bd02ead209cc534cdf13f3ed95c44d5e 100644 (file)
@@ -2770,12 +2770,11 @@ AC_TRY_LINK_FUNC([$1],
 break])
 done
 LIBS="$ac_func_search_save_LIBS"])
-if test "$ac_cv_search_$1" != "no"; then
-  test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
-  $3
-else :
-  $4
-fi])
+AC_SHELL_IFELSE([test "$ac_cv_search_$1" != "no"],
+  [test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS"
+  $3],
+                [$4])[]dnl
+])
 
 
 
@@ -2797,25 +2796,15 @@ AC_DEFUN(AC_CHECK_LIB,
 AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
 [ac_save_LIBS="$LIBS"
 LIBS="-l$1 $5 $LIBS"
-AC_TRY_LINK(dnl
-AC_LANG_CASE([FORTRAN77], ,
-[ifelse([$2], [main], , dnl Avoid conflicting decl of main.
-[/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $2();
-])]),
-[$2()],
-AC_VAR_SET(ac_Lib, yes), AC_VAR_SET(ac_Lib, no))
+AC_TRY_LINK_FUNC([$2],
+                 [AC_VAR_SET(ac_Lib, yes)],
+                 [AC_VAR_SET(ac_Lib, no)])
 LIBS="$ac_save_LIBS"])
 AC_SHELL_IFELSE([test AC_VAR_GET(ac_Lib) = yes],
-                m4_default([$3],
+                [m4_default([$3],
                            [AC_DEFINE_UNQUOTED(AC_TR_CPP(HAVE_LIB$1))
   LIBS="-l$1 $LIBS"
-]),
+])],
                 [$4])dnl
 AC_VAR_POPDEF([ac_Lib])dnl
 ])# AC_CHECK_LIB