File: sasl.m4

package info (click to toggle)
dante 1.4.2+dfsg-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 11,640 kB
  • sloc: ansic: 64,514; sh: 11,180; yacc: 3,127; lex: 1,683; makefile: 364; awk: 220
file content (57 lines) | stat: -rw-r--r-- 1,632 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
dnl sasl.m4 -- find compiler and linker flags for SASL
dnl Based on patch from Markus Moeller (markus_moeller at compuserve.com)

dnl default prefix for sasl headers/libs
sasldir=/usr
AC_ARG_WITH(sasl,
 [  --without-sasl          disable sasl support @<:@default=detect@:>@],
 [SASL=$withval])

AC_ARG_WITH(sasl-path,
 [  --with-sasl-path=PATH   specify sasl path],
 [sasldir=$withval])

if test x"$SASL" != xno; then
   unset saslfail

   if test x"$sasldir" != xno; then
      ac_sasl_cflags=-I$sasldir/include
      ac_sasl_libs=-L$sasldir/lib
   else
      ac_sasl_cflags=
      ac_sasl_libs=
   fi

   dnl any cflags values obtained from krb5-config?
   if test x"${ac_sasl_cflags}" != x; then
      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$ac_sasl_cflags"
   fi

   dnl extract -L flags
   if test x"${ac_sasl_libs}" != x; then
      NPATH=`echo $ac_sasl_libs | xargs -n1 | egrep '^-L' | xargs echo`
      LDFLAGS="${LDFLAGS}${LDFLAGS:+ }$NPATH"
   fi

   dnl look for gssapi headers
   AC_CHECK_HEADERS(sasl.h sasl/sasl.h)

   case `uname` in
      Darwin) ac_lib_sav="$LIBS"
              AC_CHECK_LIB(sasl2, main)
	      if test x"$LIBS" != x; then
                 LIBS="$ac_lib_sav"
              fi
              if test x"${ac_cv_lib_sasl2_main}" = yes; then
                 AC_DEFINE(HAVE_SASL_DARWIN, 1, [Define to 1 if Mac Darwin without sasl.h])
              fi
              ;;
   esac

   if test x"${ac_cv_header_sasl_h}" = xyes ||
      test x"${ac_cv_header_sasl_sasl_h}" = xyes ||
      test x"${ac_cv_lib_sasl2_main}" = xyes; then
      unset no_sasl
      AC_DEFINE(HAVE_SASL, 1, [Have SASL support])
   fi
fi