- add courierauth
[m6w6/ext-courierauth] / config.m4
1 dnl $Id$
2 dnl config.m4 for extension courierauth
3
4 PHP_ARG_WITH(courierauth, for courierauth support,
5 [ --with-courierauth-config
6 Path to courierauthconfig script])
7 PHP_ARG_WITH(courierauth-security-risk, whether to enable passwd security risk,
8 [ --with-courierauth-security-risk
9 Enable passwd security risk], no, no)
10
11 if test "$PHP_COURIERAUTH" != "no"; then
12 AC_MSG_CHECKING(for courierauthconfig)
13 COURIERAUTHCONFIG=
14 for i in "$PHP_COURIERAUTH_CONFIG" /usr/local/bin/courierauthconfig /usr/bin/courierauthconfig "`which courierauthconfig`"; do
15 if test -x "$i"; then
16 COURIERAUTHCONFIG="$i"
17 break
18 fi
19 done
20 if test -z "$COURIERAUTHCONFIG"; then
21 AC_MSG_ERROR(not found)
22 else
23 AC_MSG_RESULT($COURIERAUTHCONFIG)
24 fi
25
26 PHP_EVAL_LIBLINE("`$COURIERAUTHCONFIG --ldflags` -lcourierauth", COURIERAUTH_SHARED_LIBADD)
27 PHP_EVAL_INCLINE(`$COURIERAUTHCONFIG --cppflags`)
28
29 if test "$PHP_COURIERAUTH_SECURITY_RISK" = "yes"; then
30 AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 1, [passwd security risk])
31 else
32 AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 0, [passwd security risk])
33 fi
34
35 PHP_SUBST(COURIERAUTH_SHARED_LIBADD)
36
37 PHP_NEW_EXTENSION(courierauth, courierauth.c, $ext_shared)
38 fi