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