Un-windozed the unistd check
authorDick Porter <dick@src.gnome.org>
Mon, 18 Jun 2001 13:04:10 +0000 (13:04 +0000)
committerDick Porter <dick@src.gnome.org>
Mon, 18 Jun 2001 13:04:10 +0000 (13:04 +0000)
(there was a ^M at the end of the line, that caused strange messages to
come from configure)

configure.in

index 6cd8bfa..2417e27 100644 (file)
@@ -185,7 +185,7 @@ dnl *********************************
 dnl *** Networking library checks ***
 dnl *********************************
 
-AC_CHECK_HEADERS(unistd.h)\r
+AC_CHECK_HEADERS(unistd.h)
 AC_CHECK_HEADERS(netinet/in.h netinet/tcp.h)
 AC_CHECK_HEADERS(sys/sockio.h sys/poll.h sys/param.h)
 
@@ -458,6 +458,38 @@ AC_CHECK_ALIGNOF(gstruct)
 CPPFLAGS=$orig_CPPFLAGS
 
 
+dnl ***********************************************************************
+dnl *** Add any preprocessor options needed for ISO C99 IEEE754 support ***
+dnl ***********************************************************************
+ISO_CFLAGS=""
+orig_CPPFLAGS=$CPPFLAGS
+AC_MSG_CHECKING(if ISO C99 IEEE754 support is enabled by default)
+AC_TRY_COMPILE([ #include <math.h>], [
+               fpclassify(INFINITY)==FP_INFINITE;
+       ], [
+               dnl Nothing special needed
+               AC_MSG_RESULT(ok)
+       ], [
+               AC_MSG_RESULT(no)
+
+               dnl On glibc _GNU_SOURCE includes _ISOC99_SOURCE
+               AC_MSG_CHECKING(whether _GNU_SOURCE is needed for ISO C99 IEEE754 support)
+               CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
+               AC_TRY_COMPILE([ #include <math.h>], [
+                       fpclassify(INFINITY)==FP_INFINITE;
+               ], [
+                       AC_MSG_RESULT(ok)
+                       ISO_CFLAGS="-D_GNU_SOURCE"
+               ], [
+                       AC_MSG_RESULT(no)
+                       dnl Add other variants here
+                       AC_MSG_ERROR(No IEEE754 support)
+               ])
+       ])
+CPPFLAGS=$orig_CPPFLAGS
+CFLAGS="$CFLAGS $ISO_CFLAGS"
+
+
 dnl *************************************
 dnl *** Warnings to show if using GCC ***
 dnl *************************************