summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Kokot <peterkokot@gmail.com>2019-06-23 22:04:03 +0200
committerPeter Kokot <peterkokot@gmail.com>2019-06-27 02:45:09 +0200
commit2079b09854ba1b7990641450ab9a69a141f7718a (patch)
tree92454c17c99037b9665d13da7008f0c24b534f5e
parent83b99527dfb624b2b87d358ba729528bac3c7aab (diff)
downloadphp-git-2079b09854ba1b7990641450ab9a69a141f7718a.tar.gz
Clean headers checks
Some headers were checked multiple times in the main configure.ac file and in the bundled extensions or SAPIs themselves. Also many of these checks are then used accross other extensions or SAPIs so a central configure.ac makes most sense for these checks.
-rw-r--r--Zend/Zend.m411
-rw-r--r--configure.ac3
-rw-r--r--ext/date/config0.m45
-rw-r--r--ext/opcache/config.m42
-rw-r--r--ext/sockets/config.m42
-rw-r--r--ext/standard/config.m41
-rw-r--r--sapi/fpm/config.m45
7 files changed, 6 insertions, 23 deletions
diff --git a/Zend/Zend.m4 b/Zend/Zend.m4
index d859487498..5b97e6c361 100644
--- a/Zend/Zend.m4
+++ b/Zend/Zend.m4
@@ -126,16 +126,7 @@ dnl
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
AC_REQUIRE([AC_PROG_CC])
-AC_CHECK_HEADERS(
-inttypes.h \
-stdint.h \
-malloc.h \
-unistd.h \
-sys/types.h \
-sys/time.h \
-unix.h \
-cpuid.h \
-dlfcn.h)
+AC_CHECK_HEADERS([cpuid.h])
dnl
dnl LIBZEND_DLSYM_CHECK
diff --git a/configure.ac b/configure.ac
index 450de11c16..0680a0acfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -436,12 +436,14 @@ ieeefp.h \
langinfo.h \
limits.h \
locale.h \
+malloc.h \
monetary.h \
netdb.h \
poll.h \
pwd.h \
resolv.h \
signal.h \
+strings.h \
syslog.h \
sysexits.h \
sys/ioctl.h \
@@ -457,6 +459,7 @@ sys/statfs.h \
sys/statvfs.h \
sys/vfs.h \
sys/sysexits.h \
+sys/uio.h \
sys/wait.h \
sys/loadavg.h \
termios.h \
diff --git a/ext/date/config0.m4 b/ext/date/config0.m4
index ebd86acc2e..38389503e1 100644
--- a/ext/date/config0.m4
+++ b/ext/date/config0.m4
@@ -1,8 +1,5 @@
dnl Check for headers needed by timelib
-AC_CHECK_HEADERS([ \
-strings.h \
-io.h
-])
+AC_CHECK_HEADERS([io.h])
dnl Check for strtoll, atoll
AC_CHECK_FUNCS(strtoll atoll)
diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4
index 4d8f3a5888..dc32c5b94f 100644
--- a/ext/opcache/config.m4
+++ b/ext/opcache/config.m4
@@ -21,8 +21,6 @@ if test "$PHP_OPCACHE" != "no"; then
AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
])
- AC_CHECK_HEADERS([unistd.h sys/uio.h])
-
AC_MSG_CHECKING(for sysvipc shared memory support)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <sys/types.h>
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4
index 405b68d288..71cebdb3e2 100644
--- a/ext/sockets/config.m4
+++ b/ext/sockets/config.m4
@@ -17,7 +17,7 @@ if test "$PHP_SOCKETS" != "no"; then
fi
AC_CHECK_FUNCS([hstrerror socketpair if_nametoindex if_indextoname])
- AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h sys/sockio.h])
+ AC_CHECK_HEADERS([netinet/tcp.h sys/un.h sys/sockio.h])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
diff --git a/ext/standard/config.m4 b/ext/standard/config.m4
index 891fca2ffa..b0ec90900b 100644
--- a/ext/standard/config.m4
+++ b/ext/standard/config.m4
@@ -448,7 +448,6 @@ AC_CHECK_HEADERS([net/if.h],[], [],
#endif
#include <net/if.h>
])
-AC_CHECK_HEADERS([netdb.h])
AC_MSG_CHECKING([for usable getifaddrs])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/types.h>
diff --git a/sapi/fpm/config.m4 b/sapi/fpm/config.m4
index 67ffc10522..24d42d2bf0 100644
--- a/sapi/fpm/config.m4
+++ b/sapi/fpm/config.m4
@@ -11,11 +11,6 @@ AC_DEFUN([AC_FPM_STDLIBS],
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(inet_addr, nsl)
-
- AC_CHECK_HEADERS([fcntl.h unistd.h sys/uio.h])
- AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h])
- AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
- AC_CHECK_HEADERS([sysexits.h])
])
AC_DEFUN([AC_FPM_PRCTL],