diff options
author | Wez Furlong <wez@php.net> | 2005-11-01 13:12:52 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-11-01 13:12:52 +0000 |
commit | 6f63c45639848a1a2fed11adbc8d2dc0602138d2 (patch) | |
tree | c52394e2bb751a69a975e82fbd00873c3130b4f5 /ext/pdo_dblib | |
parent | e98a40f1fa055abefe1b9075cf35775605bbcd5c (diff) | |
download | php-git-6f63c45639848a1a2fed11adbc8d2dc0602138d2.tar.gz |
Fix #35032; pdo_dblib doesn't find includes on some systems
Diffstat (limited to 'ext/pdo_dblib')
-rw-r--r-- | ext/pdo_dblib/config.m4 | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/pdo_dblib/config.m4 b/ext/pdo_dblib/config.m4 index ff4e03be4b..407edc5f2e 100644 --- a/ext/pdo_dblib/config.m4 +++ b/ext/pdo_dblib/config.m4 @@ -10,13 +10,17 @@ PHP_ARG_WITH(pdo-dblib, for PDO_DBLIB support via FreeTDS, if test "$PHP_PDO_DBLIB" != "no"; then - PDO_FREETDS_INSTALLATION_DIR="" if test "$PHP_PDO_DBLIB" = "yes"; then for i in /usr/local /usr; do if test -f $i/include/tds.h; then PDO_FREETDS_INSTALLATION_DIR=$i + PDO_FREETDS_INCLUDE_DIR=$i/include break + elif test -f $i/include/freetds/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$i + PDO_FREETDS_INCLUDE_DIR=$i/include/freetds + break; fi done @@ -28,6 +32,10 @@ if test "$PHP_PDO_DBLIB" != "no"; then if test -f $PHP_PDO_DBLIB/include/tds.h; then PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB + PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include + elif test -f $PHP_PDO_DBLIB/include/freetds/tds.h; then + PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB + PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds else AC_MSG_ERROR(Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory) fi @@ -41,11 +49,9 @@ if test "$PHP_PDO_DBLIB" != "no"; then AC_MSG_ERROR(Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so]) fi - PDO_DBLIB_INCDIR=$PDO_FREETDS_INSTALLATION_DIR/include - PDO_DBLIB_LIBDIR=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR + PHP_ADD_INCLUDE($PDO_FREETDS_INCLUDE_DIR) + PHP_ADD_LIBRARY_WITH_PATH(sybdb, $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR, PDO_DBLIB_SHARED_LIBADD) - PHP_ADD_INCLUDE($PDO_DBLIB_INCDIR) - PHP_ADD_LIBRARY_WITH_PATH(sybdb, $PDO_DBLIB_LIBDIR, PDO_DBLIB_SHARED_LIBADD) ifdef([PHP_CHECK_PDO_INCLUDES], [ PHP_CHECK_PDO_INCLUDES |