@@ -21,7 +21,13 @@ if test "$PHP_PDO_MYSQL" != "no"; then
21
21
AC_MSG_ERROR ( [ PDO is not enabled! Add --enable-pdo to your configure line.] )
22
22
fi
23
23
24
- if test "$PHP_PDO_MYSQL" != "yes" && test "$PHP_PDO_MYSQL" != "mysqlnd"; then
24
+ dnl Whether to build with the mysqlnd extension or with the MySQL library.
25
+ AS_CASE ( [ $PHP_PDO_MYSQL] , [ yes|mysqlnd] , [
26
+ PHP_MYSQLND_ENABLED=yes
27
+ AC_DEFINE ( [ PDO_USE_MYSQLND] , [ 1] ,
28
+ [ Define to 1 if the pdo_mysql extension uses mysqlnd.] )
29
+ ] , [
30
+ AC_MSG_CHECKING ( [ for mysql_config] )
25
31
if test -f $PHP_PDO_MYSQL && test -x $PHP_PDO_MYSQL ; then
26
32
PDO_MYSQL_CONFIG=$PHP_PDO_MYSQL
27
33
else
@@ -33,19 +39,15 @@ if test "$PHP_PDO_MYSQL" != "no"; then
33
39
fi
34
40
fi
35
41
fi
36
- fi
37
42
38
- dnl Whether to build with the mysqlnd extension or with the MySQL library.
39
- AS_CASE ( [ $PHP_PDO_MYSQL] , [ yes|mysqlnd] , [
40
- PHP_MYSQLND_ENABLED=yes
41
- AC_DEFINE ( [ PDO_USE_MYSQLND] , [ 1] ,
42
- [ Define to 1 if the pdo_mysql extension uses mysqlnd.] )
43
- ] , [
44
- AC_MSG_CHECKING ( [ for mysql_config] )
45
43
if test -n "$PDO_MYSQL_CONFIG"; then
46
44
AC_MSG_RESULT ( [ $PDO_MYSQL_CONFIG] )
47
- PDO_MYSQL_LIBS=`$PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g"`
48
- PDO_MYSQL_INCLUDE=`$PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g"`
45
+ PDO_MYSQL_LIBS=$($PDO_MYSQL_CONFIG --libs | $SED -e "s/'//g")
46
+ PDO_MYSQL_INCLUDE=$($PDO_MYSQL_CONFIG --cflags | $SED -e "s/'//g")
47
+ PDO_MYSQL_SOCKET=$($PDO_MYSQL_CONFIG --socket)
48
+ AC_DEFINE_UNQUOTED ( [ PDO_MYSQL_UNIX_ADDR] , [ "$PDO_MYSQL_SOCKET"] ,
49
+ [ The MySQL Unix socket location as defined by 'mysql_config' for use
50
+ with the pdo_mysql extension.] )
49
51
elif test -n "$PDO_MYSQL_DIR"; then
50
52
AC_MSG_RESULT ( [ not found] )
51
53
AC_MSG_CHECKING ( [ for mysql install under $PDO_MYSQL_DIR] )
@@ -80,13 +82,6 @@ if test "$PHP_PDO_MYSQL" != "no"; then
80
82
81
83
PHP_CHECK_PDO_INCLUDES
82
84
83
- if test -n "$PDO_MYSQL_CONFIG"; then
84
- PDO_MYSQL_SOCKET=`$PDO_MYSQL_CONFIG --socket`
85
- AC_DEFINE_UNQUOTED ( [ PDO_MYSQL_UNIX_ADDR] , [ "$PDO_MYSQL_SOCKET"] ,
86
- [ The MySQL Unix socket location as defined by 'mysql_config' for use with
87
- the pdo_mysql extension.] )
88
- fi
89
-
90
85
PHP_NEW_EXTENSION([ pdo_mysql] ,
91
86
[ pdo_mysql.c mysql_driver.c mysql_statement.c mysql_sql_parser.c] ,
92
87
[ $ext_shared] ,,
0 commit comments