dnl $Id: config.m4,v 1.5 2003/12/31 14:03:45 gardron Exp $ dnl config.m4 for extension imlib3 PHP_ARG_WITH(imlib2, for imlib2 support, Make sure that the comment is aligned: [ --with-imlib2[=DIR] Include imlib2 support]) if test "$PHP_IMLIB2" != "no"; then dnl Write more examples of tests here... dnl # --with-imlib2 -> check with-path dnl SEARCH_PATH="/usr /usr/local" # you might want to change this dnl SEARCH_FOR="/include/imlib2.h" # you most likely want to change this dnl if test -r $PHP_IMLIB2/; then # path given as parameter dnl IMLIB2_DIR=$PHP_IMLIB2 dnl else # search default path list dnl AC_MSG_CHECKING([for imlib2 files in default path]) dnl for i in $SEARCH_PATH ; do dnl if test -r $i/$SEARCH_FOR; then dnl IMLIB2_DIR=$i dnl AC_MSG_RESULT(found in $i) dnl fi dnl done dnl fi dnl if test -z "$IMLIB2_DIR"; then dnl AC_MSG_RESULT([not found]) dnl AC_MSG_ERROR([Please reinstall the imlib2 distribution]) dnl fi IMLIB2_DIR=/usr/local # --with-imlib2 -> add include path PHP_ADD_INCLUDE($IMLIB2_DIR/include) # --with-imlib2 -> check for lib and symbol presence LIBNAME=Imlib2 # you may want to change this LIBSYMBOL=imlib_create_image # you most likely want to change this PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL, [ PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $IMLIB2_DIR/lib, IMLIB2_SHARED_LIBADD) AC_DEFINE(HAVE_IMLIB2LIB,1,[ ]) ],[ AC_MSG_ERROR([wrong imlib2 lib version or lib not found]) ],[ -L$IMLIB2_DIR/lib -lm ]) PHP_SUBST(IMLIB2_SHARED_LIBADD) PHP_NEW_EXTENSION(imlib2, imlib2.c, $ext_shared) fi