[ --with-mssql[=DIR] Include MSSQL-DB support. DIR is the FreeTDS home
directory, defaults to /usr/local/freetds])
-
if test "$PHP_MSSQL" != "no"; then
- FREETDS_INSTALLATION_DIR=""
if test "$PHP_MSSQL" = "yes"; then
-
for i in /usr/local /usr; do
if test -f $i/include/tds.h; then
FREETDS_INSTALLATION_DIR=$i
+ FREETDS_INCLUDE_DIR=$/include
+ break
+ elif test -f $i/include/freetds/tds.h; then
+ FREETDS_INSTALLATION_DIR=$i
+ FREETDS_INCLUDE_DIR=$/include/freetds
break
fi
done
if test -f $PHP_MSSQL/include/tds.h; then
FREETDS_INSTALLATION_DIR=$PHP_MSSQL
+ FREETDS_INCLUDE_DIR=$/include
+ elif test -f $i/include/freetds/tds.h; then
+ FREETDS_INSTALLATION_DIR=$i
+ FREETDS_INCLUDE_DIR=$/include/freetds
else
AC_MSG_ERROR(Directory $PHP_MSSQL is not a FreeTDS installation directory)
fi
AC_MSG_ERROR(Could not find $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR/libtds.[a|so])
fi
- MSSQL_INCDIR=$FREETDS_INSTALLATION_DIR/include
- MSSQL_LIBDIR=$FREETDS_INSTALLATION_DIR/$PHP_LIBDIR
+ PHP_ADD_INCLUDE($FREETDS_INCLUDE_DIR)
+ PHP_ADD_LIBRARY_WITH_PATH(sybdb, $FREETDS_INSTALLATION_DIR/$PHP_LIBDIR, MSSQL_SHARED_LIBADD)
- PHP_ADD_INCLUDE($MSSQL_INCDIR)
- PHP_ADD_LIBRARY_WITH_PATH(sybdb, $MSSQL_LIBDIR, MSSQL_SHARED_LIBADD)
PHP_NEW_EXTENSION(mssql, php_mssql.c, $ext_shared)
AC_CHECK_LIB(dnet_stub, dnet_addr,
[ PHP_ADD_LIBRARY_WITH_PATH(dnet_stub,,MSSQL_SHARED_LIBADD)