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