krb5.m4 revision 5843ad321944a028f6dee7e1fd4f9381c4953d07
e8eb2b9d68adc3024eb1aa9899b902ed5a3fb460Christian MaederAC_SUBST(KRB5_CFLAGS)
e8eb2b9d68adc3024eb1aa9899b902ed5a3fb460Christian MaederAC_SUBST(KRB5_LIBS)
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskiif test x$KRB5_LIBS != x; then
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder KRB5_PASSED_LIBS=$KRB5_LIBS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskifi
97018cf5fa25b494adffd7e9b4e87320dae6bf47Christian Maeder
2eeec5240b424984e3ee26296da1eeab6c6d739eChristian Maederif test x$KRB5_CFLAGS != x; then
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskifi
f3a94a197960e548ecd6520bb768cb0d547457bbChristian Maeder
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederAC_PATH_PROG(KRB5_CONFIG, krb5-config)
0095c7efbddd0ffeed6aaf8ec015346be161d819Till MossakowskiAC_MSG_CHECKING(for working krb5-config)
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maederif test -x "$KRB5_CONFIG"; then
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski KRB5_LIBS="`$KRB5_CONFIG --libs`"
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder AC_MSG_RESULT(yes)
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederelse
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder if test x$KRB5_PASSED_LIBS = x; then
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski AC_MSG_ERROR(no. Please install MIT kerberos devel package)
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder fi
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederfi
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskiif test x$KRB5_PASSED_LIBS != x; then
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski KRB5_LIBS=$KRB5_PASSED_LIBS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskifi
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskiif test x$KRB5_PASSED_CFLAGS != x; then
ad270004874ce1d0697fb30d7309f180553bb315Christian Maeder KRB5_CFLAGS=$KRB5_PASSED_CFLAGS
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederfi
cf31aaf25d0fe96b0578755e7ee18b732e337343Christian Maeder
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederAC_ARG_VAR([KRB5_CFLAGS], [C compiler flags for kerberos, overriding krb5-config])dnl
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederAC_ARG_VAR([KRB5_LIBS], [linker flags for kerberos, overriding krb5-config])dnl
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiSAVE_CFLAGS=$CFLAGS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiSAVE_LIBS=$LIBS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiCFLAGS="$CFLAGS $KRB5_CFLAGS"
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiLIBS="$LIBS $KRB5_LIBS"
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederAC_CHECK_HEADERS([krb5.h krb5/krb5.h])
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder krb5_free_unparsed_name \
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder krb5_get_init_creds_opt_set_expire_callback \
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski krb5_get_init_creds_opt_set_fast_ccache_name \
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski krb5_get_init_creds_opt_set_fast_flags])
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederCFLAGS=$SAVE_CFLAGS
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiLIBS=$SAVE_LIBS
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowskiif test x$ac_cv_header_krb5_h != xyes -a x$ac_cv_header_krb5_krb5_h != xyes
df476f3bf7038997303a1760a9c1ce09be40a05eChristian Maederthen
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder AC_MSG_ERROR(you must have Kerberos 5 header files to build sssd)
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maederfi
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAC_ARG_ENABLE([krb5-locator-plugin],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [AS_HELP_STRING([--disable-krb5-locator-plugin],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [do not build Kerberos locator plugin])],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [build_locator=$enableval],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [build_locator=yes])
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till MossakowskiAC_CHECK_HEADER([krb5/locate_plugin.h],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [have_locate_plugin=yes],
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [have_locate_plugin=no]
df11e5eab86d8247f58e301d8f0a2c6ecf4c9541Till Mossakowski [AC_MSG_NOTICE([Kerberos locator plugin cannot be build])])
09b431a868c79a92ae7c9bd141565f43f9034144Christian MaederAM_CONDITIONAL([BUILD_KRB5_LOCATOR_PLUGIN],
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder [test x$have_locate_plugin = xyes -a x$build_locator = xyes])
09b431a868c79a92ae7c9bd141565f43f9034144Christian Maeder
adea2e45fa61f1097aadc490a0aeaf4831b729ccChristian Maeder