1 dnl Serial 3 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.])])
7 AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
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)
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], [
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_CFG_NO_CONFIG_HEADER 1
42 #include "acc/acc_incd.h"
45 #define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
46 #include "acc/acc_chk.ch"
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"
57 #define ACCCHK_ASSERT(expr) assert(expr);
58 static int test_acc_run_time_assert(int r) {
59 #include "acc/acc_chk.ch"
63 test_acc_compile_time_assert();
64 if (test_acc_run_time_assert(1) != 1) return 1;
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])
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.])
84 AC_MSG_ERROR([ACC conformance test failed. Stop.])
90 dnl Serial 3 mfx/m4/acc_miniacc.m4
92 AC_DEFUN([mfx_MINIACC_ACCCHK], [
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_CFG_NO_CONFIG_HEADER 1
102 #define ACC_WANT_ACC_INCD_H 1
106 #define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
107 #define ACC_WANT_ACC_CHK_CH 1
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
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
127 test_acc_compile_time_assert();
128 if (test_acc_run_time_assert(1) != 1) return 1;
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])
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.])
148 AC_MSG_ERROR([ACC conformance test failed. Stop.])
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"
171 mfx_save_CPPFLAGS=$CPPFLAGS
173 for mfx_arg in "" -no-cpp-precomp
175 CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
176 _AC_COMPILE_IFELSE([],
180 CPPFLAGS=$mfx_save_CPPFLAGS
181 rm -f conftest.$ac_ext conftest.$ac_objext
184 AC_MSG_RESULT([none needed]) ;;
186 AC_MSG_RESULT([ERROR])
187 AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
190 AC_MSG_RESULT([$mfx_tmp])
191 CPPFLAGS="$mfx_tmp $CPPFLAGS"
196 dnl Serial 13 -*- Autoconf -*-
197 # Enable extensions on systems that normally disable them.
199 # Copyright (C) 2003, 2006-2015 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 git
205 # Autoconf. Perhaps we can remove this once we can assume Autoconf
206 # 2.70 or later everywhere, but since 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
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])
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.
229 # Remember that #undef in AH_VERBATIM gets replaced with #define by
230 # AC_DEFINE. The goal here is to define all known feature-enabling
231 # macros, then, if reports of conflicts are made, disable macros that
232 # cause problems on some platforms (such as __EXTENSIONS__).
233 AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
234 [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
235 AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
237 AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
238 if test "$MINIX" = yes; then
239 AC_DEFINE([_POSIX_SOURCE], [1],
240 [Define to 1 if you need to in order for 'stat' and other
242 AC_DEFINE([_POSIX_1_SOURCE], [2],
243 [Define to 2 if the system does not provide POSIX.1 features
244 except with this defined.])
245 AC_DEFINE([_MINIX], [1],
246 [Define to 1 if on MINIX.])
247 AC_DEFINE([_NETBSD_SOURCE], [1],
248 [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
251 dnl Use a different key than __EXTENSIONS__, as that name broke existing
252 dnl configure.ac when using autoheader 2.62.
253 AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
254 [/* Enable extensions on AIX 3, Interix. */
258 /* Enable general extensions on OS X. */
259 #ifndef _DARWIN_C_SOURCE
260 # undef _DARWIN_C_SOURCE
262 /* Enable GNU extensions on systems that have them. */
266 /* Use GNU style printf and scanf. */
267 #ifndef __USE_MINGW_ANSI_STDIO
268 # undef __USE_MINGW_ANSI_STDIO
270 /* Enable threading extensions on Solaris. */
271 #ifndef _POSIX_PTHREAD_SEMANTICS
272 # undef _POSIX_PTHREAD_SEMANTICS
274 /* Enable extensions on HP NonStop. */
275 #ifndef _TANDEM_SOURCE
276 # undef _TANDEM_SOURCE
278 /* Enable X/Open extensions if necessary. HP-UX 11.11 defines
279 mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
280 whether compiling with -Ae or -D_HPUX_SOURCE=1. */
281 #ifndef _XOPEN_SOURCE
282 # undef _XOPEN_SOURCE
284 /* Enable general extensions on Solaris. */
285 #ifndef __EXTENSIONS__
286 # undef __EXTENSIONS__
289 AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
290 [ac_cv_safe_to_define___extensions__],
293 # define __EXTENSIONS__ 1
294 ]AC_INCLUDES_DEFAULT])],
295 [ac_cv_safe_to_define___extensions__=yes],
296 [ac_cv_safe_to_define___extensions__=no])])
297 test $ac_cv_safe_to_define___extensions__ = yes &&
298 AC_DEFINE([__EXTENSIONS__])
299 AC_DEFINE([_ALL_SOURCE])
300 AC_DEFINE([_DARWIN_C_SOURCE])
301 AC_DEFINE([_GNU_SOURCE])
302 AC_DEFINE([__USE_MINGW_ANSI_STDIO])
303 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
304 AC_DEFINE([_TANDEM_SOURCE])
305 AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
306 [ac_cv_should_define__xopen_source],
307 [ac_cv_should_define__xopen_source=no
315 #define _XOPEN_SOURCE 500
318 [ac_cv_should_define__xopen_source=yes])])])
319 test $ac_cv_should_define__xopen_source = yes &&
320 AC_DEFINE([_XOPEN_SOURCE], [500])
321 ])# AC_USE_SYSTEM_EXTENSIONS
323 # gl_USE_SYSTEM_EXTENSIONS
324 # ------------------------
325 # Enable extensions on systems that normally disable them,
326 # typically due to standards-conformance issues.
327 AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
329 dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
330 dnl gnulib does not need it. But if it gets required by third-party macros
331 dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
332 dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
333 dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
334 dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
335 AC_REQUIRE([AC_GNU_SOURCE])
337 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
340 dnl Serial 4 mfx/m4/limits.m4
342 AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
343 AC_CACHE_CHECK([whether limits.h is sane],
344 mfx_cv_header_sane_limits_h,
345 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
346 #if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
347 # if defined(__APPLE__) && defined(__GNUC__)
348 # error "your preprocessor is broken - use compiler option -no-cpp-precomp"
350 # include "your preprocessor is broken"
353 #define MFX_0xffff 0xffff
354 #define MFX_0xffffffffL 4294967295ul
355 #if !defined(CHAR_BIT) || (CHAR_BIT != 8)
356 # include "error CHAR_BIT"
358 #if !defined(UCHAR_MAX)
359 # include "error UCHAR_MAX 1"
361 #if !defined(USHRT_MAX)
362 # include "error USHRT_MAX 1"
364 #if !defined(UINT_MAX)
365 # include "error UINT_MAX 1"
367 #if !defined(ULONG_MAX)
368 # include "error ULONG_MAX 1"
370 #if !defined(SHRT_MAX)
371 # include "error SHRT_MAX 1"
373 #if !defined(INT_MAX)
374 # include "error INT_MAX 1"
376 #if !defined(LONG_MAX)
377 # include "error LONG_MAX 1"
380 # include "error UCHAR_MAX 2"
383 # include "error USHRT_MAX 2"
386 # include "error UINT_MAX 2"
389 # include "error ULONG_MAX 2"
391 #if (UCHAR_MAX < 0xff)
392 # include "error UCHAR_MAX 3"
394 #if (USHRT_MAX < MFX_0xffff)
395 # include "error USHRT_MAX 3"
397 #if (UINT_MAX < MFX_0xffff)
398 # include "error UINT_MAX 3"
400 #if (ULONG_MAX < MFX_0xffffffffL)
401 # include "error ULONG_MAX 3"
403 #if (USHRT_MAX > UINT_MAX)
404 # include "error USHRT_MAX vs UINT_MAX"
406 #if (UINT_MAX > ULONG_MAX)
407 # include "error UINT_MAX vs ULONG_MAX"
410 #if (USHRT_MAX == MFX_0xffff)
411 { typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
412 #elif (USHRT_MAX >= MFX_0xffff)
413 { typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
415 #if (UINT_MAX == MFX_0xffff)
416 { typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
417 #elif (UINT_MAX >= MFX_0xffff)
418 { typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
420 #if (ULONG_MAX == MFX_0xffff)
421 { typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
422 #elif (ULONG_MAX >= MFX_0xffff)
423 { typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
425 #if !defined(_CRAY1) /* CRAY PVP systems */
426 #if (USHRT_MAX == MFX_0xffffffffL)
427 { typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
428 #elif (USHRT_MAX >= MFX_0xffffffffL)
429 { typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
432 #if (UINT_MAX == MFX_0xffffffffL)
433 { typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
434 #elif (UINT_MAX >= MFX_0xffffffffL)
435 { typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
437 #if (ULONG_MAX == MFX_0xffffffffL)
438 { typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
439 #elif (ULONG_MAX >= MFX_0xffffffffL)
440 { typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
443 [mfx_cv_header_sane_limits_h=yes],
444 [mfx_cv_header_sane_limits_h=no])])
447 dnl Serial 2 mfx/m4/lzo.m4
449 AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
450 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.])])
453 dnl Serial 3 mfx/m4/lzo_lzochk.m4
455 AC_DEFUN([mfx_LZO_LZOCHK], [
457 mfx_save_CPPFLAGS=$CPPFLAGS
458 dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
459 test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
461 AC_MSG_CHECKING([whether your compiler passes the LZO conformance test])
463 AC_LANG_CONFTEST([AC_LANG_PROGRAM(
464 [[#include <limits.h>
466 #define LZO_CFG_NO_CONFIG_HEADER 1
467 #define LZO_WANT_ACC_INCD_H 1
472 #define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT_HEADER(expr)
473 #define LZO_WANT_ACC_CHK_CH 1
477 #define LZOCHK_ASSERT(expr) LZO_COMPILE_TIME_ASSERT(expr)
478 static void test_lzo_compile_time_assert(void) {
479 #define LZO_WANT_ACC_CHK_CH 1
486 #define LZOCHK_ASSERT(expr) assert(expr);
487 static int test_lzo_run_time_assert(int r) {
488 #define LZO_WANT_ACC_CHK_CH 1
493 test_lzo_compile_time_assert();
494 if (test_lzo_run_time_assert(1) != 1) return 1;
499 _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
500 rm -f conftest.$ac_ext conftest.$ac_objext
502 CPPFLAGS=$mfx_save_CPPFLAGS
504 AC_MSG_RESULT([$mfx_tmp])
509 AC_MSG_NOTICE([Your compiler failed the LZO conformance test - for details see ])
510 AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
511 AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
512 AC_MSG_NOTICE([Thanks for your support.])
514 AC_MSG_ERROR([LZO conformance test failed. Stop.])
520 dnl Serial 2 mfx/m4/mfx.m4
522 AC_DEFUN([mfx_CHECK_SIZEOF], [
523 AC_CHECK_SIZEOF(__int32)
524 AC_CHECK_SIZEOF(intmax_t)
525 AC_CHECK_SIZEOF(uintmax_t)
526 AC_CHECK_SIZEOF(intptr_t)
527 AC_CHECK_SIZEOF(uintptr_t)
529 AC_CHECK_SIZEOF(float)
530 AC_CHECK_SIZEOF(double)
531 AC_CHECK_SIZEOF(long double)
533 AC_CHECK_SIZEOF(dev_t)
534 AC_CHECK_SIZEOF(fpos_t)
535 AC_CHECK_SIZEOF(mode_t)
536 AC_CHECK_SIZEOF(off_t)
537 AC_CHECK_SIZEOF(ssize_t)
538 AC_CHECK_SIZEOF(time_t)
541 AC_DEFUN([mfx_CHECK_LIB_WINMM], [
542 if test "X$GCC" = Xyes; then
544 cygwin* | mingw* | pw32*)
545 test "X$LIBS" != "X" && LIBS="$LIBS "
546 LIBS="${LIBS}-lwinmm" ;;
551 dnl Serial 2 mfx/m4/nrv.m4
553 AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [
554 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.])])
556 # Checks for stat-related time functions.
558 # Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2015 Free Software
561 # This file is free software; the Free Software Foundation
562 # gives unlimited permission to copy and/or distribute it,
563 # with or without modifications, as long as this notice is preserved.
565 dnl From Paul Eggert.
567 # st_atim.tv_nsec - Linux, Solaris, Cygwin
568 # st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
569 # st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
570 # st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
572 # st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
573 # st_birthtim - Cygwin 1.7.0+
575 AC_DEFUN([gl_STAT_TIME],
577 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
578 AC_CHECK_HEADERS_ONCE([sys/time.h])
580 AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
581 [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
582 [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
583 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
585 #include <sys/types.h>
586 #include <sys/stat.h>
588 # include <sys/time.h>
597 [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
598 [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
599 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
600 AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
601 [Define to 1 if the type of the st_atim member of a struct stat is
604 [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
605 [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
606 [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
607 [#include <sys/types.h>
608 #include <sys/stat.h>])],
609 [#include <sys/types.h>
610 #include <sys/stat.h>])],
611 [#include <sys/types.h>
612 #include <sys/stat.h>])],
613 [#include <sys/types.h>
614 #include <sys/stat.h>])
617 # Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
619 # There was a time when this field was named st_createtime (21 June
620 # 2002 to 16 July 2002) But that window is very small and applied only
621 # to development code, so systems still using that configuration are
622 # not supported. See revisions 1.10 and 1.11 of FreeBSD's
623 # src/sys/ufs/ufs/dinode.h.
625 AC_DEFUN([gl_STAT_BIRTHTIME],
627 AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
628 AC_CHECK_HEADERS_ONCE([sys/time.h])
629 AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
630 [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
631 [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
632 [#include <sys/types.h>
633 #include <sys/stat.h>])],
634 [#include <sys/types.h>
635 #include <sys/stat.h>])],
636 [#include <sys/types.h>
637 #include <sys/stat.h>])
640 dnl Serial 2 mfx/m4/ucl.m4
642 AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [
643 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.])])