Skip to content

Commit 952efe8

Browse files
committed
use $PHP_LIBDIR and don't cache libevent check results
1 parent 7e76c54 commit 952efe8

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

sapi/fpm/config.m4

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,13 @@ LD_LIBRARY_PATH_SAVED="$LD_LIBRARY_PATH"
6161
# Set our flags if we are checking a specific directory.
6262
if test -n "$ac_libevent_path" ; then
6363
LIBEVENT_CPPFLAGS="-I$ac_libevent_path/include"
64-
LIBEVENT_LDFLAGS="-L$ac_libevent_path/lib"
64+
65+
if test -z "$PHP_LIBDIR"; then
66+
LIBEVENT_LDFLAGS="-L$ac_libevent_path/lib"
67+
else
68+
LIBEVENT_LDFLAGS="-L$ac_libevent_path/$PHP_LIBDIR"
69+
fi
70+
6571
LD_LIBRARY_PATH="$ac_libevent_path/lib:$LD_LIBRARY_PATH"
6672
else
6773
LIBEVENT_CPPFLAGS=""
@@ -504,15 +510,10 @@ if test "$PHP_FPM" != "no"; then
504510

505511
AC_LIB_EVENT([$minimum_libevent_version])
506512

507-
AC_CACHE_CHECK(whether libevent build works, php_cv_libevent_build_works, [
508-
PHP_TEST_BUILD(event_init,
509-
[
510-
php_cv_libevent_build_works=yes
511-
], [
512-
AC_MSG_RESULT(no)
513-
AC_MSG_ERROR([build test failed. Please check the config.log for details.])
514-
], $LIBEVENT_LIBS)
515-
])
513+
PHP_TEST_BUILD(event_init, [ ], [
514+
AC_MSG_RESULT(no)
515+
AC_MSG_ERROR([build test failed. Please check the config.log for details.])
516+
], $LIBEVENT_LIBS)
516517

517518
PHP_SETUP_LIBXML(FPM_SHARED_LIBADD, [
518519
], [

0 commit comments

Comments
 (0)