summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreid <unknown>1998-03-03 04:45:09 +0000
committerreid <unknown>1998-03-03 04:45:09 +0000
commita4de2383ef0f0e919724bed3ce665b5402c69fe0 (patch)
tree810465e012d5d50f37a63533e403aa69b09d9eb9
parent4650a8177855fab974062cbe8f17689c1f3c3e9c (diff)
downloadhaskell-a4de2383ef0f0e919724bed3ce665b5402c69fe0.tar.gz
[project @ 1998-03-03 04:45:06 by reid]
Added more feature tests
-rw-r--r--acconfig.h72
-rw-r--r--aclocal.m419
-rw-r--r--configure.in10
3 files changed, 100 insertions, 1 deletions
diff --git a/acconfig.h b/acconfig.h
new file mode 100644
index 0000000000..5c8dbcb49e
--- /dev/null
+++ b/acconfig.h
@@ -0,0 +1,72 @@
+/* acconfig.h
+
+ Descriptive text for the C preprocessor macros that
+ the fptools configuration script can define.
+ The current version may not use all of them; autoheader copies the ones
+ your configure.in uses into your configuration header file templates.
+
+ The entries are in sort -df order: alphabetical, case insensitive,
+ ignoring punctuation (such as underscores). Although this order
+ can split up related entries, it makes it easier to check whether
+ a given entry is in the file.
+
+ Leave the following blank line there!! Autoheader needs it. */
+
+
+/* The following definitions will only work on Linux.
+ I (ADR) make no apology for this because we SHOULD NOT
+ be using system based tests and I want to get this puppy running
+ tonight. I'm forced to define these values here because the
+ current system contains 2 (two) config.h files - both of
+ which are needed. Will someone at Glasgow please fix this mess. */
+#define HostPlatform_TYPE i386_unknown_linux
+#define TargetPlatform_TYPE i386_unknown_linux
+#define BuildPlatform_TYPE i386_unknown_linux
+
+#define i386_unknown_linux_HOST 1
+#define i386_unknown_linux_TARGET 1
+#define i386_unknown_linux_BUILD 1
+
+#define i386_HOST_ARCH 1
+#define i386_TARGET_ARCH 1
+#define i386_BUILD_ARCH 1
+
+#define linux_HOST_OS 1
+#define linux_TARGET_OS 1
+#define linux_BUILD_OS 1
+
+#define unknown_HOST_VENDOR 1
+#define unknown_TARGET_VENDOR 1
+#define unknown_BUILD_VENDOR 1
+
+@TOP@
+
+/* Define if we're have GNU libc. */
+#undef _GNU_SOURCE
+
+/* Define if time.h or sys/time.h define the altzone variable */
+#undef HAVE_ALTZONE
+
+/* Define to the type of the timezone variable (usually long or time_t) */
+#undef TYPE_TIMEZONE
+
+/* Define to unsigned int if <sys/types.h> doesn't define */
+#undef uint
+
+/* Define to unsigned long int if <sys/types.h> doesn't define */
+#undef ulong
+
+/* Define to unsigned long long int if <sys/types.h> doesn't define */
+#undef ullong
+
+
+/* Leave that blank line there!! Autoheader needs it.
+ If you're adding to this file, keep in mind:
+ The entries are in sort -df order: alphabetical, case insensitive,
+ ignoring punctuation (such as underscores). */
+
+
+/* autoheader doesn't grok AC_CHECK_LIB_NOWARN so we have to add them
+ manually. */
+
+@BOTTOM@
diff --git a/aclocal.m4 b/aclocal.m4
index 9f526b0c9c..0535dc1072 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,9 +1,26 @@
-# $Id: aclocal.m4,v 1.18 1998/02/12 22:25:13 sof Exp $
+# $Id: aclocal.m4,v 1.19 1998/03/03 04:45:07 reid Exp $
#
# Extra autoconf macros for the Glasgow fptools
#
#
+# Are we running under the GNU libc? Need -D_GNU_SOURCE to get
+# caddr_t and such.
+#
+AC_DEFUN(AC_GNU_LIBC,
+[AC_CACHE_CHECK([GNU libc], ac_cv_gnu_libc,
+[AC_EGREP_CPP(yes,
+[#include <features.h>
+#ifdef __GLIBC__
+yes
+#endif
+], ac_cv_gnu_libc=yes, ac_cv_gnu_libc=no)])
+if test "$ac_cv_gnu_libc" = yes; then
+ AC_DEFINE(_GNU_SOURCE)
+fi
+])
+
+#
# Has timezone the type time_t or long (HP-UX 10.20 apparently
# has `long'..)
#
diff --git a/configure.in b/configure.in
index 97acf325ae..15e350a87d 100644
--- a/configure.in
+++ b/configure.in
@@ -451,6 +451,16 @@ dnl do we have altzone?
AC_ALTZONE
#
+dnl do we have the GNU libc?
+AC_GNU_LIBC
+
+#
+dnl define uint, ulong and ullong if not already defined
+AC_CHECK_TYPE(uint,unsigned int)
+AC_CHECK_TYPE(ulong,unsigned long)
+AC_CHECK_TYPE(ullong,unsigned long long)
+
+#
dnl ** check for specific library functions that we are interested in
#
AC_CHECK_FUNCS(access ftime getclock getpagesize getrusage gettimeofday mktime mprotect setitimer stat sysconf timelocal times vadvise vfork)