Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / lzo / autoconf / local.m4
blob7cebb1dc4099a6a4307dafab69580666503b092a
1 dnl Serial 2 mfx/m4/acc.m4
3 AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
4 AC_C_BIGENDIAN([AC_DEFINE(ACC_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(ACC_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
5 ])
7 AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
8 AC_HEADER_TIME
9 AC_CHECK_HEADERS([assert.h ctype.h dirent.h errno.h fcntl.h float.h limits.h malloc.h memory.h setjmp.h signal.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h strings.h time.h unistd.h utime.h sys/mman.h sys/resource.h sys/stat.h sys/time.h sys/types.h sys/wait.h])
12 AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
13 AC_CHECK_FUNCS(access alloca atexit atoi atol chmod chown clock_getcpuclockid clock_getres clock_gettime ctime difftime fstat getenv getpagesize getrusage gettimeofday gmtime isatty localtime longjmp lstat memcmp memcpy memmove memset mkdir mktime mmap mprotect munmap qsort raise rmdir setjmp signal snprintf strcasecmp strchr strdup strerror strftime stricmp strncasecmp strnicmp strrchr strstr time umask utime vsnprintf)
16 AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
17 AC_CHECK_SIZEOF(short)
18 AC_CHECK_SIZEOF(int)
19 AC_CHECK_SIZEOF(long)
21 AC_CHECK_SIZEOF(long long)
22 AC_CHECK_SIZEOF(__int16)
23 AC_CHECK_SIZEOF(__int32)
24 AC_CHECK_SIZEOF(__int64)
26 AC_CHECK_SIZEOF(void *)
27 AC_CHECK_SIZEOF(size_t)
28 AC_CHECK_SIZEOF(ptrdiff_t)
31 AC_DEFUN([mfx_ACC_ACCCHK], [
32 mfx_tmp=$1
33 mfx_save_CPPFLAGS=$CPPFLAGS
34 dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
35 test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
37 AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
39 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
40 [[#define ACC_CONFIG_NO_HEADER 1
41 #include "acc/acc.h"
42 #include "acc/acc_incd.h"
44 #undef  ACCCHK_ASSERT
45 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
46 #include "acc/acc_chk.ch"
48 #undef  ACCCHK_ASSERT
49 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
50 static void test_acc_compile_time_assert(void) {
51 #include "acc/acc_chk.ch"
54 #undef NDEBUG
55 #include <assert.h>
56 #undef  ACCCHK_ASSERT
57 #define ACCCHK_ASSERT(expr)     assert(expr);
58 static int test_acc_run_time_assert(int r) {
59 #include "acc/acc_chk.ch"
60 return r;
62 ]], [[
63 test_acc_compile_time_assert();
64 if (test_acc_run_time_assert(1) != 1) return 1;
66 )])
68 mfx_tmp=FAILED
69 _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
70 rm -f conftest.$ac_ext conftest.$ac_objext
72 CPPFLAGS=$mfx_save_CPPFLAGS
74 AC_MSG_RESULT([$mfx_tmp])
75 case x$mfx_tmp in
76   xpassed | xyes) ;;
77   *)
78     AC_MSG_NOTICE([])
79     AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
80     AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
81     AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
82     AC_MSG_NOTICE([Thanks for your support.])
83     AC_MSG_NOTICE([])
84     AC_MSG_ERROR([ACC conformance test failed. Stop.])
85 dnl    AS_EXIT
86     ;;
87 esac
90 dnl Serial 2 mfx/m4/acc_miniacc.m4
92 AC_DEFUN([mfx_MINIACC_ACCCHK], [
93 mfx_tmp=$1
94 mfx_save_CPPFLAGS=$CPPFLAGS
95 dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
96 test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
98 AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
100 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
101 [[#define ACC_CONFIG_NO_HEADER 1
102 #define ACC_WANT_ACC_INCD_H 1
103 #include $2
105 #undef  ACCCHK_ASSERT
106 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
107 #define ACC_WANT_ACC_CHK_CH 1
108 #include $2
110 #undef  ACCCHK_ASSERT
111 #define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
112 static void test_acc_compile_time_assert(void) {
113 #define ACC_WANT_ACC_CHK_CH 1
114 #include $2
117 #undef NDEBUG
118 #include <assert.h>
119 #undef  ACCCHK_ASSERT
120 #define ACCCHK_ASSERT(expr)     assert(expr);
121 static int test_acc_run_time_assert(int r) {
122 #define ACC_WANT_ACC_CHK_CH 1
123 #include $2
124 return r;
126 ]], [[
127 test_acc_compile_time_assert();
128 if (test_acc_run_time_assert(1) != 1) return 1;
132 mfx_tmp=FAILED
133 _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
134 rm -f conftest.$ac_ext conftest.$ac_objext
136 CPPFLAGS=$mfx_save_CPPFLAGS
138 AC_MSG_RESULT([$mfx_tmp])
139 case x$mfx_tmp in
140   xpassed | xyes) ;;
141   *)
142     AC_MSG_NOTICE([])
143     AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
144     AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
145     AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
146     AC_MSG_NOTICE([Thanks for your support.])
147     AC_MSG_NOTICE([])
148     AC_MSG_ERROR([ACC conformance test failed. Stop.])
149 dnl    AS_EXIT
150     ;;
151 esac
154 dnl Serial 2 mfx/m4/cppflags.m4
156 AC_DEFUN([mfx_PROG_CPPFLAGS], [
157 AC_MSG_CHECKING([whether the C preprocessor needs special flags])
159 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
160 [[#include <limits.h>
161 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
162 #  include "your C preprocessor is broken 1"
163 #elif (0xffffu == 0xfffffffful)
164 #  include "your C preprocessor is broken 2"
165 #elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
166 #  include "your C preprocessor is broken 3"
167 #endif
168 ]], [[ ]]
171 mfx_save_CPPFLAGS=$CPPFLAGS
172 mfx_tmp=ERROR
173 for mfx_arg in "" -no-cpp-precomp
175   CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
176   _AC_COMPILE_IFELSE([],
177 [mfx_tmp=$mfx_arg
178 break])
179 done
180 CPPFLAGS=$mfx_save_CPPFLAGS
181 rm -f conftest.$ac_ext conftest.$ac_objext
182 case x$mfx_tmp in
183   x)
184     AC_MSG_RESULT([none needed]) ;;
185   xERROR)
186     AC_MSG_RESULT([ERROR])
187     AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
188     ;;
189   *)
190     AC_MSG_RESULT([$mfx_tmp])
191     CPPFLAGS="$mfx_tmp $CPPFLAGS"
192     ;;
193 esac
196 dnl Serial 10  -*- Autoconf -*-
197 # Enable extensions on systems that normally disable them.
199 # Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc.
200 # This file is free software; the Free Software Foundation
201 # gives unlimited permission to copy and/or distribute it,
202 # with or without modifications, as long as this notice is preserved.
204 # This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
205 # Autoconf.  Perhaps we can remove this once we can assume Autoconf
206 # 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
207 # enough in this area it's likely we'll need to redefine
208 # AC_USE_SYSTEM_EXTENSIONS for quite some time.
210 # If autoconf reports a warning
211 #     warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
212 # or  warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
213 # the fix is
214 #   1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
215 #      but always AC_REQUIREd,
216 #   2) to ensure that for each occurrence of
217 #        AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
218 #      or
219 #        AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
220 #      the corresponding gnulib module description has 'extensions' among
221 #      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
222 #      invocation occurs in gl_EARLY, not in gl_INIT.
224 # AC_USE_SYSTEM_EXTENSIONS
225 # ------------------------
226 # Enable extensions on systems that normally disable them,
227 # typically due to standards-conformance issues.
228 # Remember that #undef in AH_VERBATIM gets replaced with #define by
229 # AC_DEFINE.  The goal here is to define all known feature-enabling
230 # macros, then, if reports of conflicts are made, disable macros that
231 # cause problems on some platforms (such as __EXTENSIONS__).
232 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
233 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
234 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
236   AC_REQUIRE([AC_CANONICAL_HOST])
238   AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
239   if test "$MINIX" = yes; then
240     AC_DEFINE([_POSIX_SOURCE], [1],
241       [Define to 1 if you need to in order for `stat' and other
242        things to work.])
243     AC_DEFINE([_POSIX_1_SOURCE], [2],
244       [Define to 2 if the system does not provide POSIX.1 features
245        except with this defined.])
246     AC_DEFINE([_MINIX], [1],
247       [Define to 1 if on MINIX.])
248   fi
250   dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
251   dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
252   dnl provided.
253   case "$host_os" in
254     hpux*)
255       AC_DEFINE([_XOPEN_SOURCE], [500],
256         [Define to 500 only on HP-UX.])
257       ;;
258   esac
260   AH_VERBATIM([__EXTENSIONS__],
261 [/* Enable extensions on AIX 3, Interix.  */
262 #ifndef _ALL_SOURCE
263 # undef _ALL_SOURCE
264 #endif
265 /* Enable general extensions on MacOS X.  */
266 #ifndef _DARWIN_C_SOURCE
267 # undef _DARWIN_C_SOURCE
268 #endif
269 /* Enable GNU extensions on systems that have them.  */
270 #ifndef _GNU_SOURCE
271 # undef _GNU_SOURCE
272 #endif
273 /* Enable threading extensions on Solaris.  */
274 #ifndef _POSIX_PTHREAD_SEMANTICS
275 # undef _POSIX_PTHREAD_SEMANTICS
276 #endif
277 /* Enable extensions on HP NonStop.  */
278 #ifndef _TANDEM_SOURCE
279 # undef _TANDEM_SOURCE
280 #endif
281 /* Enable general extensions on Solaris.  */
282 #ifndef __EXTENSIONS__
283 # undef __EXTENSIONS__
284 #endif
286   AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
287     [ac_cv_safe_to_define___extensions__],
288     [AC_COMPILE_IFELSE(
289        [AC_LANG_PROGRAM([[
290 #         define __EXTENSIONS__ 1
291           ]AC_INCLUDES_DEFAULT])],
292        [ac_cv_safe_to_define___extensions__=yes],
293        [ac_cv_safe_to_define___extensions__=no])])
294   test $ac_cv_safe_to_define___extensions__ = yes &&
295     AC_DEFINE([__EXTENSIONS__])
296   AC_DEFINE([_ALL_SOURCE])
297   AC_DEFINE([_DARWIN_C_SOURCE])
298   AC_DEFINE([_GNU_SOURCE])
299   AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
300   AC_DEFINE([_TANDEM_SOURCE])
301 ])# AC_USE_SYSTEM_EXTENSIONS
303 # gl_USE_SYSTEM_EXTENSIONS
304 # ------------------------
305 # Enable extensions on systems that normally disable them,
306 # typically due to standards-conformance issues.
307 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
309   dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
310   dnl gnulib does not need it. But if it gets required by third-party macros
311   dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
312   dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
313   dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
314   dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
315   AC_REQUIRE([AC_GNU_SOURCE])
317   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
320 dnl Serial 4 mfx/m4/limits.m4
322 AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
323 AC_CACHE_CHECK([whether limits.h is sane],
324 mfx_cv_header_sane_limits_h,
325 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
326 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
327 #  if defined(__APPLE__) && defined(__GNUC__)
328 #    error "your preprocessor is broken - use compiler option -no-cpp-precomp"
329 #  else
330 #    include "your preprocessor is broken"
331 #  endif
332 #endif
333 #define MFX_0xffff          0xffff
334 #define MFX_0xffffffffL     4294967295ul
335 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
336 #  include "error CHAR_BIT"
337 #endif
338 #if !defined(UCHAR_MAX)
339 #  include "error UCHAR_MAX 1"
340 #endif
341 #if !defined(USHRT_MAX)
342 #  include "error USHRT_MAX 1"
343 #endif
344 #if !defined(UINT_MAX)
345 #  include "error UINT_MAX 1"
346 #endif
347 #if !defined(ULONG_MAX)
348 #  include "error ULONG_MAX 1"
349 #endif
350 #if !defined(SHRT_MAX)
351 #  include "error SHRT_MAX 1"
352 #endif
353 #if !defined(INT_MAX)
354 #  include "error INT_MAX 1"
355 #endif
356 #if !defined(LONG_MAX)
357 #  include "error LONG_MAX 1"
358 #endif
359 #if (UCHAR_MAX < 1)
360 #  include "error UCHAR_MAX 2"
361 #endif
362 #if (USHRT_MAX < 1)
363 #  include "error USHRT_MAX 2"
364 #endif
365 #if (UINT_MAX < 1)
366 #  include "error UINT_MAX 2"
367 #endif
368 #if (ULONG_MAX < 1)
369 #  include "error ULONG_MAX 2"
370 #endif
371 #if (UCHAR_MAX < 0xff)
372 #  include "error UCHAR_MAX 3"
373 #endif
374 #if (USHRT_MAX < MFX_0xffff)
375 #  include "error USHRT_MAX 3"
376 #endif
377 #if (UINT_MAX < MFX_0xffff)
378 #  include "error UINT_MAX 3"
379 #endif
380 #if (ULONG_MAX < MFX_0xffffffffL)
381 #  include "error ULONG_MAX 3"
382 #endif
383 #if (USHRT_MAX > UINT_MAX)
384 #  include "error USHRT_MAX vs UINT_MAX"
385 #endif
386 #if (UINT_MAX > ULONG_MAX)
387 #  include "error UINT_MAX vs ULONG_MAX"
388 #endif
389 ]], [[
390 #if (USHRT_MAX == MFX_0xffff)
391 { typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
392 #elif (USHRT_MAX >= MFX_0xffff)
393 { typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
394 #endif
395 #if (UINT_MAX == MFX_0xffff)
396 { typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
397 #elif (UINT_MAX >= MFX_0xffff)
398 { typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
399 #endif
400 #if (ULONG_MAX == MFX_0xffff)
401 { typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
402 #elif (ULONG_MAX >= MFX_0xffff)
403 { typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
404 #endif
405 #if !defined(_CRAY1) /* CRAY PVP systems */
406 #if (USHRT_MAX == MFX_0xffffffffL)
407 { typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
408 #elif (USHRT_MAX >= MFX_0xffffffffL)
409 { typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
410 #endif
411 #endif /* _CRAY1 */
412 #if (UINT_MAX == MFX_0xffffffffL)
413 { typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
414 #elif (UINT_MAX >= MFX_0xffffffffL)
415 { typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
416 #endif
417 #if (ULONG_MAX == MFX_0xffffffffL)
418 { typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
419 #elif (ULONG_MAX >= MFX_0xffffffffL)
420 { typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
421 #endif
422 ]])],
423 [mfx_cv_header_sane_limits_h=yes],
424 [mfx_cv_header_sane_limits_h=no])])
427 dnl Serial 2 mfx/m4/lzo.m4
429 AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
430 AC_C_BIGENDIAN([AC_DEFINE(LZO_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(LZO_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
433 dnl Serial 2 mfx/m4/mfx.m4
435 AC_DEFUN([mfx_CHECK_SIZEOF], [
436 AC_CHECK_SIZEOF(__int32)
437 AC_CHECK_SIZEOF(intmax_t)
438 AC_CHECK_SIZEOF(uintmax_t)
439 AC_CHECK_SIZEOF(intptr_t)
440 AC_CHECK_SIZEOF(uintptr_t)
442 AC_CHECK_SIZEOF(float)
443 AC_CHECK_SIZEOF(double)
444 AC_CHECK_SIZEOF(long double)
446 AC_CHECK_SIZEOF(dev_t)
447 AC_CHECK_SIZEOF(fpos_t)
448 AC_CHECK_SIZEOF(mode_t)
449 AC_CHECK_SIZEOF(off_t)
450 AC_CHECK_SIZEOF(ssize_t)
451 AC_CHECK_SIZEOF(time_t)
454 AC_DEFUN([mfx_CHECK_LIB_WINMM], [
455 if test "X$GCC" = Xyes; then
456 case $host_os in
457 cygwin* | mingw* | pw32*)
458      test "X$LIBS" != "X" && LIBS="$LIBS "
459      LIBS="${LIBS}-lwinmm" ;;
460 esac
464 dnl Serial 2 mfx/m4/nrv.m4
466 AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [
467 AC_C_BIGENDIAN([AC_DEFINE(NRV_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(NRV_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])
469 # Checks for stat-related time functions.
471 # Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2011 Free Software
472 # Foundation, Inc.
474 # This file is free software; the Free Software Foundation
475 # gives unlimited permission to copy and/or distribute it,
476 # with or without modifications, as long as this notice is preserved.
478 dnl From Paul Eggert.
480 # st_atim.tv_nsec - Linux, Solaris, Cygwin
481 # st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
482 # st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
483 # st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
485 # st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
486 # st_birthtim - Cygwin 1.7.0+
488 AC_DEFUN([gl_STAT_TIME],
490   AC_REQUIRE([AC_C_INLINE])
491   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
492   AC_CHECK_HEADERS_ONCE([sys/time.h])
494   AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
495     [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
496        [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
497        [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
498           [[
499             #include <sys/types.h>
500             #include <sys/stat.h>
501             #if HAVE_SYS_TIME_H
502             # include <sys/time.h>
503             #endif
504             #include <time.h>
505             struct timespec ts;
506             struct stat st;
507           ]],
508           [[
509             st.st_atim = ts;
510           ]])],
511           [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
512           [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
513      if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
514        AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
515          [Define to 1 if the type of the st_atim member of a struct stat is
516           struct timespec.])
517      fi],
518     [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
519        [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
520           [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
521              [#include <sys/types.h>
522               #include <sys/stat.h>])],
523           [#include <sys/types.h>
524            #include <sys/stat.h>])],
525        [#include <sys/types.h>
526         #include <sys/stat.h>])],
527     [#include <sys/types.h>
528      #include <sys/stat.h>])
531 # Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
532 # and NTFS (Cygwin).
533 # There was a time when this field was named st_createtime (21 June
534 # 2002 to 16 July 2002) But that window is very small and applied only
535 # to development code, so systems still using that configuration are
536 # not supported.  See revisions 1.10 and 1.11 of FreeBSD's
537 # src/sys/ufs/ufs/dinode.h.
539 AC_DEFUN([gl_STAT_BIRTHTIME],
541   AC_REQUIRE([AC_C_INLINE])
542   AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
543   AC_CHECK_HEADERS_ONCE([sys/time.h])
544   AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
545     [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
546       [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
547          [#include <sys/types.h>
548           #include <sys/stat.h>])],
549        [#include <sys/types.h>
550         #include <sys/stat.h>])],
551     [#include <sys/types.h>
552      #include <sys/stat.h>])
555 dnl Serial 2 mfx/m4/ucl.m4
557 AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [
558 AC_C_BIGENDIAN([AC_DEFINE(UCL_ABI_BIG_ENDIAN,1,[Define to 1 if your machine is big endian.])],[AC_DEFINE(UCL_ABI_LITTLE_ENDIAN,1,[Define to 1 if your machine is little endian.])])