m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/ltdl/m4/gmp.m4,v


From: Eric Blake
Subject: Changes to m4/ltdl/m4/gmp.m4,v
Date: Fri, 16 Jun 2006 03:51:30 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/06/16 03:51:29

Index: ltdl/m4/gmp.m4
===================================================================
RCS file: /sources/m4/m4/ltdl/m4/gmp.m4,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ltdl/m4/gmp.m4      4 May 2005 15:45:44 -0000       1.1
+++ ltdl/m4/gmp.m4      16 Jun 2006 03:51:29 -0000      1.2
@@ -1,5 +1,5 @@
 # -*- Autoconf -*-
-# Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -16,59 +16,59 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 # 02110-1301  USA
 
-# serial 7
+# serial 8
 
-m4_define([_m4_LIB_GMP],
-[AC_ARG_WITH(gmp,
-[  --without-gmp           don't use GNU multiple precision arithmetic 
library],
+m4_define([_M4_LIB_GMP],
+[AC_ARG_WITH([gmp],
+  [AS_HELP_STRING([--without-gmp],
+    [don't use GNU multiple precision arithmetic library])],
 [use_gmp=$withval], [use_gmp=yes])
 
 case $use_gmp:$LIBADD_GMP:$ac_cv_header_gmp_h in
   *::yes)
     AC_MSG_WARN([gmp library not found or does not appear to work
                  but `gmp.h' is present])
-    m4_cv_using_lib_gmp=no
+    M4_cv_using_lib_gmp=no
     ;;
   *:-lgmp:no)
     AC_MSG_WARN([gmp works but `gmp.h' is missing])
-    m4_cv_using_lib_gmp=no
+    M4_cv_using_lib_gmp=no
     ;;
   yes:*:yes)
-    m4_cv_using_lib_gmp=yes
+    M4_cv_using_lib_gmp=yes
     ;;
   no:*)
-    m4_cv_using_lib_gmp=no
+    M4_cv_using_lib_gmp=no
     ;;
 esac
-])# _m4_LIB_GMP
+])# _M4_LIB_GMP
 
 
-AC_DEFUN([m4_LIB_GMP],
-[AC_PREREQ(2.56)dnl We use the new compiler based header checking in 2.56
+AC_DEFUN([M4_LIB_GMP],
+[AC_PREREQ([2.56])dnl We use the new compiler based header checking in 2.56
 AC_CHECK_HEADERS([gmp.h], [], [], [AC_INCLUDES_DEFAULT])
-m4_pattern_allow([^m4_gmp_save_LIBS$])
-m4_pattern_allow([^m4_cv_using_lib_gmp])
+m4_pattern_allow([^M4_gmp_save_LIBS$])
 # Some versions of gmp provide mpq_init as a macro, so we need to
 # include the header file, otherwise the detection will fail.
-m4_gmp_save_LIBS="$LIBS"
+M4_gmp_save_LIBS="$LIBS"
 LIBS="$LIBS -lgmp"
-AC_TRY_LINK([#if HAVE_GMP_H
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_GMP_H
 #  include <gmp.h>
-#endif],
-  [mpq_t n; mpq_init (n);],
+#endif]],
+  [[mpq_t n; mpq_init (n);]])],
   [LIBADD_GMP=-lgmp])
-LIBS=$m4_gmp_save_LIBS
+LIBS=$M4_gmp_save_LIBS
 AC_SUBST([LIBADD_GMP])
 
 AC_CACHE_CHECK([if using GNU multiple precision arithmetic library],
-               [m4_cv_using_lib_gmp],
-               [_m4_LIB_GMP])
+               [M4_cv_using_lib_gmp],
+               [_M4_LIB_GMP])
 
 # Don't try to link in libgmp if we are not using it after the last call
-if test "$m4_cv_using_lib_gmp" = yes; then
-  AC_DEFINE(USE_GMP, 1,
+if test "$M4_cv_using_lib_gmp" = yes; then
+  AC_DEFINE([USE_GMP], [1],
     [Define to 1 if using the GNU multiple precision library.])
 fi
 
-AC_SUBST([USE_GMP], [$m4_cv_using_lib_gmp])
-])# m4_LIB_GMP
+AC_SUBST([USE_GMP], [$M4_cv_using_lib_gmp])
+])# M4_LIB_GMP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]