1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(libgsasl, 0.0.3, bug-libgsasl@josefsson.org)
5 # Interfaces removed: CURRENT++ AGE=0 REVISION=0
6 # Interfaces added: CURRENT++ AGE++ REVISION=0
7 # Interfaces changed: CURRENT++ REVISION=0
8 # No interfaces changed: REVISION++
17 AM_CONFIG_HEADER(config.h)
19 # Checks for programs.
21 AM_GNU_GETTEXT_VERSION(0.11.5)
28 AM_MISSING_PROG(PERL, perl, $missing_dir)
29 AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir)
30 AM_MISSING_PROG(TEXI2PDF, texi2pdf, $missing_dir)
31 AM_MISSING_PROG(DOCBOOK2TXT, docbook2txt, $missing_dir)
32 AM_MISSING_PROG(DOCBOOK2HTML, docbook2html, $missing_dir)
33 AM_MISSING_PROG(DOCBOOK2PS, docbook2ps, $missing_dir)
34 AM_MISSING_PROG(DOCBOOK2PDF, docbook2pdf, $missing_dir)
37 AC_ARG_ENABLE(anonymous,
38 AC_HELP_STRING([--disable-anonymous], [don't use the ANONYMOUS mechanism]),
40 if test "$anonymous" != "no" ; then
42 AC_DEFINE(USE_ANONYMOUS, 1, [Define to 1 if you want ANONYMOUS.])
44 AC_MSG_CHECKING([if ANONYMOUS should be used])
45 AC_MSG_RESULT($anonymous)
48 AC_ARG_ENABLE(external,
49 AC_HELP_STRING([--disable-external], [don't use the EXTERNAL mechanism]),
51 if test "$external" != "no" ; then
53 AC_DEFINE(USE_EXTERNAL, 1, [Define to 1 if you want EXTERNAL.])
55 AC_MSG_CHECKING([if EXTERNAL should be used])
56 AC_MSG_RESULT($external)
60 AC_HELP_STRING([--disable-plain], [don't use the PLAIN mechanism]),
62 if test "$plain" != "no" ; then
64 AC_DEFINE(USE_PLAIN, 1, [Define to 1 if you want PLAIN.])
66 AC_MSG_CHECKING([if PLAIN should be used])
71 AC_HELP_STRING([--disable-login], [don't use the LOGIN mechanism]),
73 if test "$login" != "no" ; then
75 AC_DEFINE(USE_LOGIN, 1, [Define to 1 if you want LOGIN.])
77 AC_MSG_CHECKING([if LOGIN should be used])
81 AC_ARG_ENABLE(securid,
82 AC_HELP_STRING([--disable-securid], [don't use the SECURID mechanism]),
84 if test "$securid" != "no" ; then
86 AC_DEFINE(USE_SECURID, 1, [Define to 1 if you want SECURID.])
88 AC_MSG_CHECKING([if SECURID should be used])
89 AC_MSG_RESULT($securid)
92 PKG_CHECK_MODULES(LIBNTLM, libntlm >= 0.3.1, [have_ntlm=yes], [:])
94 AC_HELP_STRING([--disable-ntlm], [don't use the NTLM mechanism]),
96 if test "$ntlm" != "no" ; then
97 if test "$have_ntlm" != "yes" ; then
99 AC_MSG_WARN([libntlm not found, disabling NTLM])
102 AC_DEFINE(USE_NTLM, 1, [Define to 1 if you want NTLM.])
105 AC_MSG_CHECKING([if NTLM should be used])
109 AC_ARG_ENABLE(cram-md5,
110 AC_HELP_STRING([--disable-cram-md5], [don't use the CRAM-MD5 mechanism]),
112 AM_PATH_LIBGCRYPT(1.1.7, [have_gcrypt=yes])
113 if test "$cram_md5" != "no" ; then
114 if test "$have_gcrypt" != "yes" ; then
116 AC_MSG_WARN([libgcrypt not found, disabling CRAM-MD5])
119 AC_DEFINE(USE_CRAM_MD5, 1, [Define to 1 if you want CRAM-MD5.])
122 AC_MSG_CHECKING([if CRAM-MD5 should be used])
123 AC_MSG_RESULT($cram_md5)
126 AC_ARG_ENABLE(digest-md5,
127 AC_HELP_STRING([--disable-digest-md5], [don't use the DIGEST-MD5 mechanism]),
128 digest_md5=$enableval)
129 if test "$digest_md5" != "no" ; then
130 if test "$have_gcrypt" != "yes" ; then
132 AC_MSG_WARN([libgcrypt not found, disabling DIGEST-MD5])
135 AC_DEFINE(USE_DIGEST_MD5, 1, [Define to 1 if you want DIGEST-MD5.])
138 AC_MSG_CHECKING([if DIGEST-MD5 should be used])
139 AC_MSG_RESULT($digest_md5)
143 # AC_HELP_STRING([--disable-srp], [don't use the SRP mechanism]),
145 #if test "$srp" != "no" ; then
146 # if test "$have_gcrypt" != "yes" ; then
148 # AC_MSG_WARN([libgcrypt not found, disabling SRP])
151 # AC_DEFINE(USE_SRP, 1, [Define to 1 if you want SRP.])
154 #AC_MSG_CHECKING([if SRP should be used])
157 # GSSAPI (tests partially stolen from mailutils and fetchmail)
158 AC_ARG_ENABLE(gssapi,
159 AC_HELP_STRING([--disable-gssapi], [don't use the GSSAPI mechanism]),
161 if test "$gssapi" != "no" ; then
162 AC_PATH_PROG(KRB5_CONFIG, krb5-config, no)
163 if test "$KRB5_CONFIG" != "no" ; then
164 GSSAPI_CFLAGS=`$KRB5_CONFIG --cflags`
165 GSSAPI_LIBS=`$KRB5_CONFIG --libs gssapi`
166 save_CPPFLAGS=$CPPFLAGS
167 CPPFLAGS=$GSSAPI_CFLAGS
168 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
169 CPPFLAGS=$save_CPPFLAGS
170 if test "$ac_cv_header_gssapi_h" = "yes"; then
171 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.]))
173 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.]))
175 AC_SUBST(GSSAPI_CFLAGS)
176 AC_SUBST(GSSAPI_LIBS)
178 AC_DEFINE(USE_GSSAPI, 1, [Define to 1 if you want GSSAPI.])
181 AC_MSG_WARN([krb5-config not found, disabling GSSAPI])
184 AC_MSG_CHECKING([if GSSAPI should be used])
185 AC_MSG_RESULT($gssapi)
187 # Check for stringprep
188 AC_ARG_WITH(system-stringprep,
189 AC_HELP_STRING([--without-system-stringprep],
190 [don't use the system's libstringprep]))
191 if test "$with_system_stringprep" != "no" ; then
192 PKG_CHECK_MODULES(LIBSTRINGPREP, libstringprep >= 0.0.1,
193 with_system_stringprep=yes,
194 with_system_stringprep=no)
197 if test "$with_system_stringprep" = "no"; then
198 LIBSTRINGPREP=libstringprep
199 LIBSTRINGPREP_CFLAGS="-I\$(top_srcdir)/libstringprep"
200 LIBSTRINGPREP_LIBS="\$(top_builddir)/libstringprep/libstringprep.la"
202 AC_SUBST(LIBSTRINGPREP)
203 AC_MSG_CHECKING([if system's libstringprep should be used])
204 AC_MSG_RESULT($with_system_stringprep)
205 AC_CONFIG_SUBDIRS(libstringprep)
207 # Checks for header files.
209 AC_CHECK_HEADERS([stdlib.h string.h strings.h sys/socket.h unistd.h])
211 # Checks for typedefs, structures, and compiler characteristics.
215 AC_PROG_GCC_TRADITIONAL
220 AC_CHECK_HEADERS(getopt.h unistd.h strings.h netdb.h math.h)
221 AC_CHECK_HEADERS(sys/poll.h sys/time.h sys/types.h sys/select.h sys/socket.h)
222 AC_CHECK_HEADERS(argp.h netinet/in.h)
224 # Checks for library functions.
225 AC_CHECK_FUNCS(gethostname \
231 AC_SEARCH_LIBS(gethostbyname, xnet)
233 # Test if the libc includes a good enough argp.
234 AC_ARG_WITH(system-argp,
235 AC_HELP_STRING([--without-system-argp], [don't use the system's argp]),,
236 [with_system_argp=yes])
237 if test x$with_system_argp = xyes ; then
238 AC_LIB_ARGP(,with_system_argp=no)
241 if test x$with_system_argp = xno ; then
242 LIBARGP="\$(top_builddir)/argp/libargp.a"
245 AC_CONFIG_SUBDIRS(argp)
247 AC_CONFIG_FILES(Makefile po/Makefile.in m4/Makefile intl/Makefile \
248 doc/Makefile lib/gsasl.h lib/Makefile \
249 libgsasl.pc src/Makefile tests/Makefile)