When building with kerberos support (--with-kerberos), a few libraries
and flags need to be added to various parts of the build system. The
most reliable way to get those flags is through the krb5-config
program that ships with both major implementations of kerberos. The
PHP_SETUP_KERBEROS macro in acinclude.m4 attempts to detect
krb5-config, and use it.
However, there's a bug in that macro. The --with-kerberos parameter
accepts a directory where the kerberos libraries can be found. When a
directory is given, it is stored in the PHP_KERBEROS variable. The
following test,
if test "$PHP_KERBEROS" = "yes" && test -x "$KRB5_CONFIG"; then
thus fails whenever a directory is passed to --with-kerberos, since it
compares a directory name against the string "yes". This causes
krb5-config to go unused, and some unreliable fallback logic is
attempted instead. One consequence of this is that the Heimdal
kerberos implementation cannot be substituted for the MIT one, at
least when a directory is passed to --with-kerberos.
This commit reverses the logic and checks for "$PHP_KERBEROS" != "no".
To confirm that this fixes the issue, one can inspect the "-l" library
flags that get appended to the command-line. On a machine with Heimdal
and the unmodified acinclude.m4, running
./configure --with-openssl --with-kerberos=/usr
will log (for example) to config.log,
configure:18082: checking for krb5-config
configure:18101: found /usr/bin/krb5-config
configure:18114: result: /usr/bin/krb5-config
configure:18450: checking for RAND_egd
configure:18450: cc ... conftest.c ... -lgssapi_krb5 -lkrb5 ...
which are the library names for the MIT implementation. After patching
acinclude.m4 to negate the logic, the same command on the same machine
outputs (to config.log):
configure:18450: cc ... conftest.c -lgssapi -lheimntlm ...
These are the correct library names for the Heimdal implementation.
PHP-Bug: 73214
Configure scripts for extensions look for PDO include files in
$prefix/include/php. This change makes them look into $phpincludedir
instead, which may be different from $prefix/include/php.
* origin/master:
fixed copying of the struct as it's not being modified
avoid strlen usage in loop
Removes accidentally added files.
Reverts some unwanted changes
Deletes patch leftovers
Replaces php5 with php7, without whitespace changes.
* PHP-5.5:
With --enable-dtrace, the correct PIC/non-PIC .o files on Solaris and Linux are now used. DTrace is part of Oracle Linux. See https://oss.oracle.com/projects/DTrace/
* PHP-5.4:
With --enable-dtrace, the correct PIC/non-PIC .o files on Solaris and Linux are now used. DTrace is part of Oracle Linux. See https://oss.oracle.com/projects/DTrace/
Linux are now used. DTrace is part of Oracle Linux. See
https://oss.oracle.com/projects/DTrace/
This patch does not change DTrace linking for non-Solaris/Linux
platforms.
For SystemTap users on Linux, this patch removes the compilation
warning:
Warning: Linking the shared library libphp5.la against the
non-libtool objects Zend/zend_dtrace.d.o is not portable!
* PHP-5.5:
NEWS for recent DTrace merges. Remove redundant 'cp' during DTrace install.
Fixed bug #62691 (solaris sed has no -i switch) Make 'make distclean' remove generated DTrace .h file
Enable dtrace probes on linux as they are compatible with systemtap
Fixed bug #63706: Cannot build PHP-5.5 with --enable-dtrace on Fedora 17
* PHP-5.5:
Add an empty make command for DTrace .d files to stop an implicit circular dependency in GNU Make which causes .d files to be overwritten (Bug 61268)
Merge branch 'PHP-5.4'
* PHP-5.4:
Add an empty make command for DTrace .d files to stop an implicit circular dependency in GNU Make which causes .d files to be overwritten (Bug 61268)
Merge branch 'PHP-5.4'
Conflicts:
ext/mysqlnd/mysqlnd.c
Configure runs like:
$./configure -C CFLAGS="-ggdb" --enable-debug --prefix=$(pwd)/usr
did result in an empty config.nice
* allow single dash flags like -C, -s etc.
* allow passing evnironment variables as arguments
With pkgconfig = 0.28 output is an empty string,
This breaks the test on the 2 vars
Need to split when
LIB set (ex -lssl -lcrypto)
INC empty (because /usr/include used)