@@ -1065,47 +1065,44 @@ EOF
10651065 thirdparty/nghttp2/nghttp2_hd_huffman.c \
10661066 thirdparty/nghttp2/nghttp2_hd_huffman_data.c"
10671067 fi
1068+
1069+ if test -z "$PHP_VERSION"; then
1070+ if test -z "$PHP_CONFIG"; then
1071+ AC_MSG_ERROR ( [ php-config not found] )
1072+ fi
1073+ PHP_VERSION=`$PHP_CONFIG --version`
1074+ fi
1075+
1076+ PHP_VERSION_ID=`echo "${PHP_VERSION}" | $AWK 'BEGIN { FS = "."; } { printf "%d", ([ $] 1 * 10 + [ $] 2); }'`
1077+
1078+ if test "$PHP_VERSION_ID" = "82"; then
1079+ PHP_THIRDPARTY_DIR="thirdparty/php81"
1080+ else
1081+ PHP_THIRDPARTY_DIR="thirdparty/php${PHP_VERSION_ID}"
1082+ fi
10681083
10691084 if test "$PHP_SWOOLE_PGSQL" != "no"; then
10701085 swoole_source_file="$swoole_source_file \
1071- thirdparty/php81/pdo_pgsql/pgsql_driver.c \
1072- thirdparty/php81/pdo_pgsql/pgsql_statement.c \
1073- thirdparty/php83/pdo_pgsql/pgsql_driver.c \
1074- thirdparty/php83/pdo_pgsql/pgsql_statement.c \
1075- thirdparty/php84/pdo_pgsql/pgsql_driver.c \
1076- thirdparty/php84/pdo_pgsql/pgsql_statement.c \
1077- thirdparty/php84/pdo_pgsql/pgsql_sql_parser.c"
1086+ ${PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_driver.c \
1087+ ${PHP_THIRDPARTY_DIR}/pdo_pgsql/pgsql_statement.c"
10781088 fi
10791089
10801090 if test "$PHP_SWOOLE_ORACLE" != "no"; then
10811091 swoole_source_file="$swoole_source_file \
1082- thirdparty/php81/pdo_oci/oci_driver.c \
1083- thirdparty/php81/pdo_oci/oci_statement.c \
1084- thirdparty/php83/pdo_oci/oci_driver.c \
1085- thirdparty/php83/pdo_oci/oci_statement.c \
1086- thirdparty/php84/pdo_oci/oci_driver.c \
1087- thirdparty/php84/pdo_oci/oci_statement.c"
1092+ ${PHP_THIRDPARTY_DIR}/pdo_oci/oci_driver.c \
1093+ ${PHP_THIRDPARTY_DIR}/pdo_oci/oci_statement.c"
10881094 fi
10891095
10901096 if test "$PHP_SWOOLE_ODBC" != "no"; then
10911097 swoole_source_file="$swoole_source_file \
1092- thirdparty/php81/pdo_odbc/odbc_driver.c \
1093- thirdparty/php81/pdo_odbc/odbc_stmt.c \
1094- thirdparty/php83/pdo_odbc/odbc_driver.c \
1095- thirdparty/php83/pdo_odbc/odbc_stmt.c \
1096- thirdparty/php84/pdo_odbc/odbc_driver.c \
1097- thirdparty/php84/pdo_odbc/odbc_stmt.c"
1098+ ${PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_driver.c \
1099+ ${PHP_THIRDPARTY_DIR}/pdo_odbc/odbc_stmt.c"
10981100 fi
10991101
11001102 if test "$PHP_SWOOLE_SQLITE" != "no"; then
11011103 swoole_source_file="$swoole_source_file \
1102- thirdparty/php81/pdo_sqlite/sqlite_driver.c \
1103- thirdparty/php81/pdo_sqlite/sqlite_statement.c \
1104- thirdparty/php83/pdo_sqlite/sqlite_driver.c \
1105- thirdparty/php83/pdo_sqlite/sqlite_statement.c \
1106- thirdparty/php84/pdo_sqlite/sqlite_driver.c \
1107- thirdparty/php84/pdo_sqlite/sqlite_statement.c \
1108- thirdparty/php84/pdo_sqlite/sqlite_sql_parser.c"
1104+ ${PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_driver.c \
1105+ ${PHP_THIRDPARTY_DIR}/pdo_sqlite/sqlite_statement.c"
11091106 fi
11101107
11111108 SW_ASM_DIR="thirdparty/boost/asm/"
0 commit comments