aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorNiki Guldbrand <niki.guldbrand@gmail.com>2011-04-19 17:23:08 +0800
committerMilan Crha <mcrha@redhat.com>2011-04-19 17:23:08 +0800
commit5437ef08afdf985caad63d3d15bec5438b30ac11 (patch)
treed4689d2def146ed1278f0cfb810564745acf8438 /m4
parentcfe983a286308665243727b960ccd6f19deee6f2 (diff)
downloadgsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar.gz
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar.bz2
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar.lz
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar.xz
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.tar.zst
gsoc2013-evolution-5437ef08afdf985caad63d3d15bec5438b30ac11.zip
Bug #645721 - Fix build error when enabling kerberos without specifying path
Diffstat (limited to 'm4')
-rw-r--r--m4/evo_krb5_support.m450
1 files changed, 41 insertions, 9 deletions
diff --git a/m4/evo_krb5_support.m4 b/m4/evo_krb5_support.m4
index fd27581313..ba37e81969 100644
--- a/m4/evo_krb5_support.m4
+++ b/m4/evo_krb5_support.m4
@@ -1,31 +1,63 @@
-#serial 0.1
+dnl EVO_KRB5_SUPPORT(default)
+dnl Add --with-krb5, --with-krb5-libs and --with-krb5-include options.
+dnl --with-krb5 defaults to the given value if not specified.
+#serial 0.2
AC_DEFUN([EVO_KRB5_SUPPORT],[
dnl ******************************
dnl Kerberos
dnl ******************************
+ default="$1"
AC_ARG_WITH([krb5],
AS_HELP_STRING([--with-krb5=PATH],
- [Location of Kerberos 5 install dir]),
- [with_krb5="$withval"], [with_krb5="no"])
+ [Location of Kerberos 5 install dir]))
AC_ARG_WITH([krb5-libs],
AS_HELP_STRING([--with-krb5-libs=PATH],
- [Location of Kerberos 5 libraries]),
- [with_krb5_libs="$withval"], [with_krb5_libs="$with_krb5/lib"])
+ [Location of Kerberos 5 libraries]))
AC_ARG_WITH([krb5-includes],
AS_HELP_STRING([--with-krb5-includes=PATH],
- [Location of Kerberos 5 headers]),
- [with_krb5_includes="$withval"], [with_krb5_includes="$with_krb5/include"])
+ [Location of Kerberos 5 headers]))
dnl ******************************
dnl Kerberos 5
dnl ******************************
msg_krb5="no"
AC_MSG_CHECKING([for Kerberos 5])
+ with_krb5="${with_krb5:=$default}"
+ case $with_krb5 in
+ no|"")
+ with_krb5=no
+ ;;
+ yes)
+ with_krb5=/usr
+ ;;
+ *)
+ with_krb5=$with_krb5
+ ;;
+ esac
+
if test "x${with_krb5}" != "xno"; then
LIBS_save="$LIBS"
+ case $with_krb5_libs in
+ yes|no|"")
+ with_krb5_libs=$with_krb5/lib
+ ;;
+ *)
+ with_krb5_libs=$with_krb5_libs
+ ;;
+ esac
+
+ case $with_krb5_includes in
+ yes|no|"")
+ with_krb5_includes=$with_krb5/include
+ ;;
+ *)
+ with_krb5_includes=$with_krb5_includes
+ ;;
+ esac
+
mitlibs="-lkrb5 -lk5crypto -lcom_err -lgssapi_krb5"
heimlibs="-lkrb5 -lcrypto -lasn1 -lcom_err -lroken -lgssapi"
sunlibs="-lkrb5 -lgss"
@@ -87,13 +119,13 @@ AC_DEFUN([EVO_KRB5_SUPPORT],[
AM_CONDITIONAL(ENABLE_KRB5, [test "x$with_krb5" != "xno"])
AC_CHECK_HEADER([et/com_err.h],
- [AC_DEFINE([HAVE_ET_COM_ERR_H], 1, [Have <et/comm_err.h>])],,
+ [AC_DEFINE([HAVE_ET_COM_ERR_H], 1, [Have <et/com_err.h>])],,
[[ #if HAVE_ET_COM_ERR_H
#include <com_err.h>
#endif
]])
AC_CHECK_HEADER([com_err.h],
- [AC_DEFINE([HAVE_COM_ERR_H], 1, [Have <comm_err.h>])],,
+ [AC_DEFINE([HAVE_COM_ERR_H], 1, [Have <com_err.h>])],,
[[ #if HAVE_COM_ERR_H
#include <com_err.h>
#endif