diff options
author | obrien <obrien@FreeBSD.org> | 2001-10-08 22:50:54 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2001-10-08 22:50:54 +0000 |
commit | 7860fd7670d66336ca32454f171db9c04eb45f02 (patch) | |
tree | 7bd429be46ce1518d8912bbaa3de5d4aaa7363dc /contrib/file/aclocal.m4 | |
parent | 0bc19fe08692e72d809ce05583c44d09774453c0 (diff) | |
download | FreeBSD-src-7860fd7670d66336ca32454f171db9c04eb45f02.zip FreeBSD-src-7860fd7670d66336ca32454f171db9c04eb45f02.tar.gz |
Virgin import of Christos Zoulas's FILE 3.37.
Diffstat (limited to 'contrib/file/aclocal.m4')
-rw-r--r-- | contrib/file/aclocal.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/contrib/file/aclocal.m4 b/contrib/file/aclocal.m4 index 39c1ebc..b8a4955 100644 --- a/contrib/file/aclocal.m4 +++ b/contrib/file/aclocal.m4 @@ -33,6 +33,51 @@ dnl From: eggert@twinsun.com (Paul Eggert) dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars dnl Newsgroups: gnu.utils.bug +dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight + +AC_DEFUN(AC_STRUCT_TIMEZONE_DAYLIGHT, +[AC_REQUIRE([AC_STRUCT_TM])dnl +AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;], + ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)]) +if test "$ac_cv_struct_tm_zone" = yes; then + AC_DEFINE(HAVE_TM_ZONE) +fi +AC_CACHE_CHECK(for tzname, ac_cv_var_tzname, +[AC_TRY_LINK( +changequote(<<, >>)dnl +<<#include <time.h> +#ifndef tzname /* For SGI. */ +extern char *tzname[]; /* RS6000 and others reject char **tzname. */ +#endif>>, +changequote([, ])dnl +[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)]) + if test $ac_cv_var_tzname = yes; then + AC_DEFINE(HAVE_TZNAME) + fi + +AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst, +[AC_TRY_COMPILE([#include <sys/types.h> +#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;], + ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)]) +if test "$ac_cv_struct_tm_isdst" = yes; then + AC_DEFINE(HAVE_TM_ISDST) +fi +AC_CACHE_CHECK(for daylight, ac_cv_var_daylight, +[AC_TRY_LINK( +changequote(<<, >>)dnl +<<#include <time.h> +#ifndef daylight /* In case IRIX #defines this, too */ +extern int daylight; +#endif>>, +changequote([, ])dnl +[atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)]) + if test $ac_cv_var_daylight = yes; then + AC_DEFINE(HAVE_DAYLIGHT) + fi +]) + dnl AC_CHECK_TYPE2(TYPE, DEFAULT) AC_DEFUN(AC_CHECK_TYPE2, [AC_REQUIRE([AC_HEADER_STDC])dnl |