You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.4 KiB

25 years ago
  1. dnl
  2. dnl $Id$
  3. dnl
  4. PHP_ARG_WITH(dbplus, for dbplus support,
  5. [ --with-dbplus Include dbplus support])
  6. if test "$PHP_DBPLUS" != "no"; then
  7. # --with-dbplus -> check with-path
  8. SEARCH_PATH="/usr/dbplus /usr/local/dbplus /opt/dbplus"
  9. SEARCH_FOR="/include/dbconfig.h"
  10. if test -r $PHP_DBPLUS/; then # path given as parameter
  11. DBPLUS_DIR=$PHP_DBPLUS
  12. else # search default path list
  13. AC_MSG_CHECKING(for dbplus files in default path)
  14. for i in $SEARCH_PATH ; do
  15. if test -r $i/$SEARCH_FOR; then
  16. DBPLUS_DIR=$i
  17. AC_MSG_RESULT(found in $i)
  18. fi
  19. done
  20. fi
  21. if test -z "$DBPLUS_DIR"; then
  22. AC_MSG_RESULT(not found)
  23. AC_MSG_ERROR(Please reinstall the dbplus distribution)
  24. fi
  25. # --with-dbplus -> add include path
  26. PHP_ADD_INCLUDE($DBPLUS_DIR/include)
  27. # --with-dbplus -> chech for lib and symbol presence
  28. LIBNAME=Ddb
  29. LIBSYMBOL=Db_Init
  30. old_LIBS=$LIBS
  31. LIBS="-L$DBPLUS_DIR/lib -lm -ldl -lDmacc -lDracc"
  32. AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_DBPLUSLIB,1,[ ])],
  33. [AC_MSG_ERROR(wrong dbplus lib version or lib not found)])
  34. LIBS=$old_LIBS
  35. PHP_SUBST(DBPLUS_SHARED_LIBADD)
  36. PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
  37. PHP_ADD_LIBRARY_WITH_PATH(Dmacc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
  38. PHP_ADD_LIBRARY_WITH_PATH(Dracc, $DBPLUS_DIR/lib, DBPLUS_SHARED_LIBADD)
  39. PHP_NEW_EXTENSION(dbplus, dbplus.c php_dbplus.c , $ext_shared)
  40. fi