diff options
| author | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2004-05-19 04:59:31 +0000 |
|---|---|---|
| committer | pp <pp@455248ca-bdda-0310-9134-f4ebb693071a> | 2004-05-19 04:59:31 +0000 |
| commit | d0a9b9a03fc7ae74ef8a64593ac6b592526ec4d5 (patch) | |
| tree | e03d2a7fac8c7619f1286545f717ef7ee3866cd6 /config.m4 | |
- initial import
git-svn-id: https://siedziba.pl:790/svn/repos/php-imlib/trunk@7 455248ca-bdda-0310-9134-f4ebb693071a
Diffstat (limited to 'config.m4')
| -rw-r--r-- | config.m4 | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/config.m4 b/config.m4 new file mode 100644 index 0000000..1fa4c50 --- /dev/null +++ b/config.m4 @@ -0,0 +1,50 @@ +PHP_ARG_WITH(imlib, for Imlib2 support, + [[ --with-imlib Include php-imlib extension (Imlib2 support).]]) +PHP_ARG_WITH(t1lib, for Imlib2 Type1 font support, + [[ --with-t1lib[=DIR] Include Type1 font support in php-imlib.]]) + +echo "imlib: $PHP_IMLIB" +echo "t1lib: $PHP_T1LIB" + +if test "$PHP_IMLIB" != "no"; then + + AC_MSG_CHECKING(for Imlib2 version) + + if test -x $(which imlib2-config); then + IMLIB2_VERSION=$(imlib2-config --version) + AC_MSG_RESULT($IMLIB2_VERSION) + if test "$IMLIB2_VERSION" != "1.0.6"; then + AC_MSG_WARN(This extension has been tested with Imlib2 version 1.0.6 only) + fi + PHP_EVAL_LIBLINE($(imlib2-config --libs), IMLIB_SHARED_LIBADD) + PHP_EVAL_INCLINE($(imlib2-config --cflags)) + AC_DEFINE(HAVE_IMLIB,1,[ ]) + CPPFLAGS="-DPHP_IMLIB_FILTER_PATH=\"\\\"$EXTENSION_DIR/php_imlib_filters\\\"\" $CPPFLAGS" + else + AC_MSG_ERROR(imlib2-config script not found) + fi + + if test "$PHP_T1LIB" != "no"; then + + for i in $PHP_T1LIB /usr/local /usr; do + test -f "$i/include/t1lib.h" && IMLIB_T1_DIR=$i && break + done + + if test -z "$IMLIB_T1_DIR"; then + AC_MSG_ERROR([Your t1lib distribution is not installed correctly. Please reinstall it.]) + fi + + PHP_CHECK_LIBRARY(t1, T1_LoadFont, + [ + AC_DEFINE(HAVE_LIBT1,1,[ ]) + PHP_ADD_INCLUDE($IMLIB_T1_DIR/include) + PHP_ADD_LIBRARY_WITH_PATH(t1, $IMLIB_T1_DIR/lib, IMLIB_SHARED_LIBADD) + ],[ + AC_MSG_ERROR([Problem with libt1.(a|so). Please check config.log for more information.]) + ],[ + -L$IMLIB_T1_DIR/lib + ]) + fi + PHP_SUBST(IMLIB_SHARED_LIBADD) + PHP_NEW_EXTENSION(imlib, php_imlib.c, $ext_shared) +fi |
