2 AC_INIT([mod_auth_gssapi], [0.0.1], [simo@redhat.com])
3 AC_CONFIG_SRCDIR([src/mod_auth_gssapi.c])
5 AC_CONFIG_MACRO_DIR([m4])
6 AC_CONFIG_HEADERS([config.h])
15 AM_CONDITIONAL([HAVE_GCC], [test "$ac_cv_prog_gcc" = yes])
17 AC_CHECK_HEADERS([stdint.h])
19 # Checks for typedefs, structures, and compiler characteristics.
20 AC_CHECK_HEADER_STDBOOL
24 # Checks for library functions.
25 AC_CHECK_FUNCS([strcasecmp])
28 [AC_HELP_STRING([--with-apxs=PATH/NAME], [path to the apxs binary [[apxs]]])],
29 [AC_SUBST(APXS, $with_apxs)],
30 [AC_PATH_PROGS(APXS, [apxs2 apxs])])
31 AS_IF([test "x${APXS}" != "x" -a -x "${APXS}"],
32 [AC_MSG_NOTICE([apxs found at $APXS])
33 APXS_CPPFLAGS=`${APXS} -q CFLAGS`
34 AC_SUBST(APXS_CPPFLAGS)
35 APXS_LDFLAGS=`${APXS} -q LDFLAGS_SHLIB`
36 AC_SUBST(APXS_LDFLAGS)
37 APXS_LIBS=`${APXS} -q LIBS_SHLIB`
39 APXS_INCLUDES=-I`${APXS} -q INCLUDEDIR`
40 AC_SUBST(APXS_INCLUDES)
41 APXS_CPPFLAGS_SHLIB=`${APXS} -q CFLAGS_SHLIB`
42 AC_SUBST(APXS_CPPFLAGS_SHLIB)
43 APXS_LD_SHLIB=`${APXS} -q LD_SHLIB`
44 AC_SUBST(APXS_LD_SHLIB)
45 APXS_LIBEXECDIR=`${APXS} -q LIBEXECDIR`
46 AC_SUBST(APXS_LIBEXECDIR)
47 APXS_SYSCONFDIR=`${APXS} -q SYSCONFDIR`
48 AC_SUBST(APXS_SYSCONFDIR)
49 APXS_PREFIX=`${APXS} -q PREFIX`
50 AC_SUBST(APXS_PREFIX)],
51 [AC_MSG_FAILURE(["apxs not found. Use --with-apxs"])])
54 [AC_HELP_STRING([--with-apr=PATH/NAME], [path to the apr binary [[apr]]])],
55 [AC_SUBST(APR, $with_apr)],
56 [AC_PATH_PROGS(APR, [apr-1-config])])
57 AS_IF([test "x${APR}" != "x" -a -x "${APR}"],
58 [AC_MSG_NOTICE([apr found at $APR])
59 APR_CPPFLAGS=`${APR} --cppflags`
60 AC_SUBST(APR_CPPFLAGS)
61 APR_INCLUDES=`${APR} --includes`
62 AC_SUBST(APR_INCLUDES)
63 APR_LDFLAGS=`${APR} --link-libtool --libs`
64 AC_SUBST(APR_LDFLAGS)],
65 [AC_MSG_FAILURE(["apr-1-config not found. Use --with-apr"])])
67 AC_CHECK_HEADERS([gssapi/gssapi.h],,[AC_MSG_ERROR([Could not find GSSAPI headers])])
68 AC_PATH_PROG(KRB5_CONFIG, krb5-config, failed)
69 if test x$KRB5_CONFIG = xfailed; then
70 AC_MSG_ERROR([Could not find GSSAPI development libraries])
72 GSSAPI_CFLAGS="`$KRB5_CONFIG --cflags gssapi`"
73 GSSAPI_LIBS="`$KRB5_CONFIG --libs gssapi`"
75 AC_CHECK_LIB([gssapi_krb5], [gss_accept_sec_context], [],
76 [AC_MSG_ERROR([GSSAPI library check failed])])
77 AC_CHECK_FUNCS(gss_acquire_cred_from)
78 AC_CHECK_FUNCS(gss_store_cred_into)
80 AC_SUBST([GSSAPI_CFLAGS])
81 AC_SUBST([GSSAPI_LIBS])
83 AC_CONFIG_FILES([Makefile src/Makefile])