1 dnl cloned from autoconf 2.13 acspecific.m4
2 AC_DEFUN(AC_C_LONG_LONG,
3 [AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
4 [if test "$GCC" = yes; then
7 AC_TRY_RUN([int main() {
9 exit(sizeof(long long) < sizeof(long)); }],
10 ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
12 if test $ac_cv_c_long_long = yes; then
13 AC_DEFINE(HAVE_LONG_LONG)
17 dnl from autoconf 2.13 acgeneral.m4, with patch:
18 dnl Date: Fri, 15 Jan 1999 05:52:41 -0800
19 dnl Message-ID: <199901151352.FAA18237@shade.twinsun.com>
20 dnl From: eggert@twinsun.com (Paul Eggert)
21 dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars
22 dnl Newsgroups: gnu.utils.bug
24 dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight
26 AC_DEFUN(AC_STRUCT_TIMEZONE_DAYLIGHT,
27 [AC_REQUIRE([AC_STRUCT_TM])dnl
28 AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
29 [AC_TRY_COMPILE([#include <sys/types.h>
30 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
31 ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
32 if test "$ac_cv_struct_tm_zone" = yes; then
33 AC_DEFINE(HAVE_TM_ZONE)
35 AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
37 changequote(<<, >>)dnl
39 #ifndef tzname /* For SGI. */
40 extern char *tzname[]; /* RS6000 and others reject char **tzname. */
43 [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
44 if test $ac_cv_var_tzname = yes; then
45 AC_DEFINE(HAVE_TZNAME)
48 AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
49 [AC_TRY_COMPILE([#include <sys/types.h>
50 #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
51 ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
52 if test "$ac_cv_struct_tm_isdst" = yes; then
53 AC_DEFINE(HAVE_TM_ISDST)
55 AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
57 changequote(<<, >>)dnl
59 #ifndef daylight /* In case IRIX #defines this, too */
63 [atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
64 if test $ac_cv_var_daylight = yes; then
65 AC_DEFINE(HAVE_DAYLIGHT)
69 dnl AC_CHECK_TYPE2(TYPE, DEFAULT)
70 AC_DEFUN(AC_CHECK_TYPE2,
71 [AC_REQUIRE([AC_HEADER_STDC])dnl
72 AC_MSG_CHECKING(for $1)
73 AC_CACHE_VAL(ac_cv_type_$1,
76 <<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
77 changequote([,]), [#include <sys/types.h>
81 #endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
82 if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
86 AC_DEFINE_UNQUOTED($1, $2)
90 dnl from autoconf 2.13 acgeneral.m4, with additional third argument
91 dnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE, [INCLUDES]])
92 AC_DEFUN(AC_CHECK_SIZEOF_INCLUDES,
93 [changequote(<<, >>)dnl
94 dnl The name to #define.
95 define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
96 dnl The cache variable name.
97 define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
99 AC_MSG_CHECKING(size of $1)
100 AC_CACHE_VAL(AC_CV_NAME,
105 FILE *f=fopen("conftestval", "w");
107 fprintf(f, "%d\n", sizeof($1));
109 }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
110 AC_MSG_RESULT($AC_CV_NAME)
111 AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
112 undefine([AC_TYPE_NAME])dnl
113 undefine([AC_CV_NAME])dnl
116 dnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE])
117 AC_DEFUN(AC_CHECK_SIZEOF_STDC_HEADERS,
118 [AC_CHECK_SIZEOF_INCLUDES($1, $2,
119 [#include <sys/types.h>