]> git.ipfire.org Git - thirdparty/cups.git/blame - scripting/php/config.m4
Load cups into easysw/current.
[thirdparty/cups.git] / scripting / php / config.m4
CommitLineData
ef416fc2 1dnl $Id: config.m4 3867 2003-08-14 22:29:23Z ted $
2dnl config.m4 for extension phpcups
3
4dnl Comments in this file start with the string 'dnl'.
5dnl Remove where necessary. This file will not work
6dnl without editing.
7
8dnl If your extension references something external, use with:
9
10PHP_ARG_WITH(phpcups, for phpcups support,
11dnl Make sure that the comment is aligned:
12[ --with-phpcups Include phpcups support])
13
14dnl Otherwise use enable:
15
16dnl PHP_ARG_ENABLE(phpcups, whether to enable phpcups support,
17dnl Make sure that the comment is aligned:
18dnl [ --enable-phpcups Enable phpcups support])
19
20if test "$PHP_PHPCUPS" != "no"; then
21 dnl Write more examples of tests here...
22
23 dnl # --with-phpcups -> check with-path
24 dnl SEARCH_PATH="/usr/local /usr" # you might want to change this
25 dnl SEARCH_FOR="/include/phpcups.h" # you most likely want to change this
26 dnl if test -r $PHP_PHPCUPS/; then # path given as parameter
27 dnl PHPCUPS_DIR=$PHP_PHPCUPS
28 dnl else # search default path list
29 dnl AC_MSG_CHECKING(for phpcups files in default path)
30 dnl for i in $SEARCH_PATH ; do
31 dnl if test -r $i/$SEARCH_FOR; then
32 dnl PHPCUPS_DIR=$i
33 dnl AC_MSG_RESULT(found in $i)
34 dnl fi
35 dnl done
36 dnl fi
37 dnl
38 dnl if test -z "$PHPCUPS_DIR"; then
39 dnl AC_MSG_RESULT(not found)
40 dnl AC_MSG_ERROR(Please reinstall the phpcups distribution)
41 dnl fi
42
43 dnl # --with-phpcups -> add include path
44 PHP_ADD_INCLUDE(/var/httpd2/web2/cups)
45 PHP_ADD_INCLUDE(/var/httpd2/web2/cups/cups)
46
47 dnl # --with-phpcups -> chech for lib and symbol presence
48 dnl LIBNAME=phpcups # you may want to change this
49 dnl LIBSYMBOL=phpcups # you most likely want to change this
50 dnl old_LIBS=$LIBS
51 dnl LIBS="$LIBS -L$PHPCUPS_DIR/lib -lm -ldl"
52 dnl AC_CHECK_LIB($LIBNAME, $LIBSYMBOL, [AC_DEFINE(HAVE_PHPCUPSLIB,1,[ ])],
53 dnl [AC_MSG_ERROR(wrong phpcups lib version or lib not found)])
54 dnl LIBS=$old_LIBS
55 dnl
56 dnl PHP_SUBST(PHPCUPS_SHARED_LIBADD)
57 PHP_ADD_LIBRARY_WITH_PATH("cups", "/var/httpd2/web2/cups/cups", PHPCUPS_SHARED_LIBADD)
58
59 PHP_EXTENSION(phpcups, $ext_shared)
60fi