Added detection of platforms which don't have external timezone and
daylight variables, and emulation of these variables.

diff --git a/configure.ac b/configure.ac
index d09fdab..3fd80df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1474,6 +1474,22 @@
 dnl Check for stat.st_blocks
 AC_CHECK_MEMBERS([struct stat.st_blocks])
 
+dnl Check for the external timezone variables timezone and daylight
+AC_CACHE_CHECK([for timezone variable], ac_cv_have_timezone,
+               AC_TRY_LINK([#include <time.h>],[timezone;],
+			   ac_cv_have_timezone="yes", ac_cv_have_timezone="no"))
+if test "$ac_cv_have_timezone" = "yes"
+then
+    AC_DEFINE(HAVE_TIMEZONE, 1, [Define if you have the timezone variable])
+fi
+AC_CACHE_CHECK([for daylight variable], ac_cv_have_daylight,
+               AC_TRY_LINK([#include <time.h>],[daylight;],
+			   ac_cv_have_daylight="yes", ac_cv_have_daylight="no"))
+if test "$ac_cv_have_daylight" = "yes"
+then
+    AC_DEFINE(HAVE_DAYLIGHT, 1, [Define if you have the daylight variable])
+fi
+
 dnl *** check for the need to define platform-specific symbols
 
 case $host_cpu in