PHP: fixed building on MacOSX with --ld-opt= option.
This commit is contained in:
@@ -37,7 +37,7 @@ END
|
|||||||
|
|
||||||
nxt_test="$CC $CFLAGS $NXT_CFLAGS $NXT_CC_OPT $NXT_TEST_CFLAGS \
|
nxt_test="$CC $CFLAGS $NXT_CFLAGS $NXT_CC_OPT $NXT_TEST_CFLAGS \
|
||||||
$nxt_feature_inc_path -o $NXT_AUTOTEST $NXT_AUTOTEST.c \
|
$nxt_feature_inc_path -o $NXT_AUTOTEST $NXT_AUTOTEST.c \
|
||||||
$NXT_LD_OPT $NXT_TEST_LIBS $nxt_feature_libs"
|
$nxt_feature_libs $NXT_LD_OPT $NXT_TEST_LIBS"
|
||||||
|
|
||||||
# /bin/sh -c "(...)" is to intercept "Killed", "Abort trap",
|
# /bin/sh -c "(...)" is to intercept "Killed", "Abort trap",
|
||||||
# "Segmentation fault", or other shell messages.
|
# "Segmentation fault", or other shell messages.
|
||||||
|
|||||||
@@ -87,13 +87,15 @@ if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
NXT_PHP_LIB="$NXT_PHP_LIB_PATH/libphp${NXT_PHP_VERSION%%.*}.a"
|
NXT_PHP_LIB="$NXT_PHP_LIB_PATH/libphp${NXT_PHP_VERSION%%.*}.a"
|
||||||
NXT_PHP_LDFLAGS="`${NXT_PHP_CONFIG} --libs`"
|
NXT_PHP_LDFLAGS="`${NXT_PHP_CONFIG} --ldflags` \
|
||||||
|
`${NXT_PHP_CONFIG} --libs`"
|
||||||
|
|
||||||
else
|
else
|
||||||
NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
|
NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}"
|
||||||
|
|
||||||
if [ "$NXT_PHP_LIB_PATH" != "" ]; then
|
if [ "$NXT_PHP_LIB_PATH" != "" ]; then
|
||||||
# "php-config --ldflags" does not contain path to libphp.
|
# "php-config --ldflags" does not contain path to libphp, but
|
||||||
|
# contains usually path to libraries required by extensions.
|
||||||
NXT_PHP_LDFLAGS="-L${NXT_PHP_LIB_PATH} \
|
NXT_PHP_LDFLAGS="-L${NXT_PHP_LIB_PATH} \
|
||||||
-Wl,-rpath ${NXT_PHP_LIB_PATH}"
|
-Wl,-rpath ${NXT_PHP_LIB_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user