- Fixed bug #44991 (Compile Failure With freetds0.82) (patch by matthias at dsx dot at)

- MFB: Fix #35032; pdo_dblib doesn't find includes on some systems
This commit is contained in:
Felipe Pena 2008-10-04 12:51:51 +00:00
parent e9119255c4
commit 96efa3cc80

View file

@ -11,13 +11,17 @@ if test "$PHP_PDO_DBLIB" != "no"; then
AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.]) AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
fi fi
PDO_FREETDS_INSTALLATION_DIR=""
if test "$PHP_PDO_DBLIB" = "yes"; then if test "$PHP_PDO_DBLIB" = "yes"; then
for i in /usr/local /usr; do for i in /usr/local /usr; do
if test -f $i/include/tds.h; then if test -f $i/include/sybdb.h; then
PDO_FREETDS_INSTALLATION_DIR=$i PDO_FREETDS_INSTALLATION_DIR=$i
PDO_FREETDS_INCLUDE_DIR=$i/include
break break
elif test -f $i/include/freetds/sybdb.h; then
PDO_FREETDS_INSTALLATION_DIR=$i
PDO_FREETDS_INCLUDE_DIR=$i/include/freetds
break;
fi fi
done done
@ -27,8 +31,12 @@ if test "$PHP_PDO_DBLIB" != "no"; then
elif test "$PHP_PDO_DBLIB" != "no"; then elif test "$PHP_PDO_DBLIB" != "no"; then
if test -f $PHP_PDO_DBLIB/include/tds.h; then if test -f $PHP_PDO_DBLIB/include/sybdb.h; then
PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include
elif test -f $PHP_PDO_DBLIB/include/freetds/sybdb.h; then
PDO_FREETDS_INSTALLATION_DIR=$PHP_PDO_DBLIB
PDO_FREETDS_INCLUDE_DIR=$PHP_PDO_DBLIB/include/freetds
else else
AC_MSG_ERROR(Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory) AC_MSG_ERROR(Directory $PHP_PDO_DBLIB is not a FreeTDS installation directory)
fi fi
@ -38,15 +46,13 @@ if test "$PHP_PDO_DBLIB" != "no"; then
PHP_LIBDIR=lib PHP_LIBDIR=lib
fi fi
if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.so"; then if test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.a" && test ! -r "$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.so"; then
AC_MSG_ERROR(Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so]) AC_MSG_ERROR(Could not find $PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libsybdb.[a|so])
fi fi
PDO_DBLIB_INCDIR=$PDO_FREETDS_INSTALLATION_DIR/include PHP_ADD_INCLUDE($PDO_FREETDS_INCLUDE_DIR)
PDO_DBLIB_LIBDIR=$PDO_FREETDS_INSTALLATION_DIR/$PHP_LIBDIR 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], ifdef([PHP_CHECK_PDO_INCLUDES],
[ [
PHP_CHECK_PDO_INCLUDES PHP_CHECK_PDO_INCLUDES