AM_SILENT_RULES([yes])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
-AH_TOP([#ifndef SR_CONFIG_H
-#define SR_CONFIG_H /* To stop multiple inclusions. */])
-AH_BOTTOM([#endif /* SR_CONFIG_H */])
-
AC_CANONICAL_HOST
# Checks for programs.
# Required for per-target flags or subdir-objects with C sources.
AM_PROG_CC_C_O
+# Set the standard the C library headers should conform to.
+AH_VERBATIM([_POSIX_C_SOURCE], [/* The targeted POSIX standard. */
+#ifndef _POSIX_C_SOURCE
+# define _POSIX_C_SOURCE 200112L
+#endif])
+
# Get compiler versions.
SR_PROG_VERSION([$CC], [sr_cc_version])
SR_PROG_VERSION([$CXX], [sr_cxx_version])
[AC_DEFINE([PYGOBJECT_FLAGS_SIGNED], [1],
[Whether last argument to pyg_flags_get_value() is signed.])])
-# The Python bindings need the setuptools Python module.
-# We'll let it go through even if the AX macro wasn't found,
-# as the Python module may still be there.
-HAVE_PYMOD_SETUPTOOLS=yes
-m4_ifdef([AX_PYTHON_MODULE],
- [AX_PYTHON_MODULE([setuptools])],
- [m4_warn([unsupported], [Missing macro AX_PYTHON_MODULE: no setuptools check])])
+# The Python bindings need the setuptools and numpy Python modules.
+# We'll let it go through even if the AX macro wasn't found, as the
+# Python modules may still be there.
+m4_ifdef([AX_PYTHON_MODULE], [
+ AX_PYTHON_MODULE([setuptools])
+ AX_PYTHON_MODULE([numpy])
+], [
+ HAVE_PYMOD_SETUPTOOLS=yes
+ HAVE_PYMOD_NUMPY=yes
+ m4_warn([unsupported],
+ [Missing macro AX_PYTHON_MODULE: no check for setuptools and numpy])
+])
AS_IF([test "x$HAVE_PYMOD_SETUPTOOLS" != xyes],
[SR_APPEND([sr_python_missing], [', '], [setuptools])])
+AS_IF([test "x$HAVE_PYMOD_NUMPY" != xyes],
+ [SR_APPEND([sr_python_missing], [', '], [numpy])])
# The Python bindings use SWIG to generate code.
AC_CHECK_PROGS([SWIG], [swig swig3.0 swig2.0])