X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=config.m4;fp=config.m4;h=682c1a78151a541a0f65b923666521abf32dbc34;hb=e09249514b95b7883fd162554a934ffdcbe98486;hp=0000000000000000000000000000000000000000;hpb=76dc8c3d1c73ea3ddeb8ff51d57a9ec0a5c78f79;p=m6w6%2Fext-courierauth diff --git a/config.m4 b/config.m4 new file mode 100644 index 0000000..682c1a7 --- /dev/null +++ b/config.m4 @@ -0,0 +1,38 @@ +dnl $Id$ +dnl config.m4 for extension courierauth + +PHP_ARG_WITH(courierauth, for courierauth support, + [ --with-courierauth-config + Path to courierauthconfig script]) +PHP_ARG_WITH(courierauth-security-risk, whether to enable passwd security risk, + [ --with-courierauth-security-risk + Enable passwd security risk], no, no) + +if test "$PHP_COURIERAUTH" != "no"; then + AC_MSG_CHECKING(for courierauthconfig) + COURIERAUTHCONFIG= + for i in "$PHP_COURIERAUTH_CONFIG" /usr/local/bin/courierauthconfig /usr/bin/courierauthconfig "`which courierauthconfig`"; do + if test -x "$i"; then + COURIERAUTHCONFIG="$i" + break + fi + done + if test -z "$COURIERAUTHCONFIG"; then + AC_MSG_ERROR(not found) + else + AC_MSG_RESULT($COURIERAUTHCONFIG) + fi + + PHP_EVAL_LIBLINE("`$COURIERAUTHCONFIG --ldflags` -lcourierauth", COURIERAUTH_SHARED_LIBADD) + PHP_EVAL_INCLINE(`$COURIERAUTHCONFIG --cppflags`) + + if test "$PHP_COURIERAUTH_SECURITY_RISK" = "yes"; then + AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 1, [passwd security risk]) + else + AC_DEFINE(PHP_COURIERAUTH_SECURITY_RISK, 0, [passwd security risk]) + fi + + PHP_SUBST(COURIERAUTH_SHARED_LIBADD) + + PHP_NEW_EXTENSION(courierauth, courierauth.c, $ext_shared) +fi