1AC_INIT(delay.c) 2AM_INIT_AUTOMAKE(delay, 1.6) 3AC_PROG_CC 4AC_PROG_YACC 5AM_PROG_LEX 6#AC_DECL_YYTEXT 7AC_HEADER_STDC 8 9# Thanks to Vincent Archer 10 11AC_DEFUN(AC_STRUCT_TM_GMTOFF, 12[AC_REQUIRE([AC_STRUCT_TM])dnl 13AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, 14[AC_TRY_COMPILE([#include <sys/types.h> 15#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], 16 ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) 17if test "$ac_cv_struct_tm_gmtoff" = yes; then 18 AC_DEFINE(HAVE_TM_GMTOFF) 19else 20 AC_CACHE_CHECK(for timezone, ac_cv_var_timezone, 21[AC_TRY_LINK( 22changequote(<<, >>)dnl 23<<#include <time.h> 24#ifndef timezone /* Just in case. */ 25extern int timezone; 26#endif>>, 27changequote([, ])dnl 28[0*timezone;], ac_cv_var_timezone=yes, ac_cv_var_timezone=no)]) 29 if test $ac_cv_var_timezone = yes; then 30 AC_DEFINE(HAVE_TIMEZONE) 31 fi 32fi 33]) 34 35AC_STRUCT_TM 36AC_STRUCT_TM_GMTOFF 37 38AC_CHECK_LIB(curses, initscr) 39AC_CHECK_HEADERS(curses.h) 40 41AC_OUTPUT(Makefile) 42 43