diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/configure.in b/configure.in index c6d7542..4128971 100644 --- a/configure.in +++ b/configure.in @@ -174,11 +174,46 @@ case $HSIZET in ;; esac +dnl ---------------------------------------------------------------------- +dnl How does one figure out the local time zone? Anyone know of a +dnl Posix way to do this? +dnl + +dnl First check if `struct tm' has a `tm_gmtoff' member. +AC_MSG_CHECKING(for tm_gmtoff in struct tm) +AC_TRY_COMPILE([ +#include <sys/time.h> +#include <time.h>],[struct tm tm; tm.tm_gmtoff=0;], +AC_DEFINE(HAVE_TM_GMTOFF) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + +dnl Check whether the global variable `timezone' is defined. +AC_MSG_CHECKING(for global timezone variable) +AC_TRY_LINK([ +#include <sys/time.h> +#include <time.h>], [timezone=0;], +AC_DEFINE(HAVE_TIMEZONE) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + +dnl Check whether `struct timezone' is defined. +AC_STRUCT_TIMEZONE +AC_MSG_CHECKING(for struct timezone) +AC_TRY_COMPILE([ +#include <sys/types.h> +#include <sys/time.h> +#include <time.h>],[struct timezone tz; tz.tz_minuteswest=0;], +AC_DEFINE(HAVE_STRUCT_TIMEZONE) +AC_MSG_RESULT(yes), +AC_MSG_RESULT(no)) + dnl ---------------------------------------------------------------------- dnl Check for functions. dnl AC_CHECK_FUNCS(getpwuid gethostname system getrusage fork waitpid) +AC_CHECK_FUNCS(gettimeofday BSDgettimeofday) AC_TRY_COMPILE([#include<sys/types.h>], [off64_t n = 0;], |