diff options
author | Nathan Kinder <nkinder@redhat.com> | 2006-10-17 17:07:14 +0000 |
---|---|---|
committer | Nathan Kinder <nkinder@redhat.com> | 2006-10-17 17:07:14 +0000 |
commit | a6667a86c013b5f34ee163473348d38f3ad2a3fd (patch) | |
tree | a376aeabd05021f2a717ea72519fd2e48afc6786 /m4/sasl.m4 | |
parent | 28442c792a2b900f18000b57a86b3b9c8b3aa0c8 (diff) | |
download | ds-a6667a86c013b5f34ee163473348d38f3ad2a3fd.tar.gz ds-a6667a86c013b5f34ee163473348d38f3ad2a3fd.tar.xz ds-a6667a86c013b5f34ee163473348d38f3ad2a3fd.zip |
Related: 210736
Phase one of implementing new GNU Automake/Autoconf build system.
Diffstat (limited to 'm4/sasl.m4')
-rw-r--r-- | m4/sasl.m4 | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/m4/sasl.m4 b/m4/sasl.m4 new file mode 100644 index 00000000..73e86dcb --- /dev/null +++ b/m4/sasl.m4 @@ -0,0 +1,93 @@ +# -*- tab-width: 4; -*- +# Configure paths for SASL +# Public domain - Nathan Kinder <nkinder@redhat.com> 2006-06-26 +# Based upon svrcore.m4 (also PD) by Rich Megginson <richm@stanfordalumni.org> + +dnl ======================================================== +dnl = sasl is used to support various authentication mechanisms +dnl = such as DIGEST-MD5 and GSSAPI. +dnl ======================================================== +dnl ======================================================== +dnl = Use the sasl libraries on the system (assuming it exists) +dnl ======================================================== +AC_CHECKING(for sasl) + +AC_MSG_CHECKING(for --with-sasl) +AC_ARG_WITH(sasl, + [[ --with-sasl=PATH Use sasl from supplied path]], + dnl = Look in the standard system locations + [ + if test "$withval" = "yes"; then + AC_MSG_RESULT(yes) + + dnl = Check for sasl.h in the normal locations + if test -f /usr/include/sasl/sasl.h; then + sasl_inc="-I/usr/include/sasl" + elif test -f /usr/include/sasl.h; then + sasl_inc="-I/usr/include" + else + AC_MSG_ERROR(sasl.h not found) + fi + + dnl = Check the user provided location + elif test -d "$withval" -a -d "$withval/lib" -a -d "$withval/include" ; then + AC_MSG_RESULT([using $withval]) + + if test -f "$withval/include/sasl/sasl.h"; then + sasl_inc="-I$withval/include/sasl" + elif test -f "$withval/include/sasl.h"; then + sasl_inc="-I$withval/include" + else + AC_MSG_ERROR(sasl.h not found) + fi + + sasl_lib="-L$withval/lib" + else + AC_MSG_RESULT(yes) + AC_MSG_ERROR([sasl not found in $withval]) + fi + ], + AC_MSG_RESULT(no)) + +AC_MSG_CHECKING(for --with-sasl-inc) +AC_ARG_WITH(sasl-inc, + [[ --with-sasl-inc=PATH SASL include file directory]], + [ + if test -f "$withval"/sasl.h; then + AC_MSG_RESULT([using $withval]) + sasl_inc="-I$withval" + else + echo + AC_MSG_ERROR([$withval/sasl.h not found]) + fi + ], + AC_MSG_RESULT(no)) + +AC_MSG_CHECKING(for --with-sasl-lib) +AC_ARG_WITH(sasl-lib, + [[ --with-sasl-lib=PATH SASL library directory]], + [ + if test -d "$withval"; then + AC_MSG_RESULT([using $withval]) + sasl_lib="-L$withval" + else + echo + AC_MSG_ERROR([$withval not found]) + fi + ], + AC_MSG_RESULT(no)) + +if test -z "$sasl_inc"; then + AC_MSG_CHECKING(for sasl.h) + dnl - Check for sasl in standard system locations + if test -f /usr/include/sasl/sasl.h; then + AC_MSG_RESULT([using /usr/include/sasl/sasl.h]) + sasl_inc="-I/usr/include/sasl" + elif test -f /usr/include/sasl.h; then + AC_MSG_RESULT([using /usr/include/sasl.h]) + sasl_inc="-I/usr/include" + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([sasl not found, specify with --with-sasl.]) + fi +fi |