summaryrefslogtreecommitdiff
path: root/Build/source/libs/gmp/m4/gmp-extern-inline.m4
blob: c3dca4137b2d1ac5d4e56b289596269dc3756d0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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])])])
])