]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blob - vendor/pimple/pimple/ext/pimple/config.m4
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / vendor / pimple / pimple / ext / pimple / config.m4
1 dnl $Id$
2 dnl config.m4 for extension pimple
3
4 dnl Comments in this file start with the string 'dnl'.
5 dnl Remove where necessary. This file will not work
6 dnl without editing.
7
8 dnl If your extension references something external, use with:
9
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])
13
14 dnl Otherwise use enable:
15
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])
19
20 if test "$PHP_PIMPLE" != "no"; then
21   dnl Write more examples of tests here...
22
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
32   dnl       PIMPLE_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 "$PIMPLE_DIR"; then
39   dnl   AC_MSG_RESULT([not found])
40   dnl   AC_MSG_ERROR([Please reinstall the pimple distribution])
41   dnl fi
42
43   dnl # --with-pimple -> add include path
44   dnl PHP_ADD_INCLUDE($PIMPLE_DIR/include)
45
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 
49
50   dnl PHP_CHECK_LIBRARY($LIBNAME,$LIBSYMBOL,
51   dnl [
52   dnl   PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $PIMPLE_DIR/lib, PIMPLE_SHARED_LIBADD)
53   dnl   AC_DEFINE(HAVE_PIMPLELIB,1,[ ])
54   dnl ],[
55   dnl   AC_MSG_ERROR([wrong pimple lib version or lib not found])
56   dnl ],[
57   dnl   -L$PIMPLE_DIR/lib -lm
58   dnl ])
59   dnl
60   dnl PHP_SUBST(PIMPLE_SHARED_LIBADD)
61
62   PHP_NEW_EXTENSION(pimple, pimple.c, $ext_shared)
63 fi