Autotools: Simplify PHP_PDO_DBLIB conditions

The PHP_PDO_DBLIB value no is already checked in the main if sentence.
This commit is contained in:
Peter Kokot 2024-08-17 15:10:10 +02:00
parent b2640ee7f7
commit 0064c42215
No known key found for this signature in database
GPG key ID: A94800907AA79B36

View file

@ -4,14 +4,14 @@ PHP_ARG_WITH([pdo-dblib],
[PDO: DBLIB-DB support. DIR is the FreeTDS home directory])])
if test "$PHP_PDO_DBLIB" != "no"; then
if test "$PHP_PDO_DBLIB" = "yes"; then
AS_VAR_IF([PHP_PDO_DBLIB], [yes], [
dnl FreeTDS must be on the default system include/library path.
dnl Only perform a sanity check that this is really the case.
PHP_CHECK_LIBRARY([sybdb], [dbsqlexec],
[],
[AC_MSG_FAILURE([Cannot find FreeTDS in known installation directories.])])
PHP_ADD_LIBRARY([sybdb],, [PDO_DBLIB_SHARED_LIBADD])
elif test "$PHP_PDO_DBLIB" != "no"; then
], [
if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
@ -32,7 +32,7 @@ if test "$PHP_PDO_DBLIB" != "no"; then
PHP_ADD_LIBRARY_WITH_PATH([sybdb],
[$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR],
[PDO_DBLIB_SHARED_LIBADD])
fi
])
PHP_CHECK_PDO_INCLUDES