2 dnl config.m4 for extension courierauth
4 PHP_ARG_WITH(courierauth, for courierauth support,
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)
11 if test "$PHP_COURIERAUTH" != "no"; then
12 AC_MSG_CHECKING(for courierauthconfig)
14 for i in "$PHP_COURIERAUTH_CONFIG" /usr/local/bin/courierauthconfig /usr/bin/courierauthconfig "`which courierauthconfig`"; do
16 COURIERAUTHCONFIG="$i"
20 if test -z "$COURIERAUTHCONFIG"; then
21 AC_MSG_ERROR(not found)
23 AC_MSG_RESULT($COURIERAUTHCONFIG)
26 AC_MSG_CHECKING(for courierauth ldflags)
27 COURIERAUTH_LIBS="`$COURIERAUTHCONFIG --ldflags`"
28 AC_MSG_RESULT("$COURIERAUTH_LIBS -lcourierauth")
29 if test -z "$COURIERAUTH_LIBS"; then
30 PHP_ADD_LIBRARY(courierauth, COURIERAUTH_SHARED_LIBADD)
32 PHP_EVAL_LIBLINE("$COURIERAUTH_LIBS -lcourierauth", COURIERAUTH_SHARED_LIBADD)
35 AC_MSG_CHECKING(for courierauth includes)
36 COURIERAUTH_INCS="`$COURIERAUTHCONFIG --cppflags`"
37 if test -z "$COURIERAUTH_INCS"; then
38 for i in /usr/local/include /usr/include; do
39 if test -f $i/courierauth.h; then
40 COURIERAUTH_INCS="-I$i"
46 PHP_EVAL_INCLINE("$COURIERAUTH_INCS")
48 AC_MSG_RESULT("$COURIERAUTH_INCS")
50 if test "$PHP_COURIERAUTH_SECURITY_RISK" = "yes"; then
51 AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 1, [passwd security risk])
53 AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 0, [passwd security risk])
56 PHP_SUBST(COURIERAUTH_SHARED_LIBADD)
58 PHP_NEW_EXTENSION(courierauth, courierauth.c, $ext_shared)