Blame autoconf/local.m4

Packit 679830
dnl Serial 3 mfx/m4/acc.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_ACC_CHECK_ENDIAN], [
Packit 679830
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.])])
Packit 679830
])
Packit 679830
Packit 679830
AC_DEFUN([mfx_ACC_CHECK_HEADERS], [
Packit 679830
AC_HEADER_TIME
Packit 679830
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])
Packit 679830
])
Packit 679830
Packit 679830
AC_DEFUN([mfx_ACC_CHECK_FUNCS], [
Packit 679830
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)
Packit 679830
])
Packit 679830
Packit 679830
AC_DEFUN([mfx_ACC_CHECK_SIZEOF], [
Packit 679830
AC_CHECK_SIZEOF(short)
Packit 679830
AC_CHECK_SIZEOF(int)
Packit 679830
AC_CHECK_SIZEOF(long)
Packit 679830
Packit 679830
AC_CHECK_SIZEOF(long long)
Packit 679830
AC_CHECK_SIZEOF(__int16)
Packit 679830
AC_CHECK_SIZEOF(__int32)
Packit 679830
AC_CHECK_SIZEOF(__int64)
Packit 679830
Packit 679830
AC_CHECK_SIZEOF(void *)
Packit 679830
AC_CHECK_SIZEOF(size_t)
Packit 679830
AC_CHECK_SIZEOF(ptrdiff_t)
Packit 679830
])
Packit 679830
Packit 679830
AC_DEFUN([mfx_ACC_ACCCHK], [
Packit 679830
mfx_tmp=$1
Packit 679830
mfx_save_CPPFLAGS=$CPPFLAGS
Packit 679830
dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
Packit 679830
test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
Packit 679830
Packit 679830
AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
Packit 679830
Packit 679830
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
Packit 679830
[[#define ACC_CFG_NO_CONFIG_HEADER 1
Packit 679830
#include "acc/acc.h"
Packit 679830
#include "acc/acc_incd.h"
Packit 679830
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
Packit 679830
#include "acc/acc_chk.ch"
Packit 679830
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
Packit 679830
static void test_acc_compile_time_assert(void) {
Packit 679830
#include "acc/acc_chk.ch"
Packit 679830
}
Packit 679830
Packit 679830
#undef NDEBUG
Packit 679830
#include <assert.h>
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     assert(expr);
Packit 679830
static int test_acc_run_time_assert(int r) {
Packit 679830
#include "acc/acc_chk.ch"
Packit 679830
return r;
Packit 679830
}
Packit 679830
]], [[
Packit 679830
test_acc_compile_time_assert();
Packit 679830
if (test_acc_run_time_assert(1) != 1) return 1;
Packit 679830
]]
Packit 679830
)])
Packit 679830
Packit 679830
mfx_tmp=FAILED
Packit 679830
_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
Packit 679830
rm -f conftest.$ac_ext conftest.$ac_objext
Packit 679830
Packit 679830
CPPFLAGS=$mfx_save_CPPFLAGS
Packit 679830
Packit 679830
AC_MSG_RESULT([$mfx_tmp])
Packit 679830
case x$mfx_tmp in
Packit 679830
  xpassed | xyes) ;;
Packit 679830
  *)
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
Packit 679830
    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
Packit 679830
    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
Packit 679830
    AC_MSG_NOTICE([Thanks for your support.])
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_ERROR([ACC conformance test failed. Stop.])
Packit 679830
dnl    AS_EXIT
Packit 679830
    ;;
Packit 679830
esac
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 3 mfx/m4/acc_miniacc.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_MINIACC_ACCCHK], [
Packit 679830
mfx_tmp=$1
Packit 679830
mfx_save_CPPFLAGS=$CPPFLAGS
Packit 679830
dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
Packit 679830
test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
Packit 679830
Packit 679830
AC_MSG_CHECKING([whether your compiler passes the ACC conformance test])
Packit 679830
Packit 679830
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
Packit 679830
[[#define ACC_CFG_NO_CONFIG_HEADER 1
Packit 679830
#define ACC_WANT_ACC_INCD_H 1
Packit 679830
#include $2
Packit 679830
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT_HEADER(expr)
Packit 679830
#define ACC_WANT_ACC_CHK_CH 1
Packit 679830
#include $2
Packit 679830
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     ACC_COMPILE_TIME_ASSERT(expr)
Packit 679830
static void test_acc_compile_time_assert(void) {
Packit 679830
#define ACC_WANT_ACC_CHK_CH 1
Packit 679830
#include $2
Packit 679830
}
Packit 679830
Packit 679830
#undef NDEBUG
Packit 679830
#include <assert.h>
Packit 679830
#undef  ACCCHK_ASSERT
Packit 679830
#define ACCCHK_ASSERT(expr)     assert(expr);
Packit 679830
static int test_acc_run_time_assert(int r) {
Packit 679830
#define ACC_WANT_ACC_CHK_CH 1
Packit 679830
#include $2
Packit 679830
return r;
Packit 679830
}
Packit 679830
]], [[
Packit 679830
test_acc_compile_time_assert();
Packit 679830
if (test_acc_run_time_assert(1) != 1) return 1;
Packit 679830
]]
Packit 679830
)])
Packit 679830
Packit 679830
mfx_tmp=FAILED
Packit 679830
_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
Packit 679830
rm -f conftest.$ac_ext conftest.$ac_objext
Packit 679830
Packit 679830
CPPFLAGS=$mfx_save_CPPFLAGS
Packit 679830
Packit 679830
AC_MSG_RESULT([$mfx_tmp])
Packit 679830
case x$mfx_tmp in
Packit 679830
  xpassed | xyes) ;;
Packit 679830
  *)
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_NOTICE([Your compiler failed the ACC conformance test - for details see ])
Packit 679830
    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
Packit 679830
    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
Packit 679830
    AC_MSG_NOTICE([Thanks for your support.])
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_ERROR([ACC conformance test failed. Stop.])
Packit 679830
dnl    AS_EXIT
Packit 679830
    ;;
Packit 679830
esac
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 2 mfx/m4/cppflags.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_PROG_CPPFLAGS], [
Packit 679830
AC_MSG_CHECKING([whether the C preprocessor needs special flags])
Packit 679830
Packit 679830
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
Packit 679830
[[#include <limits.h>
Packit 679830
#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
Packit 679830
#  include "your C preprocessor is broken 1"
Packit 679830
#elif (0xffffu == 0xfffffffful)
Packit 679830
#  include "your C preprocessor is broken 2"
Packit 679830
#elif (32767 >= ULONG_MAX) || (65535u >= ULONG_MAX)
Packit 679830
#  include "your C preprocessor is broken 3"
Packit 679830
#endif
Packit 679830
]], [[ ]]
Packit 679830
)])
Packit 679830
Packit 679830
mfx_save_CPPFLAGS=$CPPFLAGS
Packit 679830
mfx_tmp=ERROR
Packit 679830
for mfx_arg in "" -no-cpp-precomp
Packit 679830
do
Packit 679830
  CPPFLAGS="$mfx_arg $mfx_save_CPPFLAGS"
Packit 679830
  _AC_COMPILE_IFELSE([],
Packit 679830
[mfx_tmp=$mfx_arg
Packit 679830
break])
Packit 679830
done
Packit 679830
CPPFLAGS=$mfx_save_CPPFLAGS
Packit 679830
rm -f conftest.$ac_ext conftest.$ac_objext
Packit 679830
case x$mfx_tmp in
Packit 679830
  x)
Packit 679830
    AC_MSG_RESULT([none needed]) ;;
Packit 679830
  xERROR)
Packit 679830
    AC_MSG_RESULT([ERROR])
Packit 679830
    AC_MSG_ERROR([your C preprocessor is broken - for details see config.log])
Packit 679830
    ;;
Packit 679830
  *)
Packit 679830
    AC_MSG_RESULT([$mfx_tmp])
Packit 679830
    CPPFLAGS="$mfx_tmp $CPPFLAGS"
Packit 679830
    ;;
Packit 679830
esac
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 13  -*- Autoconf -*-
Packit 679830
# Enable extensions on systems that normally disable them.
Packit 679830
Packit 679830
# Copyright (C) 2003, 2006-2014 Free Software Foundation, Inc.
Packit 679830
# This file is free software; the Free Software Foundation
Packit 679830
# gives unlimited permission to copy and/or distribute it,
Packit 679830
# with or without modifications, as long as this notice is preserved.
Packit 679830
Packit 679830
# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from git
Packit 679830
# Autoconf.  Perhaps we can remove this once we can assume Autoconf
Packit 679830
# 2.70 or later everywhere, but since Autoconf mutates rapidly
Packit 679830
# enough in this area it's likely we'll need to redefine
Packit 679830
# AC_USE_SYSTEM_EXTENSIONS for quite some time.
Packit 679830
Packit 679830
# If autoconf reports a warning
Packit 679830
#     warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
Packit 679830
# or  warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
Packit 679830
# the fix is
Packit 679830
#   1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
Packit 679830
#      but always AC_REQUIREd,
Packit 679830
#   2) to ensure that for each occurrence of
Packit 679830
#        AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
Packit 679830
#      or
Packit 679830
#        AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit 679830
#      the corresponding gnulib module description has 'extensions' among
Packit 679830
#      its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
Packit 679830
#      invocation occurs in gl_EARLY, not in gl_INIT.
Packit 679830
Packit 679830
# AC_USE_SYSTEM_EXTENSIONS
Packit 679830
# ------------------------
Packit 679830
# Enable extensions on systems that normally disable them,
Packit 679830
# typically due to standards-conformance issues.
Packit 679830
#
Packit 679830
# Remember that #undef in AH_VERBATIM gets replaced with #define by
Packit 679830
# AC_DEFINE.  The goal here is to define all known feature-enabling
Packit 679830
# macros, then, if reports of conflicts are made, disable macros that
Packit 679830
# cause problems on some platforms (such as __EXTENSIONS__).
Packit 679830
AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
Packit 679830
[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
Packit 679830
AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
Packit 679830
Packit 679830
  AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
Packit 679830
  if test "$MINIX" = yes; then
Packit 679830
    AC_DEFINE([_POSIX_SOURCE], [1],
Packit 679830
      [Define to 1 if you need to in order for 'stat' and other
Packit 679830
       things to work.])
Packit 679830
    AC_DEFINE([_POSIX_1_SOURCE], [2],
Packit 679830
      [Define to 2 if the system does not provide POSIX.1 features
Packit 679830
       except with this defined.])
Packit 679830
    AC_DEFINE([_MINIX], [1],
Packit 679830
      [Define to 1 if on MINIX.])
Packit 679830
    AC_DEFINE([_NETBSD_SOURCE], [1],
Packit 679830
      [Define to 1 to make NetBSD features available.  MINIX 3 needs this.])
Packit 679830
  fi
Packit 679830
Packit 679830
dnl Use a different key than __EXTENSIONS__, as that name broke existing
Packit 679830
dnl configure.ac when using autoheader 2.62.
Packit 679830
  AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
Packit 679830
[/* Enable extensions on AIX 3, Interix.  */
Packit 679830
#ifndef _ALL_SOURCE
Packit 679830
# undef _ALL_SOURCE
Packit 679830
#endif
Packit 679830
/* Enable general extensions on OS X.  */
Packit 679830
#ifndef _DARWIN_C_SOURCE
Packit 679830
# undef _DARWIN_C_SOURCE
Packit 679830
#endif
Packit 679830
/* Enable GNU extensions on systems that have them.  */
Packit 679830
#ifndef _GNU_SOURCE
Packit 679830
# undef _GNU_SOURCE
Packit 679830
#endif
Packit 679830
/* Enable threading extensions on Solaris.  */
Packit 679830
#ifndef _POSIX_PTHREAD_SEMANTICS
Packit 679830
# undef _POSIX_PTHREAD_SEMANTICS
Packit 679830
#endif
Packit 679830
/* Enable extensions on HP NonStop.  */
Packit 679830
#ifndef _TANDEM_SOURCE
Packit 679830
# undef _TANDEM_SOURCE
Packit 679830
#endif
Packit 679830
/* Enable X/Open extensions if necessary.  HP-UX 11.11 defines
Packit 679830
   mbstate_t only if _XOPEN_SOURCE is defined to 500, regardless of
Packit 679830
   whether compiling with -Ae or -D_HPUX_SOURCE=1.  */
Packit 679830
#ifndef _XOPEN_SOURCE
Packit 679830
# undef _XOPEN_SOURCE
Packit 679830
#endif
Packit 679830
/* Enable general extensions on Solaris.  */
Packit 679830
#ifndef __EXTENSIONS__
Packit 679830
# undef __EXTENSIONS__
Packit 679830
#endif
Packit 679830
])
Packit 679830
  AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
Packit 679830
    [ac_cv_safe_to_define___extensions__],
Packit 679830
    [AC_COMPILE_IFELSE(
Packit 679830
       [AC_LANG_PROGRAM([[
Packit 679830
#         define __EXTENSIONS__ 1
Packit 679830
          ]AC_INCLUDES_DEFAULT])],
Packit 679830
       [ac_cv_safe_to_define___extensions__=yes],
Packit 679830
       [ac_cv_safe_to_define___extensions__=no])])
Packit 679830
  test $ac_cv_safe_to_define___extensions__ = yes &&
Packit 679830
    AC_DEFINE([__EXTENSIONS__])
Packit 679830
  AC_DEFINE([_ALL_SOURCE])
Packit 679830
  AC_DEFINE([_DARWIN_C_SOURCE])
Packit 679830
  AC_DEFINE([_GNU_SOURCE])
Packit 679830
  AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
Packit 679830
  AC_DEFINE([_TANDEM_SOURCE])
Packit 679830
  AC_CACHE_CHECK([whether _XOPEN_SOURCE should be defined],
Packit 679830
    [ac_cv_should_define__xopen_source],
Packit 679830
    [ac_cv_should_define__xopen_source=no
Packit 679830
     AC_COMPILE_IFELSE(
Packit 679830
       [AC_LANG_PROGRAM([[
Packit 679830
          #include <wchar.h>
Packit 679830
          mbstate_t x;]])],
Packit 679830
       [],
Packit 679830
       [AC_COMPILE_IFELSE(
Packit 679830
          [AC_LANG_PROGRAM([[
Packit 679830
             #define _XOPEN_SOURCE 500
Packit 679830
             #include <wchar.h>
Packit 679830
             mbstate_t x;]])],
Packit 679830
          [ac_cv_should_define__xopen_source=yes])])])
Packit 679830
  test $ac_cv_should_define__xopen_source = yes &&
Packit 679830
    AC_DEFINE([_XOPEN_SOURCE], [500])
Packit 679830
])# AC_USE_SYSTEM_EXTENSIONS
Packit 679830
Packit 679830
# gl_USE_SYSTEM_EXTENSIONS
Packit 679830
# ------------------------
Packit 679830
# Enable extensions on systems that normally disable them,
Packit 679830
# typically due to standards-conformance issues.
Packit 679830
AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
Packit 679830
[
Packit 679830
  dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
Packit 679830
  dnl gnulib does not need it. But if it gets required by third-party macros
Packit 679830
  dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
Packit 679830
  dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
Packit 679830
  dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
Packit 679830
  dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
Packit 679830
  AC_REQUIRE([AC_GNU_SOURCE])
Packit 679830
Packit 679830
  AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 4 mfx/m4/limits.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_CHECK_HEADER_SANE_LIMITS_H], [
Packit 679830
AC_CACHE_CHECK([whether limits.h is sane],
Packit 679830
mfx_cv_header_sane_limits_h,
Packit 679830
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <limits.h>
Packit 679830
#if (32767 >= 4294967295ul) || (65535u >= 4294967295ul)
Packit 679830
#  if defined(__APPLE__) && defined(__GNUC__)
Packit 679830
#    error "your preprocessor is broken - use compiler option -no-cpp-precomp"
Packit 679830
#  else
Packit 679830
#    include "your preprocessor is broken"
Packit 679830
#  endif
Packit 679830
#endif
Packit 679830
#define MFX_0xffff          0xffff
Packit 679830
#define MFX_0xffffffffL     4294967295ul
Packit 679830
#if !defined(CHAR_BIT) || (CHAR_BIT != 8)
Packit 679830
#  include "error CHAR_BIT"
Packit 679830
#endif
Packit 679830
#if !defined(UCHAR_MAX)
Packit 679830
#  include "error UCHAR_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(USHRT_MAX)
Packit 679830
#  include "error USHRT_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(UINT_MAX)
Packit 679830
#  include "error UINT_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(ULONG_MAX)
Packit 679830
#  include "error ULONG_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(SHRT_MAX)
Packit 679830
#  include "error SHRT_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(INT_MAX)
Packit 679830
#  include "error INT_MAX 1"
Packit 679830
#endif
Packit 679830
#if !defined(LONG_MAX)
Packit 679830
#  include "error LONG_MAX 1"
Packit 679830
#endif
Packit 679830
#if (UCHAR_MAX < 1)
Packit 679830
#  include "error UCHAR_MAX 2"
Packit 679830
#endif
Packit 679830
#if (USHRT_MAX < 1)
Packit 679830
#  include "error USHRT_MAX 2"
Packit 679830
#endif
Packit 679830
#if (UINT_MAX < 1)
Packit 679830
#  include "error UINT_MAX 2"
Packit 679830
#endif
Packit 679830
#if (ULONG_MAX < 1)
Packit 679830
#  include "error ULONG_MAX 2"
Packit 679830
#endif
Packit 679830
#if (UCHAR_MAX < 0xff)
Packit 679830
#  include "error UCHAR_MAX 3"
Packit 679830
#endif
Packit 679830
#if (USHRT_MAX < MFX_0xffff)
Packit 679830
#  include "error USHRT_MAX 3"
Packit 679830
#endif
Packit 679830
#if (UINT_MAX < MFX_0xffff)
Packit 679830
#  include "error UINT_MAX 3"
Packit 679830
#endif
Packit 679830
#if (ULONG_MAX < MFX_0xffffffffL)
Packit 679830
#  include "error ULONG_MAX 3"
Packit 679830
#endif
Packit 679830
#if (USHRT_MAX > UINT_MAX)
Packit 679830
#  include "error USHRT_MAX vs UINT_MAX"
Packit 679830
#endif
Packit 679830
#if (UINT_MAX > ULONG_MAX)
Packit 679830
#  include "error UINT_MAX vs ULONG_MAX"
Packit 679830
#endif
Packit 679830
]], [[
Packit 679830
#if (USHRT_MAX == MFX_0xffff)
Packit 679830
{ typedef char a_short2a[1 - 2 * !(sizeof(short) == 2)]; }
Packit 679830
#elif (USHRT_MAX >= MFX_0xffff)
Packit 679830
{ typedef char a_short2b[1 - 2 * !(sizeof(short) > 2)]; }
Packit 679830
#endif
Packit 679830
#if (UINT_MAX == MFX_0xffff)
Packit 679830
{ typedef char a_int2a[1 - 2 * !(sizeof(int) == 2)]; }
Packit 679830
#elif (UINT_MAX >= MFX_0xffff)
Packit 679830
{ typedef char a_int2b[1 - 2 * !(sizeof(int) > 2)]; }
Packit 679830
#endif
Packit 679830
#if (ULONG_MAX == MFX_0xffff)
Packit 679830
{ typedef char a_long2a[1 - 2 * !(sizeof(long) == 2)]; }
Packit 679830
#elif (ULONG_MAX >= MFX_0xffff)
Packit 679830
{ typedef char a_long2b[1 - 2 * !(sizeof(long) > 2)]; }
Packit 679830
#endif
Packit 679830
#if !defined(_CRAY1) /* CRAY PVP systems */
Packit 679830
#if (USHRT_MAX == MFX_0xffffffffL)
Packit 679830
{ typedef char a_short4a[1 - 2 * !(sizeof(short) == 4)]; }
Packit 679830
#elif (USHRT_MAX >= MFX_0xffffffffL)
Packit 679830
{ typedef char a_short4b[1 - 2 * !(sizeof(short) > 4)]; }
Packit 679830
#endif
Packit 679830
#endif /* _CRAY1 */
Packit 679830
#if (UINT_MAX == MFX_0xffffffffL)
Packit 679830
{ typedef char a_int4a[1 - 2 * !(sizeof(int) == 4)]; }
Packit 679830
#elif (UINT_MAX >= MFX_0xffffffffL)
Packit 679830
{ typedef char a_int4b[1 - 2 * !(sizeof(int) > 4)]; }
Packit 679830
#endif
Packit 679830
#if (ULONG_MAX == MFX_0xffffffffL)
Packit 679830
{ typedef char a_long4a[1 - 2 * !(sizeof(long) == 4)]; }
Packit 679830
#elif (ULONG_MAX >= MFX_0xffffffffL)
Packit 679830
{ typedef char a_long4b[1 - 2 * !(sizeof(long) > 4)]; }
Packit 679830
#endif
Packit 679830
]])],
Packit 679830
[mfx_cv_header_sane_limits_h=yes],
Packit 679830
[mfx_cv_header_sane_limits_h=no])])
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 2 mfx/m4/lzo.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_LZO_CHECK_ENDIAN], [
Packit 679830
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.])])
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 3 mfx/m4/lzo_lzochk.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_LZO_LZOCHK], [
Packit 679830
mfx_tmp=$1
Packit 679830
mfx_save_CPPFLAGS=$CPPFLAGS
Packit 679830
dnl in Makefile.in $(INCLUDES) will be before $(CPPFLAGS), so we mimic this here
Packit 679830
test "X$mfx_tmp" = "X" || CPPFLAGS="$mfx_tmp $CPPFLAGS"
Packit 679830
Packit 679830
AC_MSG_CHECKING([whether your compiler passes the LZO conformance test])
Packit 679830
Packit 679830
AC_LANG_CONFTEST([AC_LANG_PROGRAM(
Packit 679830
[[#include <limits.h>
Packit 679830
#include <stddef.h>
Packit 679830
#define LZO_CFG_NO_CONFIG_HEADER 1
Packit 679830
#define LZO_WANT_ACC_INCD_H 1
Packit 679830
$2
Packit 679830
#include $3
Packit 679830
Packit 679830
#undef  LZOCHK_ASSERT
Packit 679830
#define LZOCHK_ASSERT(expr)     LZO_COMPILE_TIME_ASSERT_HEADER(expr)
Packit 679830
#define LZO_WANT_ACC_CHK_CH 1
Packit 679830
#include $3
Packit 679830
Packit 679830
#undef  LZOCHK_ASSERT
Packit 679830
#define LZOCHK_ASSERT(expr)     LZO_COMPILE_TIME_ASSERT(expr)
Packit 679830
static void test_lzo_compile_time_assert(void) {
Packit 679830
#define LZO_WANT_ACC_CHK_CH 1
Packit 679830
#include $3
Packit 679830
}
Packit 679830
Packit 679830
#undef NDEBUG
Packit 679830
#include <assert.h>
Packit 679830
#undef  LZOCHK_ASSERT
Packit 679830
#define LZOCHK_ASSERT(expr)     assert(expr);
Packit 679830
static int test_lzo_run_time_assert(int r) {
Packit 679830
#define LZO_WANT_ACC_CHK_CH 1
Packit 679830
#include $3
Packit 679830
return r;
Packit 679830
}
Packit 679830
]], [[
Packit 679830
test_lzo_compile_time_assert();
Packit 679830
if (test_lzo_run_time_assert(1) != 1) return 1;
Packit 679830
]]
Packit 679830
)])
Packit 679830
Packit 679830
mfx_tmp=FAILED
Packit 679830
_AC_COMPILE_IFELSE([], [mfx_tmp=yes])
Packit 679830
rm -f conftest.$ac_ext conftest.$ac_objext
Packit 679830
Packit 679830
CPPFLAGS=$mfx_save_CPPFLAGS
Packit 679830
Packit 679830
AC_MSG_RESULT([$mfx_tmp])
Packit 679830
case x$mfx_tmp in
Packit 679830
  xpassed | xyes) ;;
Packit 679830
  *)
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_NOTICE([Your compiler failed the LZO conformance test - for details see ])
Packit 679830
    AC_MSG_NOTICE([`config.log'. Please check that log file and consider sending])
Packit 679830
    AC_MSG_NOTICE([a patch or bug-report to <${PACKAGE_BUGREPORT}>.])
Packit 679830
    AC_MSG_NOTICE([Thanks for your support.])
Packit 679830
    AC_MSG_NOTICE([])
Packit 679830
    AC_MSG_ERROR([LZO conformance test failed. Stop.])
Packit 679830
dnl    AS_EXIT
Packit 679830
    ;;
Packit 679830
esac
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 2 mfx/m4/mfx.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_CHECK_SIZEOF], [
Packit 679830
AC_CHECK_SIZEOF(__int32)
Packit 679830
AC_CHECK_SIZEOF(intmax_t)
Packit 679830
AC_CHECK_SIZEOF(uintmax_t)
Packit 679830
AC_CHECK_SIZEOF(intptr_t)
Packit 679830
AC_CHECK_SIZEOF(uintptr_t)
Packit 679830
Packit 679830
AC_CHECK_SIZEOF(float)
Packit 679830
AC_CHECK_SIZEOF(double)
Packit 679830
AC_CHECK_SIZEOF(long double)
Packit 679830
Packit 679830
AC_CHECK_SIZEOF(dev_t)
Packit 679830
AC_CHECK_SIZEOF(fpos_t)
Packit 679830
AC_CHECK_SIZEOF(mode_t)
Packit 679830
AC_CHECK_SIZEOF(off_t)
Packit 679830
AC_CHECK_SIZEOF(ssize_t)
Packit 679830
AC_CHECK_SIZEOF(time_t)
Packit 679830
])#
Packit 679830
Packit 679830
AC_DEFUN([mfx_CHECK_LIB_WINMM], [
Packit 679830
if test "X$GCC" = Xyes; then
Packit 679830
case $host_os in
Packit 679830
cygwin* | mingw* | pw32*)
Packit 679830
     test "X$LIBS" != "X" && LIBS="$LIBS "
Packit 679830
     LIBS="${LIBS}-lwinmm" ;;
Packit 679830
esac
Packit 679830
fi
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 2 mfx/m4/nrv.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_NRV_CHECK_ENDIAN], [
Packit 679830
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.])])
Packit 679830
])
Packit 679830
# Checks for stat-related time functions.
Packit 679830
Packit 679830
# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2014 Free Software
Packit 679830
# Foundation, Inc.
Packit 679830
Packit 679830
# This file is free software; the Free Software Foundation
Packit 679830
# gives unlimited permission to copy and/or distribute it,
Packit 679830
# with or without modifications, as long as this notice is preserved.
Packit 679830
Packit 679830
dnl From Paul Eggert.
Packit 679830
Packit 679830
# st_atim.tv_nsec - Linux, Solaris, Cygwin
Packit 679830
# st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE
Packit 679830
# st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE
Packit 679830
# st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1)
Packit 679830
Packit 679830
# st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway)
Packit 679830
# st_birthtim - Cygwin 1.7.0+
Packit 679830
Packit 679830
AC_DEFUN([gl_STAT_TIME],
Packit 679830
[
Packit 679830
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit 679830
  AC_CHECK_HEADERS_ONCE([sys/time.h])
Packit 679830
Packit 679830
  AC_CHECK_MEMBERS([struct stat.st_atim.tv_nsec],
Packit 679830
    [AC_CACHE_CHECK([whether struct stat.st_atim is of type struct timespec],
Packit 679830
       [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec],
Packit 679830
       [AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
Packit 679830
          [[
Packit 679830
            #include <sys/types.h>
Packit 679830
            #include <sys/stat.h>
Packit 679830
            #if HAVE_SYS_TIME_H
Packit 679830
            # include <sys/time.h>
Packit 679830
            #endif
Packit 679830
            #include <time.h>
Packit 679830
            struct timespec ts;
Packit 679830
            struct stat st;
Packit 679830
          ]],
Packit 679830
          [[
Packit 679830
            st.st_atim = ts;
Packit 679830
          ]])],
Packit 679830
          [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes],
Packit 679830
          [ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no])])
Packit 679830
     if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
Packit 679830
       AC_DEFINE([TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC], [1],
Packit 679830
         [Define to 1 if the type of the st_atim member of a struct stat is
Packit 679830
          struct timespec.])
Packit 679830
     fi],
Packit 679830
    [AC_CHECK_MEMBERS([struct stat.st_atimespec.tv_nsec], [],
Packit 679830
       [AC_CHECK_MEMBERS([struct stat.st_atimensec], [],
Packit 679830
          [AC_CHECK_MEMBERS([struct stat.st_atim.st__tim.tv_nsec], [], [],
Packit 679830
             [#include <sys/types.h>
Packit 679830
              #include <sys/stat.h>])],
Packit 679830
          [#include <sys/types.h>
Packit 679830
           #include <sys/stat.h>])],
Packit 679830
       [#include <sys/types.h>
Packit 679830
        #include <sys/stat.h>])],
Packit 679830
    [#include <sys/types.h>
Packit 679830
     #include <sys/stat.h>])
Packit 679830
])
Packit 679830
Packit 679830
# Check for st_birthtime, a feature from UFS2 (FreeBSD, NetBSD, OpenBSD, etc.)
Packit 679830
# and NTFS (Cygwin).
Packit 679830
# There was a time when this field was named st_createtime (21 June
Packit 679830
# 2002 to 16 July 2002) But that window is very small and applied only
Packit 679830
# to development code, so systems still using that configuration are
Packit 679830
# not supported.  See revisions 1.10 and 1.11 of FreeBSD's
Packit 679830
# src/sys/ufs/ufs/dinode.h.
Packit 679830
#
Packit 679830
AC_DEFUN([gl_STAT_BIRTHTIME],
Packit 679830
[
Packit 679830
  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
Packit 679830
  AC_CHECK_HEADERS_ONCE([sys/time.h])
Packit 679830
  AC_CHECK_MEMBERS([struct stat.st_birthtimespec.tv_nsec], [],
Packit 679830
    [AC_CHECK_MEMBERS([struct stat.st_birthtimensec], [],
Packit 679830
      [AC_CHECK_MEMBERS([struct stat.st_birthtim.tv_nsec], [], [],
Packit 679830
         [#include <sys/types.h>
Packit 679830
          #include <sys/stat.h>])],
Packit 679830
       [#include <sys/types.h>
Packit 679830
        #include <sys/stat.h>])],
Packit 679830
    [#include <sys/types.h>
Packit 679830
     #include <sys/stat.h>])
Packit 679830
])
Packit 679830
Packit 679830
dnl Serial 2 mfx/m4/ucl.m4
Packit 679830
Packit 679830
AC_DEFUN([mfx_UCL_CHECK_ENDIAN], [
Packit 679830
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.])])
Packit 679830
])