diff options
author | panne <unknown> | 2003-08-18 12:46:21 +0000 |
---|---|---|
committer | panne <unknown> | 2003-08-18 12:46:21 +0000 |
commit | ca9f59db55f686347d42e6e5938a24ce21521d2e (patch) | |
tree | b7fd070772e7962f748a07db94fc07918cd8b43c | |
parent | 1efaaec208862af1780f33774ab3f5da117880b1 (diff) | |
download | haskell-ca9f59db55f686347d42e6e5938a24ce21521d2e.tar.gz |
[project @ 2003-08-18 12:46:20 by panne]
Revamped altzone detection. Note that we test only for successful
compilation now, not for successful linking, but this is what most
autoconf macros do.
-rw-r--r-- | acconfig.h | 5 | ||||
-rw-r--r-- | aclocal.m4 | 24 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | mk/config.h.in | 5 |
4 files changed, 19 insertions, 17 deletions
diff --git a/acconfig.h b/acconfig.h index 4ce956862e..708bc924ef 100644 --- a/acconfig.h +++ b/acconfig.h @@ -348,8 +348,9 @@ /* The value of EXDEV. */ #undef CCONST_EXDEV -/* Define if time.h or sys/time.h define the altzone variable */ -#undef HAVE_ALTZONE +/* Define to 1 if you have the declaration of `altzone', and to 0 if you + don't. */ +#undef HAVE_DECL_ALTZONE /* Define if you have /bin/sh */ #undef HAVE_BIN_SH diff --git a/aclocal.m4 b/aclocal.m4 index 6d4e5c37e0..c339a849e5 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -3,11 +3,15 @@ # To be a good autoconf citizen, names of local macros have prefixed with FP_ to # ensure we don't clash with any pre-supplied autoconf ones. -dnl *** Is altzone available? *** -dnl -AC_DEFUN(FPTOOLS_ALTZONE, -[AC_CACHE_CHECK([altzone], fptools_cv_altzone, -[AC_TRY_LINK([#if TIME_WITH_SYS_TIME + +# FP_ALTZONE +# ------------------- +# Defines HAVE_DECL_ALTZONE to 1 if declared, 0 otherwise. +# Used by base package. +AC_DEFUN([FP_ALTZONE], +[AC_REQUIRE([AC_HEADER_TIME])dnl +AC_CHECK_HEADERS([sys/time.h]) +AC_CHECK_DECLS([altzone], [], [],[#if TIME_WITH_SYS_TIME # include <sys/time.h> # include <time.h> #else @@ -16,13 +20,9 @@ AC_DEFUN(FPTOOLS_ALTZONE, # else # include <time.h> # endif -#endif -], [return altzone;], -fptools_cv_altzone=yes, fptools_cv_altzone=no)]) -if test "$fptools_cv_altzone" = yes; then - AC_DEFINE(HAVE_ALTZONE) -fi -]) +#endif]) +])# FP_ALTZONE + dnl *** Does libc contain GNU regex? *** diff --git a/configure.ac b/configure.ac index 030e401cf0..f42c611269 100644 --- a/configure.ac +++ b/configure.ac @@ -848,7 +848,7 @@ dnl ** how do we get a timezone name, and UTC offset ? AC_STRUCT_TIMEZONE dnl ** do we have altzone? -FPTOOLS_ALTZONE +FP_ALTZONE dnl ** does struct stat contain st_blksize? AC_STRUCT_ST_BLKSIZE diff --git a/mk/config.h.in b/mk/config.h.in index 2f1789c1c0..52170353be 100644 --- a/mk/config.h.in +++ b/mk/config.h.in @@ -348,8 +348,9 @@ /* The value of EXDEV. */ #undef CCONST_EXDEV -/* Define if time.h or sys/time.h define the altzone variable */ -#undef HAVE_ALTZONE +/* Define to 1 if you have the declaration of `altzone', and to 0 if you + don't. */ +#undef HAVE_DECL_ALTZONE /* Define if you have /bin/sh */ #undef HAVE_BIN_SH |