1dnl Serial 2 mfx/m4/acc.m4
2
3AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
4AC_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])
6
7AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
8AC_HEADER_TIME
9AC_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])
10])
11
12AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
13AC_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)
14])
15
16AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
17AC_CHECK_SIZEOF(short)
18AC_CHECK_SIZEOF(int)
19AC_CHECK_SIZEOF(long)
20
21AC_CHECK_SIZEOF(long long)
22AC_CHECK_SIZEOF(__int16)
23AC_CHECK_SIZEOF(__int32)
24AC_CHECK_SIZEOF(__int64)
25
26AC_CHECK_SIZEOF(void *)
27AC_CHECK_SIZEOF(size_t)
28AC_CHECK_SIZEOF(ptrdiff_t)
29])
30
31AC_DEFUN([mfx_ACC_ACCCHK], [
32mfx_tmp=$1
33mfx_save_CPPFLAGS=$CPPFLAGS
34dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
35test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
36
37AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
38
39AC_LANG_CONFTEST([AC_LANG_PROGRAM(
40[[#define ACC_CONFIG_NO_HEADER 1
41#include "acc/acc.h"
42#include "acc/acc_incd.h"
43
44#undef  ACCCHK_ASSERT
45#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
46#include "acc/acc_chk.ch"
47
48#undef  ACCCHK_ASSERT
49#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
50static void test_acc_compile_time_assert(void) {
51#include "acc/acc_chk.ch"
52}
53
54#undef NDEBUG
55#include <assert.h>
56#undef  ACCCHK_ASSERT
57#define ACCCHK_ASSERT(expr)     assert(expr);
58static int test_acc_run_time_assert(int r) {
59#include "acc/acc_chk.ch"
60return r;
61}
62]], [[
63test_acc_compile_time_assert();
64if (test_acc_run_time_assert(1) != 1) return 1;
65]]
66)])
67
68mfx_tmp=FAILED
69_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
70rm -f conftest.$ac_ext conftest.$ac_objext
71
72CPPFLAGS=$mfx_save_CPPFLAGS
73
74AC_MSG_RESULT([$mfx_tmp])
75case 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.])
85dnl    AS_EXIT
86    ;;
87esac
88])
89
90dnl Serial 2 mfx/m4/acc_miniacc.m4
91
92AC_DEFUN([mfx_MINIACC_ACCCHK], [
93mfx_tmp=$1
94mfx_save_CPPFLAGS=$CPPFLAGS
95dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
96test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
97
98AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
99
100AC_LANG_CONFTEST([AC_LANG_PROGRAM(
101[[#define ACC_CONFIG_NO_HEADER 1
102#define ACC_WANT_ACC_INCD_H 1
103#include $2
104
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
109
110#undef  ACCCHK_ASSERT
111#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
112static void test_acc_compile_time_assert(void) {
113#define ACC_WANT_ACC_CHK_CH 1
114#include $2
115}
116
117#undef NDEBUG
118#include <assert.h>
119#undef  ACCCHK_ASSERT
120#define ACCCHK_ASSERT(expr)     assert(expr);
121static int test_acc_run_time_assert(int r) {
122#define ACC_WANT_ACC_CHK_CH 1
123#include $2
124return r;
125}
126]], [[
127test_acc_compile_time_assert();
128if (test_acc_run_time_assert(1) != 1) return 1;
129]]
130)])
131
132mfx_tmp=FAILED
133_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
134rm -f conftest.$ac_ext conftest.$ac_objext
135
136CPPFLAGS=$mfx_save_CPPFLAGS
137
138AC_MSG_RESULT([$mfx_tmp])
139case 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.])
149dnl    AS_EXIT
150    ;;
151esac
152])
153
154dnl Serial 2 mfx/m4/cppflags.m4
155
156AC_DEFUN([mfx_PROG_CPPFLAGS], [
157AC_MSG_CHECKING([whether the C preprocessor needs special flags])
158
159AC_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]], [[ ]]
169)])
170
171mfx_save_CPPFLAGS=$CPPFLAGS
172mfx_tmp=ERROR
173for mfx_arg in "" -no-cpp-precomp
174do
175  CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
176  _AC_COMPILE_IFELSE([],
177[mfx_tmp=$mfx_arg
178break])
179done
180CPPFLAGS=$mfx_save_CPPFLAGS
181rm -f conftest.$ac_ext conftest.$ac_objext
182case 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    ;;
193esac
194])
195
196dnl Serial 10  -*- Autoconf -*-
197# Enable extensions on systems that normally disable them.
198
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.
203
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.
209
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.
223
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__).
232AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
233[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
234AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
235
236  AC_REQUIRE([AC_CANONICAL_HOST])
237
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
249
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
259
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
285])
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
302
303# gl_USE_SYSTEM_EXTENSIONS
304# ------------------------
305# Enable extensions on systems that normally disable them,
306# typically due to standards-conformance issues.
307AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
308[
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])
316
317  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
318])
319
320dnl Serial 4 mfx/m4/limits.m4
321
322AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
323AC_CACHE_CHECK([whether limits.h is sane],
324mfx_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])])
425])
426
427dnl Serial 2 mfx/m4/lzo.m4
428
429AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
430AC_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.])])
431])
432
433dnl Serial 2 mfx/m4/mfx.m4
434
435AC_DEFUN([mfx_CHECK_SIZEOF], [
436AC_CHECK_SIZEOF(__int32)
437AC_CHECK_SIZEOF(intmax_t)
438AC_CHECK_SIZEOF(uintmax_t)
439AC_CHECK_SIZEOF(intptr_t)
440AC_CHECK_SIZEOF(uintptr_t)
441
442AC_CHECK_SIZEOF(float)
443AC_CHECK_SIZEOF(double)
444AC_CHECK_SIZEOF(long double)
445
446AC_CHECK_SIZEOF(dev_t)
447AC_CHECK_SIZEOF(fpos_t)
448AC_CHECK_SIZEOF(mode_t)
449AC_CHECK_SIZEOF(off_t)
450AC_CHECK_SIZEOF(ssize_t)
451AC_CHECK_SIZEOF(time_t)
452])#
453
454AC_DEFUN([mfx_CHECK_LIB_WINMM], [
455if test "X$GCC" = Xyes; then
456case $host_os in
457cygwin* | mingw* | pw32*)
458     test "X$LIBS" != "X" && LIBS="$LIBS "
459     LIBS="${LIBS}-lwinmm" ;;
460esac
461fi
462])
463
464dnl Serial 2 mfx/m4/nrv.m4
465
466AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [
467AC_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.])])
468])
469# Checks for stat-related time functions.
470
471# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2011 Free Software
472# Foundation, Inc.
473
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.
477
478dnl From Paul Eggert.
479
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)
484
485# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
486# st_birthtim - Cygwin 1.7.0+
487
488AC_DEFUN([gl_STAT_TIME],
489[
490  AC_REQUIRE([AC_C_INLINE])
491  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
492  AC_CHECK_HEADERS_ONCE([sys/time.h])
493
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>])
529])
530
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.
538#
539AC_DEFUN([gl_STAT_BIRTHTIME],
540[
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>])
553])
554
555dnl Serial 2 mfx/m4/ucl.m4
556
557AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [
558AC_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.])])
559])
560