123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- dnl Serial 3 mfx/m4/acc.m4
- AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
- 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.])])
- ])
- AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
- AC_HEADER_TIME
- 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])
- ])
- AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
- 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)
- ])
- AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
- AC_CHECK_SIZEOF(short)
- AC_CHECK_SIZEOF(int)
- AC_CHECK_SIZEOF(long)
- AC_CHECK_SIZEOF(long long)
- AC_CHECK_SIZEOF(__int16)
- AC_CHECK_SIZEOF(__int32)
- AC_CHECK_SIZEOF(__int64)
- AC_CHECK_SIZEOF(void *)
- AC_CHECK_SIZEOF(size_t)
- AC_CHECK_SIZEOF(ptrdiff_t)
- ])
- AC_DEFUN([mfx_ACC_ACCCHK], [
- mfx_tmp=$1
- mfx_save_CPPFLAGS=$CPPFLAGS
- dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
- test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
- AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
- AC_LANG_CONFTEST([AC_LANG_PROGRAM(
- [[
- static void test_acc_compile_time_assert(void) {
- }
- static int test_acc_run_time_assert(int r) {
- return r;
- }
- ]], [[
- test_acc_compile_time_assert();
- if (test_acc_run_time_assert(1) != 1) return 1;
- ]]
- )])
- mfx_tmp=FAILED
- _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
- rm -f conftest.$ac_ext conftest.$ac_objext
- CPPFLAGS=$mfx_save_CPPFLAGS
- AC_MSG_RESULT([$mfx_tmp])
- case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
- dnl AS_EXIT
- ;;
- esac
- ])
- dnl Serial 3 mfx/m4/acc_miniacc.m4
- AC_DEFUN([mfx_MINIACC_ACCCHK], [
- mfx_tmp=$1
- mfx_save_CPPFLAGS=$CPPFLAGS
- dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
- test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
- AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
- AC_LANG_CONFTEST([AC_LANG_PROGRAM(
- [[
- static void test_acc_compile_time_assert(void) {
- }
- static int test_acc_run_time_assert(int r) {
- return r;
- }
- ]], [[
- test_acc_compile_time_assert();
- if (test_acc_run_time_assert(1) != 1) return 1;
- ]]
- )])
- mfx_tmp=FAILED
- _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
- rm -f conftest.$ac_ext conftest.$ac_objext
- CPPFLAGS=$mfx_save_CPPFLAGS
- AC_MSG_RESULT([$mfx_tmp])
- case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([ACC conformance test failed. Stop.])
- dnl AS_EXIT
- ;;
- esac
- ])
- dnl Serial 2 mfx/m4/cppflags.m4
- AC_DEFUN([mfx_PROG_CPPFLAGS], [
- AC_MSG_CHECKING([whether the C preprocessor needs special flags])
- AC_LANG_CONFTEST([AC_LANG_PROGRAM(
- [[
- ]], [[ ]]
- )])
- mfx_save_CPPFLAGS=$CPPFLAGS
- mfx_tmp=ERROR
- for mfx_arg in "" -no-cpp-precomp
- do
- CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
- _AC_COMPILE_IFELSE([],
- [mfx_tmp=$mfx_arg
- break])
- done
- CPPFLAGS=$mfx_save_CPPFLAGS
- rm -f conftest.$ac_ext conftest.$ac_objext
- case x$mfx_tmp in
- x)
- AC_MSG_RESULT([none needed]) ;;
- xERROR)
- AC_MSG_RESULT([ERROR])
- AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
- ;;
- *)
- AC_MSG_RESULT([$mfx_tmp])
- CPPFLAGS="$mfx_tmp $CPPFLAGS"
- ;;
- esac
- ])
- dnl Serial 13 -*- Autoconf -*-
- AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
- [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
- AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
- AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
- if test "$MINIX" = yes; then
- AC_DEFINE([_POSIX_SOURCE], [1],
- [Define to 1 if you need to in order for 'stat' and other
- things to work.])
- AC_DEFINE([_POSIX_1_SOURCE], [2],
- [Define to 2 if the system does not provide POSIX.1 features
- except with this defined.])
- AC_DEFINE([_MINIX], [1],
- [Define to 1 if on MINIX.])
- AC_DEFINE([_NETBSD_SOURCE], [1],
- [Define to 1 to make NetBSD features available. MINIX 3 needs this.])
- fi
- dnl Use a different key than __EXTENSIONS__, as that name broke existing
- dnl configure.ac when using autoheader 2.62.
- AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
- [/* Enable extensions on AIX 3, Interix. */
- /* Enable general extensions on OS X. */
- /* Enable GNU extensions on systems that have them. */
- /* Use GNU style printf and scanf. */
- /* Enable threading extensions on Solaris. */
- /* Enable extensions on HP NonStop. */
- /* Enable X/Open extensions if necessary. HP-UX 11.11 defines
- mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
- whether compiling with -Ae or -D_HPUX_SOURCE=1. */
- /* Enable general extensions on Solaris. */
- ])
- AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
- [ac_cv_safe_to_define___extensions__],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
- ]AC_INCLUDES_DEFAULT])],
- [ac_cv_safe_to_define___extensions__=yes],
- [ac_cv_safe_to_define___extensions__=no])])
- test $ac_cv_safe_to_define___extensions__ = yes &&
- AC_DEFINE([__EXTENSIONS__])
- AC_DEFINE([_ALL_SOURCE])
- AC_DEFINE([_DARWIN_C_SOURCE])
- AC_DEFINE([_GNU_SOURCE])
- AC_DEFINE([__USE_MINGW_ANSI_STDIO])
- AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
- AC_DEFINE([_TANDEM_SOURCE])
- AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
- [ac_cv_should_define__xopen_source],
- [ac_cv_should_define__xopen_source=no
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
-
- mbstate_t x;]])],
- [],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[
-
-
- mbstate_t x;]])],
- [ac_cv_should_define__xopen_source=yes])])])
- test $ac_cv_should_define__xopen_source = yes &&
- AC_DEFINE([_XOPEN_SOURCE], [500])
- ])
- AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
- [
- dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
- dnl gnulib does not need it. But if it gets required by third-party macros
- dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
- dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
- dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
- dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
- AC_REQUIRE([AC_GNU_SOURCE])
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- ])
- dnl Serial 4 mfx/m4/limits.m4
- AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
- AC_CACHE_CHECK([whether limits.h is sane],
- mfx_cv_header_sane_limits_h,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
- ]], [[
- { typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
- { typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
- { typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
- { typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
- { typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
- { typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
- { typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
- { typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
- { typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
- { typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
- { typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
- { typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
- ]])],
- [mfx_cv_header_sane_limits_h=yes],
- [mfx_cv_header_sane_limits_h=no])])
- ])
- dnl Serial 2 mfx/m4/lzo.m4
- AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
- 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.])])
- ])
- dnl Serial 3 mfx/m4/lzo_lzochk.m4
- AC_DEFUN([mfx_LZO_LZOCHK], [
- mfx_tmp=$1
- mfx_save_CPPFLAGS=$CPPFLAGS
- dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
- test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
- AC_MSG_CHECKING([whether your compiler passes the LZO conformance test])
- AC_LANG_CONFTEST([AC_LANG_PROGRAM(
- [[
- $2
- static void test_lzo_compile_time_assert(void) {
- }
- static int test_lzo_run_time_assert(int r) {
- return r;
- }
- ]], [[
- test_lzo_compile_time_assert();
- if (test_lzo_run_time_assert(1) != 1) return 1;
- ]]
- )])
- mfx_tmp=FAILED
- _AC_COMPILE_IFELSE([], [mfx_tmp=yes])
- rm -f conftest.$ac_ext conftest.$ac_objext
- CPPFLAGS=$mfx_save_CPPFLAGS
- AC_MSG_RESULT([$mfx_tmp])
- case x$mfx_tmp in
- xpassed | xyes) ;;
- *)
- AC_MSG_NOTICE([])
- AC_MSG_NOTICE([Your compiler failed the LZO conformance test - for details see ])
- AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
- AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
- AC_MSG_NOTICE([Thanks for your support.])
- AC_MSG_NOTICE([])
- AC_MSG_ERROR([LZO conformance test failed. Stop.])
- dnl AS_EXIT
- ;;
- esac
- ])
- dnl Serial 2 mfx/m4/mfx.m4
- AC_DEFUN([mfx_CHECK_SIZEOF], [
- AC_CHECK_SIZEOF(__int32)
- AC_CHECK_SIZEOF(intmax_t)
- AC_CHECK_SIZEOF(uintmax_t)
- AC_CHECK_SIZEOF(intptr_t)
- AC_CHECK_SIZEOF(uintptr_t)
- AC_CHECK_SIZEOF(float)
- AC_CHECK_SIZEOF(double)
- AC_CHECK_SIZEOF(long double)
- AC_CHECK_SIZEOF(dev_t)
- AC_CHECK_SIZEOF(fpos_t)
- AC_CHECK_SIZEOF(mode_t)
- AC_CHECK_SIZEOF(off_t)
- AC_CHECK_SIZEOF(ssize_t)
- AC_CHECK_SIZEOF(time_t)
- ])
- AC_DEFUN([mfx_CHECK_LIB_WINMM], [
- if test "X$GCC" = Xyes; then
- case $host_os in
- cygwin* | mingw* | pw32*)
- test "X$LIBS" != "X" && LIBS="$LIBS "
- LIBS="${LIBS}-lwinmm" ;;
- esac
- fi
- ])
- dnl Serial 2 mfx/m4/nrv.m4
- AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [
- 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.])])
- ])
- dnl From Paul Eggert.
- AC_DEFUN([gl_STAT_TIME],
- [
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_HEADERS_ONCE([sys/time.h])
- AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
- [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
- [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
- [[
-
-
-
-
-
-
- struct timespec ts;
- struct stat st;
- ]],
- [[
- st.st_atim = ts;
- ]])],
- [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
- [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
- if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
- AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
- [Define to 1 if the type of the st_atim member of a struct stat is
- struct timespec.])
- fi],
- [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
- [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
- [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
- [
-
- [
-
- [
-
- [
-
- ])
- AC_DEFUN([gl_STAT_BIRTHTIME],
- [
- AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_HEADERS_ONCE([sys/time.h])
- AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
- [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
- [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
- [
-
- [
-
- [
-
- ])
- dnl Serial 2 mfx/m4/ucl.m4
- AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [
- 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.])])
- ])
|