1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
"http://www.w3.org/TR/html4/strict.dtd">
6
<title>Autoconf Macro: ac_var_timezone_externals</title>
7
<link rel="stylesheet" type="text/css" href="ac-archive.css">
11
<table summary="web navigation" style="width:100%;">
14
<td style="width:50%;" align="center">[<a href="index.html">Macro Index
17
<td style="width:50%;" align="center">[<a href=
18
"../m4source/ac_var_timezone_externals.m4">Download M4 Source</a>]</td>
24
<h1>ac_var_timezone_externals</h1>
29
<p style="text-align:left; white-space:nowrap;">
30
<code>AC_VAR_TIMEZONE_EXTERNALS</code></p>
36
<p>Use instead of `AC_STRUCT_TIMEZONE' to determine whether the the
37
external timezone variables `timezone', `altzone' and `daylight' exist,
38
defining `HAVE_TIMEZONE', `HAVE_ALTZONE' and `HAVE_DAYLIGHT' respectively
39
(as well as gaining the macros defined by `AC_STRUCT_TIMEZONE').</p>
45
<p>1.3 (last modified: 2002-01-04)</p>
51
<p>Mark R.Bannister <markb@freedomware.co.uk></p>
54
<h2>M4 Source Code</h2>
57
<pre class="m4source">
58
AC_DEFUN([AC_VAR_TIMEZONE_EXTERNALS],
59
[ AC_REQUIRE([AC_STRUCT_TIMEZONE])dnl
60
AC_CACHE_CHECK(for timezone external, mb_cv_var_timezone,
61
[ AC_TRY_LINK([#include <time.h>], [return (int)timezone;],
62
mb_cv_var_timezone=yes,
63
mb_cv_var_timezone=no)
65
AC_CACHE_CHECK(for altzone external, mb_cv_var_altzone,
66
[ AC_TRY_LINK([#include <time.h>], [return (int)altzone;],
67
mb_cv_var_altzone=yes,
70
AC_CACHE_CHECK(for daylight external, mb_cv_var_daylight,
71
[ AC_TRY_LINK([#include <time.h>], [return (int)daylight;],
72
mb_cv_var_daylight=yes,
73
mb_cv_var_daylight=no)
75
if test $mb_cv_var_timezone = yes; then
76
AC_DEFINE([HAVE_TIMEZONE], 1,
77
[Define if you have the external `timezone' variable.])
79
if test $mb_cv_var_altzone = yes; then
80
AC_DEFINE([HAVE_ALTZONE], 1,
81
[Define if you have the external `altzone' variable.])
83
if test $mb_cv_var_daylight = yes; then
84
AC_DEFINE([HAVE_DAYLIGHT], 1,
85
[Define if you have the external `daylight' variable.])
94
<a href="COPYING.html">GNU General Public License</a> with this special
95
<a href="COPYING-Exception.html">exception</a>.