3 # Figure out how to get the current GMT offset. If `struct tm' has a
4 # `tm_gmtoff' member, define `HAVE_STRUCT_TM_TM_GMTOFF'. Otherwise, if the
5 # external variable `timezone' is found, define `HAVE_TIMEZONE'.
6 AC_DEFUN([CIT_STRUCT_TM],
7 [AC_REQUIRE([AC_STRUCT_TM])dnl
8 AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[#include <sys/types.h>
9 #include <$ac_cv_struct_tm>
11 if test "$ac_cv_member_struct_tm_tm_gmtoff" != yes; then
12 AC_CACHE_CHECK(for timezone, ac_cv_var_timezone,
15 [printf("%ld", (long)timezone);], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)])
16 if test $ac_cv_var_timezone = yes; then
17 AC_DEFINE(HAVE_TIMEZONE, 1,
18 [Define if you don't have `tm_gmtoff' but do have the external
19 variable `timezone'.])
24 AC_DEFUN([AC_CHECK_DB],[
27 AS_VAR_PUSHDEF([ac_tr_db], [ac_cv_db_lib_${lib}])dnl
28 bogo_saved_LIBS="$LIBS"
30 AC_CACHE_CHECK([for db_create in -l${lib}], ac_tr_db,
31 [AC_TRY_LINK([#include <db.h>], [int foo=db_create((void *)0, (void *) 0,
33 [AS_VAR_SET(ac_tr_db, yes)],
34 [AS_VAR_SET(ac_tr_db, no)])
36 AS_IF([test AS_VAR_GET(ac_tr_db) = yes],
38 LIBS="$bogo_saved_LIBS"
39 SERVER_LIBS="$SERVER_LIBS -l$lib"
41 [LIBS="$bogo_saved_LIBS"
43 AS_VAR_POPDEF([ac_tr_db])dnl
44 test "$db" = "yes" && break
46 if test "$db" = "no"; then