1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(libgsasl, 0.0.2, bug-libgsasl@josefsson.org)
5 # Interfaces removed: CURRENT++, AGE=0, REVISION=0
6 # Interfaces added: CURRENT++, AGE++, REVISION=0
7 # No interfaces changed: REVISION++
16 AM_CONFIG_HEADER(config.h)
18 # Checks for programs.
27 AM_MISSING_PROG(PERL, perl, $missing_dir)
28 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
29 AM_MISSING_PROG(TEXI2PDF, texi2pdf, $missing_dir)
30 AM_MISSING_PROG(DOCBOOK2TXT, docbook2txt, $missing_dir)
31 AM_MISSING_PROG(DOCBOOK2HTML, docbook2html, $missing_dir)
32 AM_MISSING_PROG(DOCBOOK2PS, docbook2ps, $missing_dir)
33 AM_MISSING_PROG(DOCBOOK2PDF, docbook2pdf, $missing_dir)
36 AC_ARG_ENABLE(anonymous,
37 AC_HELP_STRING([--disable-anonymous], [don't use the ANONYMOUS mechanism]),
39 if test "$anonymous" != "no" ; then
41 AC_DEFINE(USE_ANONYMOUS, 1, [Define to 1 if you want ANONYMOUS.])
43 AC_MSG_CHECKING([if ANONYMOUS should be used])
44 AC_MSG_RESULT($anonymous)
47 AC_ARG_ENABLE(external,
48 AC_HELP_STRING([--disable-external], [don't use the EXTERNAL mechanism]),
50 if test "$external" != "no" ; then
52 AC_DEFINE(USE_EXTERNAL, 1, [Define to 1 if you want EXTERNAL.])
54 AC_MSG_CHECKING([if EXTERNAL should be used])
55 AC_MSG_RESULT($external)
59 AC_HELP_STRING([--disable-plain], [don't use the PLAIN mechanism]),
61 if test "$plain" != "no" ; then
63 AC_DEFINE(USE_PLAIN, 1, [Define to 1 if you want PLAIN.])
65 AC_MSG_CHECKING([if PLAIN should be used])
70 AC_HELP_STRING([--disable-login], [don't use the LOGIN mechanism]),
72 if test "$login" != "no" ; then
74 AC_DEFINE(USE_LOGIN, 1, [Define to 1 if you want LOGIN.])
76 AC_MSG_CHECKING([if LOGIN should be used])
80 AC_ARG_ENABLE(securid,
81 AC_HELP_STRING([--disable-securid], [don't use the SECURID mechanism]),
83 if test "$securid" != "no" ; then
85 AC_DEFINE(USE_SECURID, 1, [Define to 1 if you want SECURID.])
87 AC_MSG_CHECKING([if SECURID should be used])
88 AC_MSG_RESULT($securid)
91 PKG_CHECK_MODULES(LIBNTLM, libntlm >= 0.3.1, [have_ntlm=yes])
93 AC_HELP_STRING([--disable-ntlm], [don't use the NTLM mechanism]),
95 if test "$ntlm" != "no" ; then
96 if test "$have_ntlm" != "yes" ; then
98 AC_MSG_WARN([libntlm not found, disabling NTLM])
101 AC_DEFINE(USE_NTLM, 1, [Define to 1 if you want NTLM.])
104 AC_MSG_CHECKING([if NTLM should be used])
108 AC_ARG_ENABLE(cram-md5,
109 AC_HELP_STRING([--disable-cram-md5], [don't use the CRAM-MD5 mechanism]),
111 AM_PATH_LIBGCRYPT(1.1.7, [have_gcrypt=yes])
112 if test "$cram_md5" != "no" ; then
113 if test "$have_gcrypt" != "yes" ; then
115 AC_MSG_WARN([libgcrypt not found, disabling CRAM-MD5])
118 AC_DEFINE(USE_CRAM_MD5, 1, [Define to 1 if you want CRAM-MD5.])
121 AC_MSG_CHECKING([if CRAM-MD5 should be used])
122 AC_MSG_RESULT($cram_md5)
125 AC_ARG_ENABLE(digest-md5,
126 AC_HELP_STRING([--disable-digest-md5], [don't use the DIGEST-MD5 mechanism]),
127 digest_md5=$enableval)
128 if test "$digest_md5" != "no" ; then
129 if test "$have_gcrypt" != "yes" ; then
131 AC_MSG_WARN([libgcrypt not found, disabling DIGEST-MD5])
134 AC_DEFINE(USE_DIGEST_MD5, 1, [Define to 1 if you want DIGEST-MD5.])
137 AC_MSG_CHECKING([if DIGEST-MD5 should be used])
138 AC_MSG_RESULT($digest_md5)
142 # AC_HELP_STRING([--disable-srp], [don't use the SRP mechanism]),
144 #if test "$srp" != "no" ; then
145 # if test "$have_gcrypt" != "yes" ; then
147 # AC_MSG_WARN([libgcrypt not found, disabling SRP])
150 # AC_DEFINE(USE_SRP, 1, [Define to 1 if you want SRP.])
153 #AC_MSG_CHECKING([if SRP should be used])
156 # GSSAPI (tests partially stolen from mailutils and fetchmail)
157 AC_ARG_ENABLE(gssapi,
158 AC_HELP_STRING([--disable-gssapi], [don't use the GSSAPI mechanism]),
160 if test "$gssapi" != "no" ; then
161 AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
162 if test "$KRB5_CONFIG" != "no" ; then
163 GSSAPI_CFLAGS=`$KRB5_CONFIG --cflags`
164 GSSAPI_LIBS=`$KRB5_CONFIG --libs gssapi`
165 save_CPPFLAGS=$CPPFLAGS
166 CPPFLAGS=$GSSAPI_CFLAGS
167 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
168 CPPFLAGS=$save_CPPFLAGS
169 if test "$ac_cv_header_gssapi_h" = "yes"; then
170 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE, 1, [Define to 1 if you have GSS_C_NT_HOSTBASED_SERVICE.]))
172 AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE, 1, [Define to 1 if you have GSS_C_NT_HOSTBASED_SERVICE.]))
174 AC_SUBST(GSSAPI_CFLAGS)
175 AC_SUBST(GSSAPI_LIBS)
177 AC_DEFINE(USE_GSSAPI, 1, [Define to 1 if you want GSSAPI.])
180 AC_MSG_WARN([krb5-config not found, disabling GSSAPI])
183 AC_MSG_CHECKING([if GSSAPI should be used])
184 AC_MSG_RESULT($gssapi)
186 # Checks for header files.
188 AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/socket.h unistd.h])
190 # Checks for typedefs, structures, and compiler characteristics.
194 AC_PROG_GCC_TRADITIONAL
199 AC_CHECK_HEADERS(getopt.h unistd.h strings.h netdb.h math.h)
200 AC_CHECK_HEADERS(sys/poll.h sys/time.h sys/types.h sys/select.h sys/socket.h)
201 AC_CHECK_HEADERS(argp.h netinet/in.h iconv.h)
203 # Checks for library functions.
204 AC_CHECK_FUNCS(gethostname \
210 AC_SEARCH_LIBS(gethostbyname, xnet)
212 # Test if the libc includes a good enough argp.
213 AC_ARG_WITH(system-argp,
214 AC_HELP_STRING([--without-system-argp], [don't use the system's argp]),,
215 [with_system_argp=yes])
216 if test x$with_system_argp = xyes ; then
217 AC_LIB_ARGP(,with_system_argp=no)
220 if test x$with_system_argp = xno ; then
221 LIBARGP="\$(top_builddir)/argp/libargp.a"
224 AC_CONFIG_SUBDIRS(argp)
226 AC_CONFIG_FILES(Makefile po/Makefile.in m4/Makefile intl/Makefile \
227 doc/Makefile lib/gsasl.h lib/Makefile \
228 libgsasl.pc src/libcharset/Makefile src/Makefile \