AC_INIT(credmonger,0.1) AM_INIT_AUTOMAKE(foreign) AM_MAINTAINER_MODE AC_PROG_CC AC_MSG_CHECKING([for Kerberos 5 CFLAGS]) KRB5_CFLAGS=`krb5-config --cflags` AC_MSG_RESULT($KRB5_CFLAGS) AC_MSG_CHECKING([for Kerberos 5 LIBS]) KRB5_LIBS=`krb5-config --libs` AC_MSG_RESULT($KRB5_LIBS) AC_SUBST(KRB5_CFLAGS) AC_SUBST(KRB5_LIBS) cflags_save="$CFLAGS" ldflags_save="$LDFLAGS" CFLAGS="$KRB5_CFLAGS" LDFLAGS="$KRB5_LIBS" AC_CHECK_FUNCS(krb5_get_init_creds_opt_set_canonicalize krb5_get_init_creds_opt_alloc krb5_get_init_creds_opt_free krb5_free_unparsed_name) if test x$ac_cv_func_krb5_get_init_creds_opt_free = xyes ; then AC_MSG_CHECKING([if krb5_get_init_creds_opt_free() takes a context]) AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include ],[ krb5_get_init_creds_opt_free(NULL, NULL);]), [AC_DEFINE(KRB5_GET_INIT_CREDS_OPT_ALLOC_FREE_TAKES_2_ARGS,1, [Define if krb5_get_init_creds_opt_free() takes two arguments.]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) fi if test x$ac_cv_func_krb5_get_init_creds_opt_set_canonicalize = xyes ; then AC_MSG_CHECKING([if krb5_get_init_creds_opt_set_canonicalize() takes a context]) AC_COMPILE_IFELSE(AC_LANG_PROGRAM([#include ],[ krb5_get_init_creds_opt_set_canonicalize(NULL, NULL, 0);]), [AC_DEFINE(KRB5_GET_INIT_CREDS_OPT_SET_CANONICALIZE_TAKES_3_ARGS,1, [Define if krb5_get_init_creds_opt_set_canonicalize() takes three arguments.]) AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) fi CFLAGS="$cflags_save" LDFLAGS="$ldflags_save" AC_CONFIG_HEADER(src/config.h) mysysconfdir=`eval echo "$sysconfdir" | sed s,^NONE,"$prefix",` mysysconfdir=`eval echo "$mysysconfdir" | sed s,^NONE,"$ac_default_prefix",` myconfigdir="$mysysconfdir"/${PACKAGE_NAME}.d AC_DEFINE_UNQUOTED(CONFIG_DIR,"$myconfigdir",[Define to the location of the daemon's configuration files.]) AC_SUBST(myconfigdir) AC_OUTPUT(autoversion Makefile src/Makefile src/credmonger.8)