summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-12-22 12:57:00 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-12-22 12:57:00 +0000
commit6a25d658147c100681ee893ce36f28ef9b689995 (patch)
tree25b58b01d4fee263307cfad827fcb09e7a3cfb6f /Build/source/libs
parent4f62c53b606577c3477d7a1af116a102f07abb71 (diff)
libs/gmp: Added GMP_H_EXTERN_INLINE to configure.ac, hoping to fix a build problem
git-svn-id: svn://tug.org/texlive/trunk@35881 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/gmp/ChangeLog5
-rw-r--r--Build/source/libs/gmp/Makefile.in1
-rw-r--r--Build/source/libs/gmp/aclocal.m41
-rw-r--r--Build/source/libs/gmp/config.h.in6
-rwxr-xr-xBuild/source/libs/gmp/configure78
-rw-r--r--Build/source/libs/gmp/configure.ac2
-rw-r--r--Build/source/libs/gmp/include/Makefile.in1
-rw-r--r--Build/source/libs/gmp/m4/gmp-extern-inline.m433
8 files changed, 127 insertions, 0 deletions
diff --git a/Build/source/libs/gmp/ChangeLog b/Build/source/libs/gmp/ChangeLog
index e001801a591..eb95ce6f802 100644
--- a/Build/source/libs/gmp/ChangeLog
+++ b/Build/source/libs/gmp/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-22 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * configure.ac: Added GMP_H_EXTERN_INLINE.
+ * m4/gmp-extern-inline.m4 (new): Define GMP_H_EXTERN_INLINE.
+
2014-12-03 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Added KPSE_COMPILER_VISIBILITY.
diff --git a/Build/source/libs/gmp/Makefile.in b/Build/source/libs/gmp/Makefile.in
index c9cc5f917c5..69efc80c3b4 100644
--- a/Build/source/libs/gmp/Makefile.in
+++ b/Build/source/libs/gmp/Makefile.in
@@ -102,6 +102,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gmp-alloca.m4 \
$(top_srcdir)/m4/gmp-attribute.m4 \
$(top_srcdir)/m4/gmp-double-format.m4 \
+ $(top_srcdir)/m4/gmp-extern-inline.m4 \
$(top_srcdir)/../../m4/kpse-common.m4 \
$(top_srcdir)/../../m4/kpse-visibility.m4 \
$(top_srcdir)/../../m4/kpse-warnings.m4 \
diff --git a/Build/source/libs/gmp/aclocal.m4 b/Build/source/libs/gmp/aclocal.m4
index 567fd654e0d..f1aa7f89b21 100644
--- a/Build/source/libs/gmp/aclocal.m4
+++ b/Build/source/libs/gmp/aclocal.m4
@@ -1186,6 +1186,7 @@ AC_SUBST([am__untar])
m4_include([m4/gmp-alloca.m4])
m4_include([m4/gmp-attribute.m4])
m4_include([m4/gmp-double-format.m4])
+m4_include([m4/gmp-extern-inline.m4])
m4_include([../../m4/kpse-common.m4])
m4_include([../../m4/kpse-visibility.m4])
m4_include([../../m4/kpse-warnings.m4])
diff --git a/Build/source/libs/gmp/config.h.in b/Build/source/libs/gmp/config.h.in
index 8f962e1eb09..3ea9da393ab 100644
--- a/Build/source/libs/gmp/config.h.in
+++ b/Build/source/libs/gmp/config.h.in
@@ -116,3 +116,9 @@
/* Define one of these to 1 for the temporary memory allocation method. */
#undef WANT_TMP_ALLOCA
#undef WANT_TMP_REENTRANT
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
diff --git a/Build/source/libs/gmp/configure b/Build/source/libs/gmp/configure
index ae050b15044..519c82425ad 100755
--- a/Build/source/libs/gmp/configure
+++ b/Build/source/libs/gmp/configure
@@ -6027,6 +6027,84 @@ _ACEOF
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if ${ac_cv_c_inline+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+case $ac_cv_c_inline in #(
+ no) :
+ ;; #(
+ *) :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define __GMP_WITHIN_CONFIGURE_INLINE 1
+#include "gmp-tmp.h"
+#ifndef __GMP_EXTERN_INLINE
+die die die
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ case $ac_cv_c_inline in #(
+ yes) :
+ tmp_inline=inline ;; #(
+ *) :
+ tmp_inline=$ac_cv_c_inline ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&5
+$as_echo "$as_me: WARNING: gmp.h doesnt recognise compiler \"$tmp_inline\", inlines will be unavailable" >&2;}
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;;
+esac
+
+
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
# for constant arguments. Useless!
diff --git a/Build/source/libs/gmp/configure.ac b/Build/source/libs/gmp/configure.ac
index 4bbb2733f02..b5a93e33640 100644
--- a/Build/source/libs/gmp/configure.ac
+++ b/Build/source/libs/gmp/configure.ac
@@ -81,6 +81,8 @@ KPSE_GMP_H
AC_CHECK_SIZEOF([mp_limb_t], , [#include "gmp-tmp.h"])
+GMP_H_EXTERN_INLINE
+
GMP_FUNC_ALLOCA
GMP_C_DOUBLE_FORMAT
diff --git a/Build/source/libs/gmp/include/Makefile.in b/Build/source/libs/gmp/include/Makefile.in
index fc501181695..2325b2a5b29 100644
--- a/Build/source/libs/gmp/include/Makefile.in
+++ b/Build/source/libs/gmp/include/Makefile.in
@@ -84,6 +84,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/gmp-alloca.m4 \
$(top_srcdir)/m4/gmp-attribute.m4 \
$(top_srcdir)/m4/gmp-double-format.m4 \
+ $(top_srcdir)/m4/gmp-extern-inline.m4 \
$(top_srcdir)/../../m4/kpse-common.m4 \
$(top_srcdir)/../../m4/kpse-visibility.m4 \
$(top_srcdir)/../../m4/kpse-warnings.m4 \
diff --git a/Build/source/libs/gmp/m4/gmp-extern-inline.m4 b/Build/source/libs/gmp/m4/gmp-extern-inline.m4
new file mode 100644
index 00000000000..c3dca4137b2
--- /dev/null
+++ b/Build/source/libs/gmp/m4/gmp-extern-inline.m4
@@ -0,0 +1,33 @@
+# Autoconf macros for the GNU MP Library.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
+#
+# Copyright (C) 2014 Peter Breitenlohner <tex-live@tug.org>
+# Extracted from gmp-6.0.0/acinclude.m4 and adapted for TeX Live.
+#
+# This file is free software; the copyright holders
+# give unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# GMP_H_EXTERN_INLINE
+# -------------------
+# If the compiler has an "inline" of some sort, check whether the
+# #ifdef's in gmp.h recognise it.
+
+AC_DEFUN([GMP_H_EXTERN_INLINE], [dnl
+AC_REQUIRE([AC_C_INLINE])
+AS_CASE([$ac_cv_c_inline],
+ [no], [],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define __GMP_WITHIN_CONFIGURE_INLINE 1
+#include "gmp-tmp.h"
+#ifndef __GMP_EXTERN_INLINE
+die die die
+#endif]],
+ [])],
+ [], [dnl
+AS_CASE([$ac_cv_c_inline],
+ [yes], [tmp_inline=inline],
+ [tmp_inline=$ac_cv_c_inline])
+AC_MSG_WARN([gmp.h doesnt recognise compiler "$tmp_inline", inlines will be unavailable])])])
+])
+
+