Skip to content

Commit 71c93fd

Browse files
committed
Added prefix to the compilation configuration variables. Fixed #5629
1 parent b3c5484 commit 71c93fd

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

config.m4

+21-21
Original file line numberDiff line numberDiff line change
@@ -1103,50 +1103,50 @@ EOF
11031103
thirdparty/nghttp2/nghttp2_hd_huffman_data.c"
11041104
fi
11051105

1106-
if test -z "$PHP_VERSION"; then
1107-
if test -z "$PHP_CONFIG"; then
1108-
AC_MSG_ERROR([php-config not found])
1109-
fi
1110-
PHP_VERSION=`$PHP_CONFIG --version`
1106+
if test -z "$PHP_CONFIG"; then
1107+
AC_MSG_ERROR([php-config not found])
11111108
fi
11121109

1113-
PHP_VERSION_ID=`echo "${PHP_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 10 + [$]2); }'`
1110+
SW_PHP_VERSION=`$PHP_CONFIG --version`
1111+
SW_PHP_VERSION_ID=`echo "${SW_PHP_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([$]1 * 10 + [$]2); }'`
11141112

1115-
if test "$PHP_VERSION_ID" = "82"; then
1116-
PHP_THIRDPARTY_DIR="thirdparty/php81"
1113+
if test "$SW_PHP_VERSION_ID" = "82"; then
1114+
SW_PHP_THIRDPARTY_DIR="thirdparty/php81"
11171115
else
1118-
PHP_THIRDPARTY_DIR="thirdparty/php${PHP_VERSION_ID}"
1116+
SW_PHP_THIRDPARTY_DIR="thirdparty/php${SW_PHP_VERSION_ID}"
11191117
fi
11201118

1119+
AC_MSG_NOTICE([php version: $SW_PHP_VERSION, version_id: $SW_PHP_VERSION_ID, thirdparty_dir: $SW_PHP_THIRDPARTY_DIR])
1120+
11211121
if test "$PHP_SWOOLE_PGSQL" != "no"; then
11221122
swoole_source_file="$swoole_source_file \
1123-
${PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_driver.c \
1124-
${PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_statement.c"
1125-
if test "$PHP_VERSION_ID" -ge "84"; then
1123+
${SW_PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_driver.c \
1124+
${SW_PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_statement.c"
1125+
if test "$SW_PHP_VERSION_ID" -ge "84"; then
11261126
swoole_source_file="$swoole_source_file \
1127-
${PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_sql_parser.c"
1127+
${SW_PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_sql_parser.c"
11281128
fi
11291129
fi
11301130

11311131
if test "$PHP_SWOOLE_ORACLE" != "no"; then
11321132
swoole_source_file="$swoole_source_file \
1133-
${PHP_THIRDPARTY_DIR}/pdo_oci/oci_driver.c \
1134-
${PHP_THIRDPARTY_DIR}/pdo_oci/oci_statement.c"
1133+
${SW_PHP_THIRDPARTY_DIR}/pdo_oci/oci_driver.c \
1134+
${SW_PHP_THIRDPARTY_DIR}/pdo_oci/oci_statement.c"
11351135
fi
11361136

11371137
if test "$PHP_SWOOLE_ODBC" != "no"; then
11381138
swoole_source_file="$swoole_source_file \
1139-
${PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_driver.c \
1140-
${PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_stmt.c"
1139+
${SW_PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_driver.c \
1140+
${SW_PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_stmt.c"
11411141
fi
11421142

11431143
if test "$PHP_SWOOLE_SQLITE" != "no"; then
11441144
swoole_source_file="$swoole_source_file \
1145-
${PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_driver.c \
1146-
${PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_statement.c"
1147-
if test "$PHP_VERSION_ID" -ge "84"; then
1145+
${SW_PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_driver.c \
1146+
${SW_PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_statement.c"
1147+
if test "$SW_PHP_VERSION_ID" -ge "84"; then
11481148
swoole_source_file="$swoole_source_file \
1149-
${PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_sql_parser.c"
1149+
${SW_PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_sql_parser.c"
11501150
fi
11511151
fi
11521152

0 commit comments

Comments
 (0)