config.m4

config.m4
 4 PHP_ARG_WITH(my_ext_name, for my_ext_name support,
 5 [  --with-my_ext_name             Include my_ext_name support])
 6 
 7 if test "$PHP_MY_EXT_NAME" != "no"; then
 8 
 9   SEARCH_PATH="/usr/local /usr"     # you might want to change this
10   SEARCH_FOR="/include/my_ext_name.h"  # you most likely want to change this
11   if test -r $PHP_MY_EXT_NAME/$SEARCH_FOR; then # path given as parameter
12     MY_EXT_NAME_DIR=$PHP_MY_EXT_NAME
13   else # search default path list
14     AC_MSG_CHECKING([for my_ext_name files in default path])
15     for i in $SEARCH_PATH ; do
16       if test -r $i/$SEARCH_FOR; then
17         MY_EXT_NAME_DIR=$i
18         AC_MSG_RESULT(found in $i)
19       fi
20     done
21   fi
22 
23   if test -z "$MY_EXT_NAME_DIR"; then
24     AC_MSG_RESULT([not found])
25     AC_MSG_ERROR([Please reinstall the my_ext_name distribution])
26   fi