php-src/ext/dbplus/config.m4

48 lines
1.4 KiB
Plaintext
Raw Normal View History

2001-11-30 19:00:13 +00:00
dnl
2001-07-06 00:04:03 +00:00
dnl $Id$
2001-11-30 19:00:13 +00:00
dnl
2001-07-06 00:04:03 +00:00
PHP_ARG_WITH(dbplus, for dbplus support,
2001-09-21 13:13:10 +00:00
[ --with-dbplus Include dbplus support])
2001-07-06 00:04:03 +00:00
if test "$PHP_DBPLUS" != "no"; then
# --with-dbplus -> check with-path
SEARCH_PATH="/usr/dbplus /usr/local/dbplus /opt/dbplus"
2001-07-06 00:04:03 +00:00
SEARCH_FOR="/include/dbconfig.h"
if test -r $PHP_DBPLUS/; then # path given as parameter
DBPLUS_DIR=$PHP_DBPLUS
else # search default path list
AC_MSG_CHECKING(for dbplus files in default path)
for i in $SEARCH_PATH ; do
if test -r $i/$SEARCH_FOR; then
DBPLUS_DIR=$i
AC_MSG_RESULT(found in $i)
fi
done
fi
if test -z "$DBPLUS_DIR"; then
AC_MSG_RESULT(not found)
AC_MSG_ERROR(Please reinstall the dbplus distribution)
fi
# --with-dbplus -> add include path
PHP_ADD_INCLUDE($DBPLUS_DIR/include)
2001-07-06 00:04:03 +00:00
# --with-dbplus -> chech for lib and symbol presence
2001-08-26 14:15:39 +00:00
LIBNAME=Ddb
2001-07-06 00:04:03 +00:00
LIBSYMBOL=Db_Init
old_LIBS=$LIBS
2001-08-26 14:15:39 +00:00
LIBS="-L$DBPLUS_DIR/lib -lm -ldl -lDmacc -lDracc"
2001-07-06 00:04:03 +00:00
AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_DBPLUSLIB,1,[ ])],
2001-08-26 14:15:39 +00:00
[AC_MSG_ERROR(wrong dbplus lib version or lib not found)])
2001-07-06 00:04:03 +00:00
LIBS=$old_LIBS
PHP_SUBST(DBPLUS_SHARED_LIBADD)
2001-07-06 11:51:11 +00:00
PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(Dmacc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(Dracc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
2001-07-06 00:04:03 +00:00
PHP_NEW_EXTENSION(dbplus, dbplus.c php_dbplus.c , $ext_shared)
2001-07-06 00:04:03 +00:00
fi