Skip to content

Commit 2079b09

Browse files
committed
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.
1 parent 83b9952 commit 2079b09

File tree

7 files changed

+6
-23
lines changed

7 files changed

+6
-23
lines changed

Zend/Zend.m4

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,7 @@ dnl
126126
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
127127
AC_REQUIRE([AC_PROG_CC])
128128
129-
AC_CHECK_HEADERS(
130-
inttypes.h \
131-
stdint.h \
132-
malloc.h \
133-
unistd.h \
134-
sys/types.h \
135-
sys/time.h \
136-
unix.h \
137-
cpuid.h \
138-
dlfcn.h)
129+
AC_CHECK_HEADERS([cpuid.h])
139130
140131
dnl
141132
dnl LIBZEND_DLSYM_CHECK

configure.ac

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,12 +436,14 @@ ieeefp.h \
436436
langinfo.h \
437437
limits.h \
438438
locale.h \
439+
malloc.h \
439440
monetary.h \
440441
netdb.h \
441442
poll.h \
442443
pwd.h \
443444
resolv.h \
444445
signal.h \
446+
strings.h \
445447
syslog.h \
446448
sysexits.h \
447449
sys/ioctl.h \
@@ -457,6 +459,7 @@ sys/statfs.h \
457459
sys/statvfs.h \
458460
sys/vfs.h \
459461
sys/sysexits.h \
462+
sys/uio.h \
460463
sys/wait.h \
461464
sys/loadavg.h \
462465
termios.h \

ext/date/config0.m4

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
dnl Check for headers needed by timelib
2-
AC_CHECK_HEADERS([ \
3-
strings.h \
4-
io.h
5-
])
2+
AC_CHECK_HEADERS([io.h])
63

74
dnl Check for strtoll, atoll
85
AC_CHECK_FUNCS(strtoll atoll)

ext/opcache/config.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ if test "$PHP_OPCACHE" != "no"; then
2121
AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function])
2222
])
2323

24-
AC_CHECK_HEADERS([unistd.h sys/uio.h])
25-
2624
AC_MSG_CHECKING(for sysvipc shared memory support)
2725
AC_RUN_IFELSE([AC_LANG_SOURCE([[
2826
#include <sys/types.h>

ext/sockets/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ if test "$PHP_SOCKETS" != "no"; then
1717
fi
1818

1919
AC_CHECK_FUNCS([hstrerror socketpair if_nametoindex if_indextoname])
20-
AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h sys/sockio.h])
20+
AC_CHECK_HEADERS([netinet/tcp.h sys/un.h sys/sockio.h])
2121
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2222
#include <sys/types.h>
2323
#include <sys/socket.h>

ext/standard/config.m4

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,6 @@ AC_CHECK_HEADERS([net/if.h],[], [],
448448
#endif
449449
#include <net/if.h>
450450
])
451-
AC_CHECK_HEADERS([netdb.h])
452451
AC_MSG_CHECKING([for usable getifaddrs])
453452
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
454453
#include <sys/types.h>

sapi/fpm/config.m4

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ AC_DEFUN([AC_FPM_STDLIBS],
1111
1212
AC_SEARCH_LIBS(socket, socket)
1313
AC_SEARCH_LIBS(inet_addr, nsl)
14-
15-
AC_CHECK_HEADERS([fcntl.h unistd.h sys/uio.h])
16-
AC_CHECK_HEADERS([sys/select.h sys/socket.h sys/time.h])
17-
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h])
18-
AC_CHECK_HEADERS([sysexits.h])
1914
])
2015

2116
AC_DEFUN([AC_FPM_PRCTL],

0 commit comments

Comments
 (0)