xref: /netbsd-src/external/gpl3/gcc/dist/libquadmath/acinclude.m4 (revision 181254a7b1bdde6873432bffef2d2decc4b5c22f)
1*181254a7Smrgdnl ----------------------------------------------------------------------
2*181254a7Smrgdnl This whole bit snagged from libgfortran.
3*181254a7Smrg
4*181254a7Smrgsinclude(../libtool.m4)
5*181254a7Smrgsinclude(../config/enable.m4)
6*181254a7Smrgsinclude(../config/cet.m4)
7*181254a7Smrgdnl The lines below arrange for aclocal not to bring an installed
8*181254a7Smrgdnl libtool.m4 into aclocal.m4, while still arranging for automake to
9*181254a7Smrgdnl add a definition of LIBTOOL to Makefile.in.
10*181254a7Smrgifelse(,,,[AC_SUBST(LIBTOOL)
11*181254a7SmrgAC_DEFUN([AM_PROG_LIBTOOL])
12*181254a7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN])
13*181254a7SmrgAC_DEFUN([AC_PROG_LD])
14*181254a7Smrg])
15*181254a7Smrg
16*181254a7Smrgdnl Check whether POSIX's signgam is defined in math.h.
17*181254a7SmrgAC_DEFUN([LIBQUAD_CHECK_MATH_H_SIGNGAM], [
18*181254a7Smrg  AC_CACHE_CHECK([whether the math.h includes POSIX's signgam],
19*181254a7Smrg                 libgfor_cv_have_math_h_signgam, [
20*181254a7Smrg  save_CFLAGS="$CFLAGS"
21*181254a7Smrg  CFLAGS="$CFLAGS -Werror"
22*181254a7Smrg  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
23*181254a7Smrg#include <math.h>
24*181254a7Smrgvoid foo(void) { signgam = 1; }]], [])],
25*181254a7Smrg                    libgfor_cv_have_math_h_signgam=yes,
26*181254a7Smrg                    libgfor_cv_have_math_h_signgam=no)
27*181254a7Smrg  CFLAGS="$save_CFLAGS"])
28*181254a7Smrg  if test $libgfor_cv_have_math_h_signgam = yes; then
29*181254a7Smrg    AC_DEFINE(HAVE_MATH_H_SIGNGAM, 1,
30*181254a7Smrg      [Define to 1 if the math.h includes POSIX's signgam.])
31*181254a7Smrg  fi])
32