Chris@0: dnl $Id$ Chris@0: dnl config.m4 for extension symfony_debug Chris@0: Chris@0: dnl Comments in this file start with the string 'dnl'. Chris@0: dnl Remove where necessary. This file will not work Chris@0: dnl without editing. Chris@0: Chris@0: dnl If your extension references something external, use with: Chris@0: Chris@0: dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support, Chris@0: dnl Make sure that the comment is aligned: Chris@0: dnl [ --with-symfony_debug Include symfony_debug support]) Chris@0: Chris@0: dnl Otherwise use enable: Chris@0: Chris@0: PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support, Chris@0: dnl Make sure that the comment is aligned: Chris@0: [ --enable-symfony_debug Enable symfony_debug support]) Chris@0: Chris@0: if test "$PHP_SYMFONY_DEBUG" != "no"; then Chris@0: dnl Write more examples of tests here... Chris@0: Chris@0: dnl # --with-symfony_debug -> check with-path Chris@0: dnl SEARCH_PATH="/usr/local /usr" # you might want to change this Chris@0: dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this Chris@0: dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter Chris@0: dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG Chris@0: dnl else # search default path list Chris@0: dnl AC_MSG_CHECKING([for symfony_debug files in default path]) Chris@0: dnl for i in $SEARCH_PATH ; do Chris@0: dnl if test -r $i/$SEARCH_FOR; then Chris@0: dnl SYMFONY_DEBUG_DIR=$i Chris@0: dnl AC_MSG_RESULT(found in $i) Chris@0: dnl fi Chris@0: dnl done Chris@0: dnl fi Chris@0: dnl Chris@0: dnl if test -z "$SYMFONY_DEBUG_DIR"; then Chris@0: dnl AC_MSG_RESULT([not found]) Chris@0: dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution]) Chris@0: dnl fi Chris@0: Chris@0: dnl # --with-symfony_debug -> add include path Chris@0: dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include) Chris@0: Chris@0: dnl # --with-symfony_debug -> check for lib and symbol presence Chris@0: dnl LIBNAME=symfony_debug # you may want to change this Chris@0: dnl LIBSYMBOL=symfony_debug # you most likely want to change this Chris@0: Chris@0: dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, Chris@0: dnl [ Chris@0: dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD) Chris@0: dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ]) Chris@0: dnl ],[ Chris@0: dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found]) Chris@0: dnl ],[ Chris@0: dnl -L$SYMFONY_DEBUG_DIR/lib -lm Chris@0: dnl ]) Chris@0: dnl Chris@0: dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD) Chris@0: Chris@0: PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared) Chris@0: fi