summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac112
1 files changed, 56 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac
index 9d10ffb..ce13421 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,62 @@ m4_version_prereq([2.70],[],[AC_PROG_CC_C99])
AC_PROG_CPP
AC_PROG_MAKE_SET
+# Checks for libraries.
+
+# Check POSIX conformance level.
+_want_posix_level=200112L
+_posix_level_human=POSIX.1-2001
+AC_MSG_CHECKING([if the POSIX conformance level can be set to ${_posix_level_human}])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+#define _POSIX_C_SOURCE ${_want_posix_level}
+#include <unistd.h>
+#if _POSIX_VERSION != ${_want_posix_level}
+#error incorrect _POSIX_VERSION
+#endif
+])],
+[AC_MSG_RESULT([yes])],
+[AC_MSG_RESULT([no]);
+ AC_MSG_FAILURE([this system does not conform to the ${_posix_level_human} standard])
+])
+AC_DEFINE_UNQUOTED([_POSIX_C_SOURCE], [${_want_posix_level}], [define the POSIX conformance level])
+CFLAGS=${CFLAGS-}${CFLAGS:+ }-D_POSIX_C_SOURCE=${_want_posix_level}
+
+# Define X/Open conformance level.
+_want_xopen_level=500
+AC_DEFINE_UNQUOTED([_XOPEN_SOURCE], [${_want_xopen_level}], [define the X/Open conformance level])
+CFLAGS=${CFLAGS-}${CFLAGS:+ }-D_XOPEN_SOURCE=${_want_xopen_level}
+
+# Checks for header files.
+AC_HEADER_STDC
+AC_HEADER_STDBOOL
+AC_HEADER_STAT
+
+AC_CHECK_HEADERS_ONCE([stdarg.h])
+AC_CHECK_HEADERS_ONCE([linux/limits.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+AC_C_RESTRICT
+AC_C_STRINGIZE
+AC_C_VARARRAYS
+AC_TYPE_SIZE_T
+AC_TYPE_UINT8_T
+
+if test x"$ac_cv_c_vararrays" != x'yes'
+then
+ AC_MSG_ERROR([$CC does not support variable-length arrays (VLAs)])
+fi
+
+# Checks for library functions.
+
+AC_CHECK_FUNCS_ONCE([getenv getpwuid stat])
+AC_CHECK_FUNCS_ONCE([strdup strncpy strncat])
+
+AC_CHECK_FUNCS_ONCE([mktemp mkdtemp tempnam])
+AC_CHECK_DECLS([mkdtemp, mktemp], [], [], [[#include <stdlib.h>]])
+AC_CHECK_DECLS([tempnam], [], [], [[#include <stdio.h>]])
+
# Checks for compiler options.
_cccheckingopts=$(
# clang (newer versions) don't fail if they see an unknown argument.
@@ -129,62 +185,6 @@ AC_DEFINE_UNQUOTED([SK_WARN_UNUSED_RESULT], [${_sk_warn_unused_result:-/* warn_u
AC_DEFINE_UNQUOTED([HAVE_CC_NONNULL_CHECK], $((_sk_cc_nonnull_check)), [Define to 1 if the CC supports __attribute__(nonnull)])
-# Checks for libraries.
-
-# Check POSIX conformance level.
-_want_posix_level=200112L
-_posix_level_human=POSIX.1-2001
-AC_MSG_CHECKING([if the POSIX conformance level can be set to ${_posix_level_human}])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-#define _POSIX_C_SOURCE ${_want_posix_level}
-#include <unistd.h>
-#if _POSIX_VERSION != ${_want_posix_level}
-#error incorrect _POSIX_VERSION
-#endif
-])],
-[AC_MSG_RESULT([yes])],
-[AC_MSG_RESULT([no]);
- AC_MSG_FAILURE([this system does not conform to the ${_posix_level_human} standard])
-])
-AC_DEFINE_UNQUOTED([_POSIX_C_SOURCE], [${_want_posix_level}], [define the POSIX conformance level])
-CFLAGS=${CFLAGS-}${CFLAGS:+ }-D_POSIX_C_SOURCE=${_want_posix_level}
-
-# Define X/Open conformance level.
-_want_xopen_level=500
-AC_DEFINE_UNQUOTED([_XOPEN_SOURCE], [${_want_xopen_level}], [define the X/Open conformance level])
-CFLAGS=${CFLAGS-}${CFLAGS:+ }-D_XOPEN_SOURCE=${_want_xopen_level}
-
-# Checks for header files.
-AC_HEADER_STDC
-AC_HEADER_STDBOOL
-AC_HEADER_STAT
-
-AC_CHECK_HEADERS_ONCE([stdarg.h])
-AC_CHECK_HEADERS_ONCE([linux/limits.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_C_RESTRICT
-AC_C_STRINGIZE
-AC_C_VARARRAYS
-AC_TYPE_SIZE_T
-AC_TYPE_UINT8_T
-
-if test x"$ac_cv_c_vararrays" != x'yes'
-then
- AC_MSG_ERROR([$CC does not support variable-length arrays (VLAs)])
-fi
-
-# Checks for library functions.
-
-AC_CHECK_FUNCS_ONCE([getenv getpwuid stat])
-AC_CHECK_FUNCS_ONCE([strdup strncpy strncat])
-
-AC_CHECK_FUNCS_ONCE([mktemp mkdtemp tempnam])
-AC_CHECK_DECLS([mkdtemp, mktemp], [], [], [[#include <stdlib.h>]])
-AC_CHECK_DECLS([tempnam], [], [], [[#include <stdio.h>]])
-
# Add debug support
AC_ARG_ENABLE(
[debug],