diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-11-17 16:29:23 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-11-17 16:29:23 +0000 |
commit | 0d956b2fa9e3dc4a72cfba11b8fb05de03100b82 (patch) | |
tree | 87c9c01220f38f9d69fe71a9ca95bd484f008404 /configure.in | |
parent | ba3aa3131df992d170bff923186126845bdaa23b (diff) | |
download | fetchmail-0d956b2fa9e3dc4a72cfba11b8fb05de03100b82.tar.gz fetchmail-0d956b2fa9e3dc4a72cfba11b8fb05de03100b82.tar.bz2 fetchmail-0d956b2fa9e3dc4a72cfba11b8fb05de03100b82.zip |
Gerald Britton's support for mixed Kerberos and Hesiod.
svn path=/trunk/; revision=2183
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 107 |
1 files changed, 77 insertions, 30 deletions
diff --git a/configure.in b/configure.in index 5ec3cdbc..817046e7 100644 --- a/configure.in +++ b/configure.in @@ -231,24 +231,31 @@ AC_ARG_ENABLE(netsec, exit 1]) ]) AC_DEFINE(NET_SECURITY, 1) ]) -### use option --with-gssapi=DIR to compile in GSSAPI support -AC_ARG_WITH(gssapi, - [ --with-gssapi[=DIR] compile in GSSAPI support using libraries in DIR], -[ -if test "$with_gssapi" != "no" +### use option --with-kerberos5=DIR to point at a Kerberos 5 directory +AC_ARG_WITH(kerberos5, + [ --with-kerberos5=DIR point fetchmail compilation at a Kerberos 5 directory]) + +# The "then" arm (nonempty $with_kerberos5) is kind of a crock. It works for +# configuring the BSD/OS Kerberos IV support, though. +if test -n "$with_kerberos5" then - if test "$with_gssapi" != "yes" -a -n "$with_gssapi" - then - CFLAGS="$CFLAGS -I$with_gssapi/include" - LDFLAGS="$LDFLAGS -L$with_gssapi/lib" - fi - AC_CHECK_LIB(krb5, krb5_init_context,, - AC_MSG_ERROR([could not find libkrb5 which is needed for GSSAPI support])) - AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context,, - AC_MSG_ERROR([could not find libgssapi_krb5 which is needed for GSSAPI support]), -lkrb5) - AC_DEFINE(GSSAPI) - LIBS="$LIBS -lgssapi_krb5 -lkrb5" -fi]) + # Path given + CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$with_kerberos5/include" + LDEFLAGS="$LDEFLAGS -L$with_kerberos5/lib" + LIBS="$LIBS -lkrb5 -lcrypto -lcom_err" +else + for dir in /usr/kerberos /usr/local/krb5 /usr/athena + do + if test -f "$dir/include/krb5.h" + then + CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$dir/include" + LDEFLAGS="$LDEFLAGS -L$dir/lib" + LIBS="$LIBS -lkrb5 -lcrypto -lcom_err" + with_kerberos5=$dir + break + fi + done +fi ### use option --with-kerberos=DIR to point at a Kerberos directory AC_ARG_WITH(kerberos, @@ -263,6 +270,23 @@ then echo "Configuring kerberosIV for NetBSD" CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I/usr/include/kerberosIV" LIBS="$LIBS -lkrb -ldes" +elif test -n "$with_kerberos" -a -n "$with_kerberos5" +then + CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos/include" + LDEFLAGS="$LDEFLAGS -L$with_kerberos/lib" + LIBS="$LIBS -lkrb4" +elif test -n "$with_kerberos5" +then + for dir in /usr/kerberos /usr/kerberosIV /usr/athena + do + if test -f "$dir/include/kerberosIV/krb.h" + then + CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$dir/include" + LDEFLAGS="$LDEFLAGS -L$dir/lib" + LIBS="$LIBS -lkrb4" + break + fi + done elif test -n "$with_kerberos" then CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos/include" @@ -281,31 +305,54 @@ else done fi -### use option --with-kerberos5=DIR to point at a Kerberos 5 directory -AC_ARG_WITH(kerberos5, - [ --with-kerberos5=DIR point fetchmail compilation at a Kerberos 5 directory]) +### use option --with-hesiod=DIR to point at a HESIOD directory +AC_ARG_WITH(hesiod, + [ --with-hesiod=DIR point fetchmail compilation at a HESIOD directory]) -# The "then" arm (nonempty $with_kerberos5) is kind of a crock. It works for -# configuring the BSD/OS Kerberos IV support, though. -if test -n "$with_kerberos5" +if test -n "$with_hesiod" then # Path given - CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$with_kerberos5/include" - LDEFLAGS="$LDEFLAGS -L$with_kerberos5/lib" - LIBS="$LIBS -lkrb5 -lcrypto -lcom_err" + CEFLAGS="$CEFLAGS -DHESIOD -I$with_hesiod/include" + LDEFLAGS="$LDEFLAGS -L$with_hesiod/lib" + LIBS="$LIBS -lhesiod" else - for dir in /usr/kerberos /usr/local/krb5 /usr/athena + for dir in /usr/athena /usr /usr/local do - if test -f "$dir/include/krb5.h" + if test -f "$dir/include/hesiod.h" then - CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$dir/include" + CEFLAGS="$CEFLAGS -DHESIOD -I$dir/include" LDEFLAGS="$LDEFLAGS -L$dir/lib" - LIBS="$LIBS -lkrb5 -lcrypto -lcom_err" + LIBS="$LIBS -lhesiod" + with_hesiod=$dir break fi done fi +### use option --with-gssapi=DIR to compile in GSSAPI support +AC_ARG_WITH(gssapi, + [ --with-gssapi[=DIR] compile in GSSAPI support using libraries in DIR], +[ +if test "$with_gssapi" != "no" +then + if test "$with_gssapi" = "yes" -a -n "$with_kerberos5" + then + with_gssapi=$with_kerberos5 + fi + if test "$with_gssapi" != "yes" -a -n "$with_gssapi" + then + CFLAGS="$CFLAGS -I$with_gssapi/include" + LDFLAGS="$LDFLAGS -L$with_gssapi/lib" + fi + + AC_CHECK_LIB(krb5, krb5_init_context,, + AC_MSG_ERROR([could not find libkrb5 which is needed for GSSAPI support])) + AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context,, + AC_MSG_ERROR([could not find libgssapi_krb5 which is needed for GSSAPI support]), -lkrb5) + AC_DEFINE(GSSAPI) + LIBS="$LIBS -lgssapi_krb5 -lkrb5" +fi]) + AC_OUTPUT(Makefile, [ # The reason for this odd makedepend line is that we want # to have all dependencies evaluated relative to the source directory |