2 dnl config.m4 for extension pimple
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(pimple, for pimple support,
11 dnl Make sure that the comment is aligned:
12 dnl [ --with-pimple Include pimple support])
14 dnl Otherwise use enable:
16 PHP_ARG_ENABLE(pimple, whether to enable pimple support,
17 dnl Make sure that the comment is aligned:
18 [ --enable-pimple Enable pimple support])
20 if test "$PHP_PIMPLE" != "no"; then
21 dnl Write more examples of tests here...
23 dnl # --with-pimple -> check with-path
24 dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
25 dnl SEARCH_FOR="/include/pimple.h" # you most likely want to change this
26 dnl if test -r $PHP_PIMPLE/$SEARCH_FOR; then # path given as parameter
27 dnl PIMPLE_DIR=$PHP_PIMPLE
28 dnl else # search default path list
29 dnl AC_MSG_CHECKING([for pimple files in default path])
30 dnl for i in $SEARCH_PATH ; do
31 dnl if test -r $i/$SEARCH_FOR; then
33 dnl AC_MSG_RESULT(found in $i)
38 dnl if test -z "$PIMPLE_DIR"; then
39 dnl AC_MSG_RESULT([not found])
40 dnl AC_MSG_ERROR([Please reinstall the pimple distribution])
43 dnl # --with-pimple -> add include path
44 dnl PHP_ADD_INCLUDE($PIMPLE_DIR/include)
46 dnl # --with-pimple -> check for lib and symbol presence
47 dnl LIBNAME=pimple # you may want to change this
48 dnl LIBSYMBOL=pimple # you most likely want to change this
50 dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
52 dnl PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PIMPLE_DIR/lib, PIMPLE_SHARED_LIBADD)
53 dnl AC_DEFINE(HAVE_PIMPLELIB,1,[ ])
55 dnl AC_MSG_ERROR([wrong pimple lib version or lib not found])
57 dnl -L$PIMPLE_DIR/lib -lm
60 dnl PHP_SUBST(PIMPLE_SHARED_LIBADD)
62 PHP_NEW_EXTENSION(pimple, pimple.c, $ext_shared)