From 0064c4221536ec6135280dd4aa6d71ae85773a00 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sat, 17 Aug 2024 15:10:10 +0200 Subject: [PATCH] Autotools: Simplify PHP_PDO_DBLIB conditions The PHP_PDO_DBLIB value no is already checked in the main if sentence. --- ext/pdo_dblib/config.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/pdo_dblib/config.m4 b/ext/pdo_dblib/config.m4 index 0adf020c295..1b68a9913b3 100644 --- a/ext/pdo_dblib/config.m4 +++ b/ext/pdo_dblib/config.m4 @@ -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