summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlex Dowad <alexinbeijing@gmail.com>2020-05-26 19:56:52 +0200
committerAlex Dowad <alexinbeijing@gmail.com>2020-06-19 22:04:52 +0200
commit7e2147be23ee8720f9e462a93af55917d2bd3985 (patch)
treec254736fdf51a62f5b18f21f8c72e2c92178da9b /configure.ac
parentaa2e68cf6e4adcaaf884ea6b17f182e3be552fa7 (diff)
downloadphp-git-7e2147be23ee8720f9e462a93af55917d2bd3985.tar.gz
Clean up some unused code (and fix some comments) in build scripts
- Fix typo in build/php.m4 - Nothing uses HAVE_INTTYPES_H; so remove check for header file - Nothing defines ZEND_ACCONFIG_H_NO_C_PROTOS; so remove #ifndef - `format_money` was removed in 2019, so <monetary.h> no longer needed - Nothing uses HAVE_NETDB_H; so remove check for header file - Nothing checks HAVE_TERMIOS_H; so remove check for header file (This was actually added when Wez Furlong was adding the original implementation of PTY support in `proc_open`, since replaced.) - Nothing checks HAVE_SYS_AUXV_H; so remove check for header file - PHP_BUILD_DATE variable is not used for anything, so remove it This variable was added to the Makefile, but from there, was not used for anything. The comments suggest it was intended to allow 'reproducible builds'. Presumably, this means that if a bug is found in a PHP binary somewhere, one could look at the Makefile which it was built from, see the date, and then could check the same code version out from source control. But... there can easily be multiple commits to the repo in the same day. Also, what makes us think that the Makefile which a binary was built from will be easily available? Besides, ext/standard/info.c already embeds the build date and time in each binary... but it does it using `__DATE__` and `__TIME__` (see `php_print_info`). - Nothing checks HAVE_FINITE; so don't check for function - Grammar fix to comment in build/php.m4 - Nothing sets $php_ldflags_add_usr_lib variable in configure, so remove conditional This was added in 2002, when Rasmus was having difficulty building PHP on some host and needed to have /usr/lib in the rpath. It was never documented and probably has never been used by anyone else.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac28
1 files changed, 2 insertions, 26 deletions
diff --git a/configure.ac b/configure.ac
index e830acfb25..99e04e6c1d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,8 +43,6 @@ AH_TOP([
#define ZEND_DLIMPORT
])
AH_BOTTOM([
-#ifndef ZEND_ACCONFIG_H_NO_C_PROTOS
-
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
@@ -61,8 +59,6 @@ AH_BOTTOM([
#include <string.h>
-#endif /* ifndef ZEND_ACCONFIG_H_NO_C_PROTOS */
-
#endif /* PHP_CONFIG_H */
])
@@ -372,7 +368,6 @@ dnl ----------------------------------------------------------------------------
dnl QNX requires unix.h to allow functions in libunix to work properly.
AC_CHECK_HEADERS([ \
-inttypes.h \
stdint.h \
dirent.h \
sys/param.h \
@@ -389,8 +384,6 @@ grp.h \
ieeefp.h \
langinfo.h \
malloc.h \
-monetary.h \
-netdb.h \
poll.h \
pty.h \
pwd.h \
@@ -398,7 +391,6 @@ resolv.h \
strings.h \
syslog.h \
sysexits.h \
-sys/auxv.h \
sys/ioctl.h \
sys/file.h \
sys/mman.h \
@@ -415,7 +407,6 @@ sys/sysexits.h \
sys/uio.h \
sys/wait.h \
sys/loadavg.h \
-termios.h \
unistd.h \
unix.h \
utime.h \
@@ -1272,28 +1263,14 @@ AC_SUBST(EXPANDED_LOCALSTATEDIR)
AC_SUBST(EXPANDED_PHP_CONFIG_FILE_PATH)
AC_SUBST(EXPANDED_PHP_CONFIG_FILE_SCAN_DIR)
-if test -n "$php_ldflags_add_usr_lib"; then
- PHP_RPATHS="$PHP_RPATHS /usr/lib"
-fi
-
PHP_UTILIZE_RPATHS
-if test -z "$php_ldflags_add_usr_lib"; then
- PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
- PHP_REMOVE_USR_LIB(LDFLAGS)
-fi
+PHP_REMOVE_USR_LIB(PHP_LDFLAGS)
+PHP_REMOVE_USR_LIB(LDFLAGS)
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
-dnl SOURCE_DATE_EPOCH for reproducible builds
-dnl https://reproducible-builds.org/specs/source-date-epoch/
-PHP_BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d 2>/dev/null`
-if test $? -ne 0 ; then
-PHP_BUILD_DATE=`date -u +%Y-%m-%d`
-fi
-AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
-
UNAME=`uname -a | xargs`
PHP_UNAME=${PHP_UNAME:-$UNAME}
AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
@@ -1356,7 +1333,6 @@ PHP_SUBST(LIBTOOL)
PHP_SUBST(LN_S)
PHP_SUBST_OLD(NATIVE_RPATHS)
PHP_SUBST_OLD(PEAR_INSTALLDIR)
-PHP_SUBST(PHP_BUILD_DATE)
PHP_SUBST_OLD(PHP_LDFLAGS)
PHP_SUBST_OLD(PHP_LIBS)
PHP_SUBST(OVERALL_TARGET)