2 dnl config.m4 for extension symfony_debug
4 dnl Comments in this file start with the string 'dnl'.
5 dnl Remove where necessary. This file will not work
8 dnl If your extension references something external, use with:
10 dnl PHP_ARG_WITH(symfony_debug, for symfony_debug support,
11 dnl Make sure that the comment is aligned:
12 dnl [ --with-symfony_debug Include symfony_debug support])
14 dnl Otherwise use enable:
16 PHP_ARG_ENABLE(symfony_debug, whether to enable symfony_debug support,
17 dnl Make sure that the comment is aligned:
18 [ --enable-symfony_debug Enable symfony_debug support])
20 if test "$PHP_SYMFONY_DEBUG" != "no"; then
21 dnl Write more examples of tests here...
23 dnl # --with-symfony_debug -> check with-path
24 dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
25 dnl SEARCH_FOR="/include/symfony_debug.h" # you most likely want to change this
26 dnl if test -r $PHP_SYMFONY_DEBUG/$SEARCH_FOR; then # path given as parameter
27 dnl SYMFONY_DEBUG_DIR=$PHP_SYMFONY_DEBUG
28 dnl else # search default path list
29 dnl AC_MSG_CHECKING([for symfony_debug files in default path])
30 dnl for i in $SEARCH_PATH ; do
31 dnl if test -r $i/$SEARCH_FOR; then
32 dnl SYMFONY_DEBUG_DIR=$i
33 dnl AC_MSG_RESULT(found in $i)
38 dnl if test -z "$SYMFONY_DEBUG_DIR"; then
39 dnl AC_MSG_RESULT([not found])
40 dnl AC_MSG_ERROR([Please reinstall the symfony_debug distribution])
43 dnl # --with-symfony_debug -> add include path
44 dnl PHP_ADD_INCLUDE($SYMFONY_DEBUG_DIR/include)
46 dnl # --with-symfony_debug -> check for lib and symbol presence
47 dnl LIBNAME=symfony_debug # you may want to change this
48 dnl LIBSYMBOL=symfony_debug # you most likely want to change this
50 dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
52 dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $SYMFONY_DEBUG_DIR/lib, SYMFONY_DEBUG_SHARED_LIBADD)
53 dnl AC_DEFINE(HAVE_SYMFONY_DEBUGLIB,1,[ ])
55 dnl AC_MSG_ERROR([wrong symfony_debug lib version or lib not found])
57 dnl -L$SYMFONY_DEBUG_DIR/lib -lm
60 dnl PHP_SUBST(SYMFONY_DEBUG_SHARED_LIBADD)
62 PHP_NEW_EXTENSION(symfony_debug, symfony_debug.c, $ext_shared)