]> Pileus Git - ~andy/fetchmail/blob - configure.in
a32e67ceb7d31ba3880c0a7cc3f5847a73c0d831
[~andy/fetchmail] / configure.in
1 dnl Autoconfigure input file for fetchmail
2 dnl Eric S. Raymond <esr@thyrsus.com>
3 dnl
4 dnl Process this file with autoconf to produce a configure script.
5 dnl
6
7 AC_INIT(fetchmail.h)            dnl A distinctive file to look for in srcdir. 
8 AC_CONFIG_HEADER(config.h)
9
10 dnl We want these before the checks, so the checks can modify their values.
11 test -z "$CFLAGS" && CFLAGS="-O" AC_SUBST(CFLAGS)
12 test -z "$LDFLAGS" && LDFLAGS=-s AC_SUBST(LDFLAGS)
13
14 AC_CANONICAL_HOST
15 AC_PROG_CC
16 AC_PROG_INSTALL
17 AC_PROG_CPP                     dnl Later checks need this.
18 AC_PROG_CC_C_O
19 AC_AIX
20 AC_ISC_POSIX
21 AC_MINIX
22 AC_HEADER_STDC
23 AC_TYPE_SIZE_T
24 AC_TYPE_PID_T
25 AC_TYPE_SIGNAL
26 AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h sys/itimer.h fcntl.h sys/fcntl.h memory.h sys/wait.h)
27
28 AC_C_CONST                      dnl getopt needs this.
29
30 AC_PROG_LEX
31 AC_PROG_YACC
32 AC_SUBST(CPFLAGS)
33 AC_SUBST(CEFLAGS)
34 AC_SUBST(LDEFLAGS)
35 AC_SUBST(LIBOBJS)
36 AC_SUBST(POMAKE)
37
38 PACKAGE=`sed -n '/PACKAGE *= *\(.*\)/s//\1/p' <$srcdir/Makefile.in`
39 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
40 AC_SUBST(PACKAGE)
41
42 VERSION=`sed -n '/VERSION *= *\(.*\)/s//\1/p' <$srcdir/Makefile.in`
43 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
44 AC_SUBST(VERSION)
45
46 # Check for LynxOS special case: -lbsd needed (at least on 2.3.0) and -s
47 # not working.
48 if test `uname` = "LynxOS" 
49 then
50   echo "Adding -lbsd to standard libraries"
51   LIBS="$LIBS -lbsd"
52   LDFLAGS=""
53   echo "Prepending standard include path to gcc flags"
54   CPFLAGS="-I/usr/include"
55 fi
56
57 # Check for FreeBSD special case: -lkvm needed
58 if test `uname` = "FreeBSD" 
59 then
60    echo "Adding -lkvm to standard libraries"
61    LIBS="$LIBS -lkvm"
62 fi
63  
64 # Check for Rhapsody special case: it doesn't like -s
65 if test `uname` = "Rhapsody" 
66 then
67    echo "Removing -s load flag"
68    LDFLAGS=`echo $LDFLAGS | sed "s/-s //"`
69 fi
70  
71 # i18n
72 # Arnaldo Carvalho de Melo <acme@conectiva.com.br>
73 # Sat Nov  7 15:39:03 EDT 1998
74
75 ALL_LINGUAS="cs es fr pl pt_BR ru"
76
77 AM_GNU_GETTEXT
78
79 # end i18n
80
81 # Under sysV68, socket and friends are provided by the C library.
82 # -linet does not provide socket, but causes multiple definition
83 # errors at link-time.  It is thus better to only use the C library.
84 # So don't add -linet to the link list unless it's necessary
85 AC_CHECK_FUNC(socket,
86     AC_MSG_RESULT(using libc's socket),
87     AC_CHECK_LIB(socket,socket)
88     AC_CHECK_LIB(inet,socket))
89
90 # If gettext isn't in the C library, maybe there's a -lintl.
91 AC_CHECK_FUNC(gettext,
92     AC_MSG_RESULT(using libc's gettext),
93     AC_CHECK_LIB(intl,gettext))
94
95 # The condition in this test copes with the presence of inet_addr in libc6.
96 AC_CHECK_FUNC(inet_addr,
97     AC_MSG_RESULT(using libc's inet_addr),
98     AC_CHECK_LIB(nsl,inet_addr))
99
100 dnl Port hack for Interactive UNIX System V/386 Release 3.2
101 AC_CHECK_LIB(cposix, strchr,
102                 [EXTRADEFS="$EXTRADEFS -D_SYSV3"
103                 LIBS="$LIBS -lcposix"])
104
105 AC_CHECK_FUNC(strstr, AC_DEFINE(HAVE_STRSTR), 
106               [EXTRASRC="$EXTRASRC \$(srcdir)/strstr.c"
107                EXTRAOBJ="$EXTRAOBJ strstr.o"])
108
109 AC_CHECK_FUNC(strcasecmp, AC_DEFINE(HAVE_STRCASECMP), 
110               [EXTRASRC="$EXTRASRC \$(srcdir)/strcasecmp.c"
111                EXTRAOBJ="$EXTRAOBJ strcasecmp.o"])
112              
113 AC_CHECK_FUNC(memmove, AC_DEFINE(HAVE_MEMMOVE), 
114               [EXTRASRC="$EXTRASRC \$(srcdir)/memmove.c"
115                EXTRAOBJ="$EXTRAOBJ memmove.o"])
116              
117 AC_CHECK_FUNC(getopt_long, AC_DEFINE(HAVE_GETOPTLONG),
118               [EXTRASRC="$EXTRASRC \$(srcdir)/getopt.c \$(srcdir)/getopt1.c"
119                EXTRAOBJ="$EXTRAOBJ getopt.o getopt1.o"])
120
121 AC_FUNC_VPRINTF
122 AC_FUNC_ALLOCA
123 if test -n "$ALLOCA" 
124 then
125   EXTRASRC="$EXTRASRC \$(srcdir)/alloca.c"
126   EXTRAOBJ="$EXTRAOBJ alloca.o"
127 fi
128
129 dnl AC_CHECK_FUNC calls that might hack the Makefile must precede
130 dnl the following AC_SUBSTs
131
132 AC_SUBST(EXTRADEFS)
133 AC_SUBST(EXTRASRC)
134 AC_SUBST(EXTRAOBJ)
135
136 AC_CHECK_FUNCS(tcsetattr stty setsid geteuid seteuid gethostbyname \
137   res_search herror strrchr strerror setlinebuf syslog \
138   snprintf vprintf vsnprintf vsyslog \
139   atexit inet_aton strftime setrlimit socketpair sigprocmask)
140
141 # Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
142 # and breaks gethostbyname(2).  It's better to use the bind stuff in the C
143 # library.  So don't add -lresolv to the link list unless it's necessary
144 # (It will be necessary when using GNU libc6).
145 AC_CHECK_FUNC(res_search,
146     AC_MSG_RESULT(using libc's resolver functions),
147     AC_CHECK_LIB(resolv,res_search, 
148         [AC_DEFINE(HAVE_RES_SEARCH) AC_MSG_RESULT(found resolver functions in libresolv); LIBS="$LIBS -lresolv"], AC_MSG_RESULT(no resolver calls found)))
149
150 dnl Check for libcrypt
151 AC_CHECK_LIB(crypt,crypt)
152
153 dnl AC_FUNC_SETVBUF_REVERSED
154
155 dnl Check for usable void pointer type
156 AC_MSG_CHECKING(use of void pointer type)
157 AC_TRY_COMPILE([],
158    [char *p;
159     void *xmalloc();
160     p = (char *) xmalloc(1);
161    ],
162  [AC_DEFINE(HAVE_VOIDPOINTER) AC_MSG_RESULT(yes)],
163  AC_MSG_RESULT(no))
164
165 dnl Check for ANSI volatile
166 AC_MSG_CHECKING(for ANSI volatile)
167 AC_TRY_COMPILE([],
168    [volatile int n;],
169  [AC_DEFINE(HAVE_VOLATILE) AC_MSG_RESULT(yes)],
170  AC_MSG_RESULT(no))
171
172 dnl Check out the wait reality.  We have to assume sys/wait.h is present.
173 AC_CHECK_FUNCS(waitpid wait3)
174 AC_MSG_CHECKING(for union wait);
175 AC_TRY_LINK([#include <sys/types.h>
176 #include <sys/wait.h>],
177                  [union wait status; int pid; pid = wait (&status);
178 #ifdef WEXITSTATUS
179 /* Some POSIXoid systems have both the new-style macros and the old
180    union wait type, and they do not work together.  If union wait
181    conflicts with WEXITSTATUS et al, we don't want to use it at all.  */
182 if (WEXITSTATUS (status) != 0) pid = -1;
183 #endif
184 #ifdef HAVE_WAITPID
185 /* Make sure union wait works with waitpid.  */
186 pid = waitpid (-1, &status, 0);
187 #endif
188 ],
189   [AC_DEFINE(HAVE_UNION_WAIT) AC_MSG_RESULT(yes)],
190   AC_MSG_RESULT(no))
191
192 AC_MSG_CHECKING(sys_siglist declaration in signal.h or unistd.h)
193 AC_TRY_LINK([#include <signal.h>
194 /* NetBSD declares sys_siglist in <unistd.h>.  */
195 #ifdef HAVE_UNISTD_H
196 #include <unistd.h>
197 #endif], [char *msg = *(sys_siglist + 1);],
198   [AC_DEFINE(SYS_SIGLIST_DECLARED) AC_MSG_RESULT(yes)],
199   AC_MSG_RESULT(no))
200
201 # Find the right directory to put the root-mode PID file in
202 for dir in "/var/run" "/etc"
203 do
204         if test -d $dir 
205         then
206                 break;
207         fi
208 done
209 AC_MSG_RESULT(root-mode pid file will go in $dir)
210 AC_DEFINE_UNQUOTED(PID_DIR, "$dir")
211
212 AC_CHECK_SIZEOF(short)
213 AC_CHECK_SIZEOF(int)
214 AC_CHECK_SIZEOF(long)
215
216 if test "$USE_NLS" = "yes"
217 then
218         echo 'Enabling internationalization support...'
219         POMAKE='$(MAKE) -C po'
220         if test "x$prefix" != xNONE; then
221                 EXTRADEFS="$EXTRADEFS -DLOCALEDIR='\"$prefix/share/locale\"'"
222         else
223                 EXTRADEFS="$EXTRADEFS -DLOCALEDIR='\"$ac_default_prefix/share/locale\"'"
224         fi
225 else
226         echo 'Disabling internationalization support...'
227         POMAKE="@echo '(NLS support disabled)'; #"
228 fi
229
230 ###     use option --enable-POP2 to compile in the POP2 support
231 AC_ARG_ENABLE(POP2,
232         [  --enable-POP2           compile in POP2 protocol support (obsolete)],
233         [with_POP2=$enableval],
234         [with_POP2=no])
235 test "$with_POP2" = "yes" && AC_DEFINE(POP2_ENABLE)
236
237 ###     use option --disable-POP3 to omit the POP3 support
238 AC_ARG_ENABLE(POP3,
239         [  --disable-POP3          don't compile in POP3 protocol support],
240         [with_POP3=$enableval],
241         [with_POP3=yes])
242 test "$with_POP3" = "yes" && AC_DEFINE(POP3_ENABLE)
243
244 ###     use option --disable-IMAP to omit the IMAP support
245 AC_ARG_ENABLE(IMAP,
246         [  --disable-IMAP          don't compile in IMAP protocol support],
247         [with_IMAP=$enableval],
248         [with_IMAP=yes])
249 test "$with_IMAP" = "yes" && AC_DEFINE(IMAP_ENABLE)
250
251 ###     use option --disable-ETRN to omit the ETRN support
252 AC_ARG_ENABLE(ETRN,
253         [  --disable-ETRN          don't compile in ETRN protocol support],
254         [with_ETRN=$enableval],
255         [with_ETRN=yes])
256 test "$with_ETRN" = "yes" && AC_DEFINE(ETRN_ENABLE)
257
258 ###     use option --enable-RPA to compile in the RPA support
259 AC_ARG_ENABLE(RPA,
260         [  --enable-RPA            compile in RPA protocol support],
261         [with_RPA=$enableval],
262         [with_RPA=no])
263 test "$with_RPA" = "yes" && AC_DEFINE(RPA_ENABLE)
264
265 ###     use option --enable-NTLM to compile in the NTLM support
266 AC_ARG_ENABLE(NTLM,
267         [  --enable-NTLM           compile in NTLM authentication support],
268         [with_NTLM=$enableval],
269         [with_NTLM=no])
270 test "$with_NTLM" = "yes" && AC_DEFINE(NTLM_ENABLE)
271
272 ###     use option --enable-SDPS to compile in the SDPS support
273 AC_ARG_ENABLE(SDPS,
274         [  --enable-SDPS           compile in SDPS protocol support],
275         [with_SDPS=$enableval],
276         [with_SDPS=no])
277 test "$with_SDPS" = "yes" && AC_DEFINE(SDPS_ENABLE)
278
279 ###     use option --enable-opie to compile in the OPIE support
280 AC_ARG_ENABLE(opie,
281         [  --enable-opie           support OTP through the OPIE library],
282         [ AC_CHECK_HEADER(opie.h,, [echo 'configure: cannot find <opie.h>, which is required for OPIE support.'; exit 1])
283           AC_CHECK_LIB(opie,opiegenerator,, [echo 'configure: cannot find libopie, which is required for OPIE support.'; exit 1])
284           with_opie=$enableval],
285         [with_opie=no])
286 test "$with_opie" = "yes" && AC_DEFINE(OPIE_ENABLE)
287
288 AC_ARG_ENABLE(inet6,
289         [  --enable-inet6          support IPv6 (requires the inet6-apps library)],
290         [ unset ac_cv_lib_inet6_getaddrinfo; AC_CHECK_LIB(inet6,getaddrinfo,,
291           [ unset ac_cv_lib_inet6_getaddrinfo;
292             LDFLAGS="$LDFLAGS -L/usr/inet6/lib";
293             AC_CHECK_LIB(inet6, getaddrinfo,,
294               [ echo 'configure: cannot find libinet6, which is required for IPv6 support.'; 
295               exit 1]) ]) ]
296         [with_inet6=no])
297 test "$with_inet6" = "yes" && AC_DEFINE(INET6_ENABLE)
298
299 AC_ARG_ENABLE(netsec,
300         [  --enable-netsec         support network security (requires inet6-apps library)],
301         [ unset ac_cv_lib_inet6_net_security_strtorequest; AC_CHECK_LIB(inet6, net_security_strtorequest,,
302           [ unset ac_cv_lib_inet6_net_security_strtorequest;
303             LDFLAGS="$LDFLAGS -L/usr/inet6/lib"; 
304             AC_CHECK_LIB(inet6, net_security_strtorequest,,
305             [ echo 'configure: cannot find net_security_strtorequest in libinet6, which is required';
306               echo '           for network security support. Either it does not exist, or it was';
307               echo '           not built with network security support enabled.';
308               exit 1]) ])
309         unset ac_cv_header_net_security_h; AC_CHECK_HEADER(net/security.h,,
310         [ unset ac_cv_header_net_security_h; 
311         CPPFLAGS="$CPPFLAGS -I/usr/inet6/include"; 
312         CFLAGS="$CFLAGS -I/usr/inet6/include"; AC_CHECK_HEADER(net/security.h,,
313           [ echo 'configure: cannot find <net/security.h>, which is required';
314           echo '             for network security support.';
315           exit 1]) ]) ]
316         [with_netsec=no])
317 test "$with_netsec" = "yes" && AC_DEFINE(NET_SECURITY)
318
319 ###     use option --with-kerberos5=DIR to point at a Kerberos 5 directory
320 AC_ARG_WITH(kerberos5,
321         [  --with-kerberos5=DIR    point fetchmail compilation at a Kerberos 5 directory])
322
323 # The "then" arm (nonempty $with_kerberos5) is kind of a crock.  It works for
324 # configuring the BSD/OS Kerberos IV support, though. 
325 if test -n "$with_kerberos5"
326 then
327     # Path given
328     CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$with_kerberos5/include"
329     LDEFLAGS="$LDEFLAGS -L$with_kerberos5/lib"
330     if test -f "$with_kerberos5/include/roken.h"
331     then
332        AC_DEFINE(HEIMDAL)
333        LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken -lcom_err"
334     else
335        LIBS="$LIBS -lkrb5 -lcrypto -lcom_err"
336     fi
337 else
338   if test "$with_kerberos5" != "no" ; then
339     for dir in /usr/kerberos /usr/local/krb5 /usr/athena
340     do
341       if test -f "$dir/include/krb5.h"
342       then
343         CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$dir/include"
344         LDEFLAGS="$LDEFLAGS -L$dir/lib"
345         if test -f "$dir/include/roken.h"
346         then
347            AC_DEFINE(HEIMDAL)
348            LIBS="$LIBS -lkrb5 -lasn1 -ldes -lcom_err"
349         else
350            LIBS="$LIBS -lkrb5 -lcrypto -lcom_err"
351         fi
352         with_kerberos5=$dir
353         break
354       fi
355     done
356   fi
357 fi
358
359 ###     use option --with-ssl to compile in the SSL support
360 AC_ARG_WITH(ssl,
361         [  --with-ssl[=DIR]        enable SSL support using libraries in DIR]
362         [with_ssl=$enableval],
363         [with_ssl=no])
364 test "$with_netsec" = "yes" && AC_DEFINE(SSL_ENABLE)
365
366 if test "$with_ssl" = "yes"
367 then
368 #       He didn't specify an SSL location.  Let's look at some common
369 #       directories where SSL has been found in the past and try and auto
370 #       configure for SSL.  OpenSSL determination will be made later.
371 #       This will screw up if an OpenSSL install is located in a later
372 #       directory than an older SSLeay install, but the user should fix that
373 #       anyways and he can override on the configure line.
374
375     for ac_dir in \
376       /usr/local/ssl \
377       /usr/ssl \
378       /local/ssl \
379       /opt/ssl \
380       ; \
381     do
382         if test -d "$ac_dir" ; then
383             with_ssl=$ac_dir
384             break;
385         fi
386     done
387 fi
388
389 if test -n "$with_ssl" -a "$with_ssl" != "no"
390 then
391     # With the autoconfigure above, the only time this is going to be
392     # true is going to be when we could not find the headers.  If they
393     # are not in system standard locations, we are going to be broken.
394     if test "$with_ssl" = "yes"
395     then
396 # Let's just define the standard location for the SSLeay root
397         with_ssl="/usr/local/ssl"
398     fi
399     if test -r $with_ssl/include/openssl/ssl.h
400     then
401 ###     ssl.h found under openssl.  Use openssl configuration preferentially
402         echo "Enabling OpenSSL support in $with_ssl"
403         CEFLAGS="$CEFLAGS -I$with_ssl/include -I$with_ssl/include/openssl"
404     else
405         echo "Enabling SSLeay support in $with_ssl"
406         CEFLAGS="$CEFLAGS -I$with_ssl/include"
407     fi
408     LDEFLAGS="$LDEFLAGS -L$with_ssl/lib"
409     LIBS="$LIBS -lssl -lcrypto"
410 else
411     echo 'Disabling SSL support...'
412 fi
413
414 ###     use option --with-kerberos=DIR to point at a Kerberos directory
415 AC_ARG_WITH(kerberos,
416         [  --with-kerberos=DIR     point fetchmail compilation at a Kerberos directory])
417
418 # The "elif" arm (nonempty $with_kerberos) is kind of a crock.  It works for
419 # configuring the BSD/OS Kerberos IV support, though. 
420
421 # Check for a NetBSD/OpenBSD special case
422 if test "$with_kerberos" = "yes" && test `uname` = "NetBSD" -o `uname` = "OpenBSD"
423 then
424   echo "Configuring kerberosIV for `uname`"
425   CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I/usr/include/kerberosIV"
426   LIBS="$LIBS -lkrb -ldes"
427 elif test -n "$with_kerberos" -a -n "$with_kerberos5"
428 then
429     CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos/include"
430     LDEFLAGS="$LDEFLAGS -L$with_kerberos/lib"
431     if test -f "$with_kerberos5/roken.h"
432     then
433        AC_DEFINE(HEIMDAL)
434        LIBS="-lkrb4 -l45 $LIBS" 
435     else
436        LIBS="-lkrb4 -ldes425 $LIBS"
437     fi
438 elif test -n "$with_kerberos5"
439 then
440     for dir in /usr/kerberos /usr/kerberosIV /usr/athena
441     do
442       if test -f "$dir/include/kerberosIV/krb.h"
443       then
444         CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$dir/include"
445         LDEFLAGS="$LDEFLAGS -L$dir/lib"
446         LIBS="-lkrb4 -ldes425 $LIBS"
447         break
448       fi
449     done
450 elif test -n "$with_kerberos" -a "$with_kerberos" != "no"
451 then
452     CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos/include"
453     LDEFLAGS="$LDEFLAGS -L$with_kerberos/lib"
454     LIBS="$LIBS -lkrb -ldes"
455 else
456   if test "$with_kerberos" != "no"
457   then
458     for dir in /usr/kerberos /usr/kerberosIV /usr/athena
459     do
460       if test -f "$dir/include/krb.h"
461       then
462         CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$dir/include"
463         LDEFLAGS="$LDEFLAGS -L$dir/lib"
464         LIBS="$LIBS -lkrb -ldes"
465         break
466       fi
467     done
468 fi
469
470 ###     use option --with-socks=DIR to point at SOCKS library
471 AC_ARG_WITH(socks,
472         [  --with-socks[=DIR]      add built-in SOCKS firewall access],
473 [
474 if test "$with_socks" != no
475 then
476     if test "$with_socks" != yes
477     then
478         LDEFLAGS="$LDEFLAGS -L$with_socks"
479     else
480         AC_CHECK_LIB(socks, Rconnect,,
481                AC_MSG_ERROR([could not find libsocks which is needed for built-in SOCKS support]))
482     fi
483     AC_DEFINE(HAVE_SOCKS)
484     CEFLAGS="$CEFLAGS -Dconnect=Rconnect -Dgetsockname=Rgetsockname -Dbind=Rbind -Daccept=Raccept -Dlisten=Rlisten -Dselect=Rselect"
485     LIBS="-lsocks $LIBS"
486 fi])
487
488 ###     use option --with-hesiod=DIR to point at a HESIOD directory
489 AC_ARG_WITH(hesiod,
490         [  --with-hesiod=DIR       point fetchmail compilation at a HESIOD directory])
491
492 if test -n "$with_hesiod"
493 then
494     # Path given
495     CEFLAGS="$CEFLAGS -DHESIOD -I$with_hesiod/include"
496     LDEFLAGS="$LDEFLAGS -L$with_hesiod/lib"
497     LIBS="$LIBS -lhesiod"
498 else
499     for dir in /usr/athena /usr /usr/local
500     do
501       if test -f "$dir/include/hesiod.h"
502       then
503         CEFLAGS="$CEFLAGS -DHESIOD -I$dir/include"
504         LDEFLAGS="$LDEFLAGS -L$dir/lib"
505         LIBS="$LIBS -lhesiod"
506         with_hesiod=$dir
507         break
508       fi
509     done
510   fi
511 fi
512
513 ###     use option --with-gssapi=DIR to compile in GSSAPI support
514 AC_ARG_WITH(gssapi,
515         [  --with-gssapi[=DIR]     compile in GSSAPI support using libraries in DIR],
516 [
517 if test "$with_gssapi" != "no"
518 then
519   if test "$with_gssapi" = "yes" -a -n "$with_kerberos5"
520   then
521     with_gssapi=$with_kerberos5
522   fi
523   if test "$with_gssapi" != "yes" -a -n "$with_gssapi"
524   then
525     CFLAGS="$CFLAGS -I$with_gssapi/include"
526     LDFLAGS="$LDFLAGS -L$with_gssapi/lib"
527   fi
528
529   AC_CHECK_LIB(krb5, krb5_init_context,,
530                AC_MSG_ERROR([could not find libkrb5 which is needed for GSSAPI support]))
531   if test -f "$with_kerberos5/include/roken.h"
532   then
533      AC_CHECK_LIB(gssapi, gss_init_sec_context,LIBS="$LIBS -lgssapi",
534                   AC_MSG_ERROR([could not find libgssapi which is needed for GSSAPI support]), )
535      AC_DEFINE(HEIMDAL)
536   else
537      AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context,LIBS="$LIBS -lgssapi_krb5",
538                   AC_MSG_ERROR([could not find libgssapi_krb5 which is needed for GSSAPI support]), -lkrb5)
539   fi
540   AC_DEFINE(GSSAPI)
541   save_CPPFLAGS=$CPPFLAGS
542   CPPFLAGS="-I$with_gssapi/include"
543   AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h gssapi/gssapi_generic.h)
544   if test "$ac_cv_header_gssapi_h" = "yes"; then
545     AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
546   else
547     AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
548   fi
549   CPPFLAGS=$save_CPPFLAGS
550 fi])
551
552 AC_OUTPUT([Makefile intl/Makefile po/Makefile.in], [
553         # The reason for this odd makedepend line is that we want
554         # to have all dependencies evaluated relative to the source directory
555         # and let VPATH do all the dirty work when we build remotely
556         echo "You can ignore any makedepend error messages:";
557         echo timestamp > stamp-h;
558         (cd $srcdir; makedepend -f - *.c) >>Makefile])
559
560 dnl Local Variables:
561 dnl comment-start: "dnl "
562 dnl comment-end: ""
563 dnl comment-start-skip: "\\bdnl\\b\\s *"
564 dnl compile-command: "make configure config.h.in"
565 dnl End: