2 dnl Configuration input file for Squid
4 dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
6 dnl $Id: configure.in,v 1.111 1998/03/28 04:33:38 wessels Exp $
11 AC_CONFIG_HEADER(include/autoconf.h)
12 AC_REVISION($Revision: 1.111 $)dnl
13 AC_PREFIX_DEFAULT(/usr/local/squid)
14 AC_CONFIG_AUX_DIR(cfgaux)
20 LIBREGEX='' # libregex.a
22 dnl use directory structure of cached as default (hack)
23 if test "$libexecdir" = '${exec_prefix}/libexec'; then
24 libexecdir='${bindir}'
25 localstatedir='${prefix}'
29 if test -z "$CACHE_HTTP_PORT"; then
30 CACHE_HTTP_PORT="3128"
32 if test -z "$CACHE_ICP_PORT"; then
37 AC_SUBST(CACHE_HTTP_PORT)
38 AC_SUBST(CACHE_ICP_PORT)
40 AC_DEFINE_UNQUOTED(CONFIG_HOST_TYPE, "$host")
42 dnl Set default LDFLAGS
43 if test -z "$LDFLAGS"; then
47 PRESET_CFLAGS="$CFLAGS"
52 dnl Warn if not using GNU cc
53 dnl if test $ac_cv_prog_gcc = no; then
54 dnl echo '**************************************************************';
55 dnl echo '**************************************************************';
57 dnl echo '** WARNING: Squid is only guaranteed to compile with GNU cc.';
58 dnl echo "** Currently, you're using $CC";
60 dnl echo '**************************************************************';
61 dnl echo '**************************************************************';
65 dnl Gerben Wierda <Gerben_Wierda@RnA.nl>
68 CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
72 dnl Set Default CFLAGS
73 if test -z "$PRESET_CFLAGS"; then
74 if test "$GCC" = "yes"; then
77 # sunos has too many warnings for this to be useful
81 # Motorola cc/ld does not like -02 but is ok on -O
82 CFLAGS=`echo $CFLAGS | sed -e 's/-O[0-9]/-O/'`
85 CFLAGS="$CFLAGS -Wall"
92 if test -z "$PRESET_LDFLAGS"; then
93 if test "$GCC" = "yes"; then
102 dnl Enable optional modules
103 AC_ARG_ENABLE(dlmalloc,
104 [ --enable-dlmalloc Compile & use the malloc package by Doug Lea],
106 if test "$enableval" = "yes" ; then
107 LIBDLMALLOC="libdlmalloc.a"
108 LIB_MALLOC="-L../lib -ldlmalloc"
109 ac_cv_func_mallinfo="yes"
110 ac_cv_func_mallocblksize="no"
111 ac_cv_func_free="yes"
112 ac_cv_func_realloc="yes"
113 ac_cv_func_memalign="yes"
114 ac_cv_func_valloc="yes"
115 ac_cv_func_pvalloc="yes"
116 ac_cv_func_calloc="yes"
117 ac_cv_func_cfree="yes"
118 ac_cv_func_malloc_trim="yes"
119 ac_cv_func_malloc_usable_size="yes"
120 ac_cv_func_malloc_stats="yes"
121 ac_cv_func_mallinfo="yes"
122 ac_cv_func_mallopt="yes"
123 ac_cv_lib_gnumalloc="no"
124 ac_cv_lib_malloc="no"
125 ac_cv_enabled_dlmalloc="yes"
126 echo "dlmalloc build enabled"
127 elif test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
128 # Ok. dlmalloc was enabled before, but now disabled.
129 # we have to test these again
130 unset ac_cv_func_mallinfo
131 unset ac_cv_func_mallocblksize
132 unset ac_cv_func_free
133 unset ac_cv_func_realloc
134 unset ac_cv_func_memalign
135 unset ac_cv_func_valloc
136 unset ac_cv_func_pvalloc
137 unset ac_cv_func_calloc
138 unset ac_cv_func_cfree
139 unset ac_cv_func_malloc_trim
140 unset ac_cv_func_malloc_usable_size
141 unset ac_cv_func_malloc_stats
142 unset ac_cv_func_mallinfo
143 unset ac_cv_func_mallopt
144 unset ac_cv_lib_gnumalloc
145 unset ac_cv_lib_malloc
146 unset ac_cv_enabled_dlmalloc
149 if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
150 # Ok. dlmalloc was enabled before, but now disabled.
151 # we have to test these again
152 unset ac_cv_func_mallinfo
153 unset ac_cv_func_mallocblksize
154 unset ac_cv_func_free
155 unset ac_cv_func_realloc
156 unset ac_cv_func_memalign
157 unset ac_cv_func_valloc
158 unset ac_cv_func_pvalloc
159 unset ac_cv_func_calloc
160 unset ac_cv_func_cfree
161 unset ac_cv_func_malloc_trim
162 unset ac_cv_func_malloc_usable_size
163 unset ac_cv_func_malloc_stats
164 unset ac_cv_func_mallinfo
165 unset ac_cv_func_mallopt
166 unset ac_cv_lib_gnumalloc
167 unset ac_cv_lib_malloc
168 unset ac_cv_enabled_dlmalloc
171 AC_SUBST(LIBDLMALLOC)
174 AC_ARG_ENABLE(gnuregex,
175 [ --enable-gnuregex Compile GNUregex],
176 [USE_GNUREGEX=$enableval])
178 AC_ARG_ENABLE(acltree,
179 [ --enable-acltree[=bin|splay]
180 Use tree function to store ACL lists],
181 [ case "$enableval" in
183 echo "ACL lists using SPLAY trees"
184 AC_DEFINE(USE_SPLAY_TREE)
187 echo "ACL lists using BIN trees"
188 AC_DEFINE(USE_BIN_TREE)
194 AC_ARG_ENABLE(xmalloc_debug,
195 [ --enable-xmalloc-debug Do some simple malloc debugging],
196 [ if test "$enableval" = "yes" ; then
197 echo "Malloc debugging enabled"
198 AC_DEFINE(XMALLOC_DEBUG)
202 AC_ARG_ENABLE(xmalloc_debug_trace,
203 [ --enable-xmalloc-debug-trace
204 Detailed trace of memory allocations],
205 [ if test "$enableval" = "yes" ; then
206 echo "Malloc debug trace enabled"
207 AC_DEFINE(XMALLOC_TRACE)
208 AC_DEFINE(XMALLOC_DEBUG)
212 AC_ARG_ENABLE(xmalloc_statistics,
213 [ --enable-xmalloc-statistics
214 Show malloc statistics in status page],
215 [ if test "$enableval" = "yes" ; then
216 echo "Malloc statistics enabled"
217 AC_DEFINE(XMALLOC_STATISTICS)
221 AC_ARG_ENABLE(async_io,
222 [ --enable-async-io Do ASYNC disk I/O using threads],
223 [ if test "$enableval" = "yes" ; then
224 echo "Async I/O enabled"
225 AC_DEFINE(USE_ASYNC_IO)
226 ASYNC_OBJS='$(ASYNC_OBJS)'
227 SQUID_PTHREAD_LIB='$(PTHREADLIB)'
228 CFLAGS="$CFLAGS -D_REENTRANT"
232 AC_SUBST(SQUID_PTHREAD_LIB)
235 [ --enable-icmp Enable ICMP pinging],
236 [ if test "$enableval" = "yes" ; then
242 AC_ARG_ENABLE(delay_hack,
243 [ --enable-delay-hack Enable delay hack to limit bandwith usage],
244 [ if test "$enableval" = "yes" ; then
245 echo "Delay hack enabled"
246 AC_DEFINE(DELAY_HACK)
250 AC_ARG_ENABLE(mem-gen-trace,
251 [ --enable-mem-gen-trace Do trace of memory stuff],
252 [ if test "$enableval" = "yes" ; then
253 echo "Memory trace (to file) enabled"
254 AC_DEFINE(MEM_GEN_TRACE)
258 AC_ARG_ENABLE(useragent_log,
259 [ --enable-useragent-log Enable logging of User-Agent header],
260 [ if test "$enableval" = "yes" ; then
261 echo "User-Agent logging enabled"
262 AC_DEFINE(USE_USERAGENT_LOG)
266 AC_ARG_ENABLE(kill_parent_hack,
267 [ --enable-kill-parent-hack
268 Kill parent on shutdown],
269 [ if test "$enableval" = "yes" ; then
270 echo "Kill parent on shutdown"
271 AC_DEFINE(KILL_PARENT_OPT)
276 [ --enable-snmp Enable SNMP monitoring],
277 [ if test "$enableval" = "yes" ; then
278 echo "SNMP monitoring enabled"
279 AC_DEFINE(SQUID_SNMP)
280 SNMPLIB='-L../snmplib -lsnmp'
281 SNMP_OBJS='$(SNMP_OBJS)'
287 AC_SUBST(makesnmplib)
289 AC_ARG_ENABLE(time_hack,
290 [ --enable-time-hack Update internal timestamp only once per second],
291 [ if test "$enableval" = "yes" ; then
292 echo "Update internal timestamp only once per second"
293 AC_DEFINE(ALARM_UPDATES_TIME)
297 AC_ARG_ENABLE(cachemgr_hostname,
298 [ --enable-cachemgr-hostname[=hostname]
299 Make cachemgr.cgi default to this host],
302 AC_DEFINE(CACHEMGR_HOSTNAME,[getfullhostname()])
303 echo "Cachemgr default hostname == host where cachemgr runs"
309 AC_DEFINE_UNQUOTED(CACHEMGR_HOSTNAME,"${enableval}")
310 echo "Cachemgr default hostname set to ${enableval}"
315 AC_ARG_ENABLE(arp_acl,
316 [ --enable-arp-acl Enable use of ARP ACL lists (ether address)],
317 [ if test "$enableval" = "yes" ; then
318 echo "ARP ACL lists enabled (ether address)"
319 AC_DEFINE(USE_ARP_ACL)
324 [ --enable-htpc Enable HTCP protocol],
325 [ if test "$enableval" = "yes" ; then
331 # Force some compilers to use ANSI features
335 if test "$ac_cv_prog_CC" = "cc" ; then
336 echo "adding '-std1' to cc args for $host"
343 dnl Check for programs
348 AC_PATH_PROG(SH, sh, /bin/sh)
349 AC_PATH_PROG(FALSE, false, /usr/bin/false)
350 AC_PATH_PROG(TRUE, true, /usr/bin/true)
351 AC_PATH_PROG(RM, rm, $FALSE)
352 AC_PATH_PROG(MV, mv, $FALSE)
353 AC_PATH_PROG(MKDIR, mkdir, $FALSE)
354 AC_PATH_PROG(LN, ln, cp)
355 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
356 AC_PATH_PROG(MAKEDEPEND, makedepend, $TRUE)
357 AC_PATH_PROG(AR, ar, $FALSE)
361 echo "Disabling 'ranlib' for HP-UX..."
375 dnl Check for headers
432 AC_CACHE_CHECK(if ANSI prototypes work,ac_cv_have_ansi_prototypes, [
433 AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}],
435 ac_cv_have_ansi_prototypes="yes",
436 ac_cv_have_ansi_prototypes="no")
438 if test $ac_cv_have_ansi_prototypes = "yes" ; then
439 AC_DEFINE(HAVE_ANSI_PROTOTYPES)
442 AC_CACHE_CHECK(for tm->tm_gmtoff,ac_cv_have_tm_gmoff, [
443 AC_TRY_COMPILE([#include <time.h>
444 #include <sys/time.h>],
447 ac_cv_have_tm_gmoff="yes",
448 ac_cv_have_tm_gmoff="no")
450 if test $ac_cv_have_tm_gmoff = "yes" ; then
451 AC_DEFINE(HAVE_TM_GMTOFF)
454 AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [
455 AC_TRY_COMPILE([#include <sys/types.h>
456 #include <malloc.h>],
457 [struct mallinfo foo;
459 ac_cv_have_ext_mallinfo="yes",
460 ac_cv_have_ext_mallinfo="no")
462 if test $ac_cv_have_ext_mallinfo = "yes" ; then
463 AC_DEFINE(HAVE_EXT_MALLINFO)
466 AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [
469 #include <sys/time.h>
471 #if HAVE_SYS_RESOURCE_H
472 #include <sys/resource.h>
475 ac_cv_have_struct_rusage="yes",
476 ac_cv_have_struct_rusage="no")
478 if test $ac_cv_have_struct_rusage = "yes" ; then
479 AC_DEFINE(HAVE_STRUCT_RUSAGE)
482 AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [
483 AC_TRY_COMPILE([#include <sys/types.h>
484 #include <netinet/in.h>
485 #include <netinet/in_systm.h>
486 #include <netinet/ip.h>
495 ac_cv_have_ip_hl="yes",
496 ac_cv_have_ip_hl="no")
498 if test $ac_cv_have_ip_hl = "yes" ; then
499 AC_DEFINE(HAVE_IP_HL)
502 dnl Check for typedefs
504 AC_CHECK_SIZEOF(long)
506 dnl Check for special functions
509 AC_CHECK_TYPE(pid_t, int)
510 AC_CHECK_TYPE(size_t, unsigned int)
511 AC_CHECK_TYPE(ssize_t, int)
512 AC_CHECK_TYPE(off_t, int)
513 AC_CHECK_TYPE(mode_t, u_short)
515 dnl Check for needed libraries
516 AC_CHECK_LIB(nsl, main)
517 AC_CHECK_LIB(socket, main)
518 AC_CHECK_LIB(gnumalloc, main)
519 if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
520 echo "Disabling extended malloc functions when using gnumalloc"
521 ac_cv_func_mallinfo=no
522 ac_cv_func_mallocblksize=no
523 ac_cv_func_mallopt=no
527 echo "skipping libmalloc check for $host"
530 echo "skipping libmalloc check for $host"
533 AC_CHECK_LIB(malloc, main)
537 AC_CHECK_LIB(bsd, main)
538 AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
541 echo "skipping libresolv checks for $host"
544 AC_CHECK_LIB(resolv, inet_aton, AC_CHECK_LIB(44bsd, inet_aton))
545 AC_CHECK_LIB(resolv, main)
548 AC_CHECK_LIB(m, main)
550 dnl Check for libcrypt
551 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
552 AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
555 dnl Check for pthreads
556 dnl We use pthreads when doing ASYNC I/O
557 AC_CHECK_LIB(pthread, main, [PTHREADLIB="-lpthread"])
560 dnl System-specific library modifications
564 if test "$GCC" = "yes"; then
565 echo "Removing -O for gcc on $host"
566 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
570 echo "Removing -lsocket for IRIX..."
571 LIBS=`echo $LIBS | sed -e s/-lsocket//`
572 echo "Removing -lnsl for IRIX..."
573 LIBS=`echo $LIBS | sed -e s/-lnsl//`
574 echo "Removing -lbsd for IRIX..."
575 LIBS=`echo $LIBS | sed -e s/-lbsd//`
577 dnl From: c0032033@ws.rz.tu-bs.de (Joerg Schumacher)
578 dnl Date: Thu, 17 Oct 1996 04:09:30 +0200
579 dnl Please change your configure script. AIX doesn't need -lbsd.
581 echo "Removing -lbsd for AIX..."
582 LIBS=`echo $LIBS | sed -e s/-lbsd//`
585 CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
586 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
588 [*-*-solaris2.[0-4]])
589 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
593 # Recommended by Balint Nagy Endre <bne@CareNet.hu>
596 if test `uname -v` = "2.03"; then
597 echo "disabling mallinfo for $host"
598 ac_cv_func_mallinfo=no
604 dnl Check for library functions
642 # John Kay (jkay@nlanr.net) 19970818
643 echo "skipping poll() check for $host..."
648 echo "skipping poll() check for $host..."
656 dnl Yay! Another Linux brokenness. Its not good enough
657 dnl to know that setresuid() exists, because RedHat 5.0 declares
658 dnl setresuid() but doesn't implement it.
660 AC_CACHE_CHECK(if setresuid is implemented, ac_cv_func_setresuid,
664 if(setresuid(-1,-1,-1)) {
665 perror("setresuid:");
670 ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no")
672 if test "$ac_cv_func_setresuid" = "yes" ; then
673 AC_DEFINE(HAVE_SETRESUID)
676 AC_MSG_CHECKING(if GNUregex needs to be compiled)
677 if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
683 [*-sun-solaris2.[0-4]])
690 AC_MSG_RESULT($USE_GNUREGEX)
691 if test "$USE_GNUREGEX" = "yes"; then
693 LIBREGEX="libregex.a"
694 AC_DEFINE(USE_GNUREGEX)
704 dnl Not cached since people are likely to tune this
705 AC_MSG_CHECKING(Default FD_SETSIZE value)
714 #include <sys/time.h>
716 #if HAVE_SYS_SELECT_H
717 #include <sys/select.h>
720 #include <sys/types.h>
723 fprintf (fopen("conftestval", "w"), "%d\n", FD_SETSIZE);
727 DEFAULT_FD_SETSIZE=`cat conftestval`,
728 DEFAULT_FD_SETSIZE=256,
729 DEFAULT_FD_SETSIZE=256)
730 AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
731 AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE)
733 dnl Not cached since people are likely to tune this
734 AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
738 #include <sys/time.h> /* needed on FreeBSD */
739 #include <sys/param.h>
740 #include <sys/resource.h>
745 #if defined(RLIMIT_NOFILE)
746 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
747 perror("getrlimit: RLIMIT_NOFILE");
749 rl.rlim_cur = rl.rlim_max; /* set it to the max */
750 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
751 perror("setrlimit: RLIMIT_NOFILE");
754 #elif defined(RLIMIT_OFILE)
755 if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
756 perror("getrlimit: RLIMIT_OFILE");
758 rl.rlim_cur = rl.rlim_max; /* set it to the max */
759 if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
760 perror("setrlimit: RLIMIT_OFILE");
763 #endif /* RLIMIT_NOFILE */
764 #endif /* HAVE_SETRLIMIT */
765 #if HAVE_SYSCONF && defined(_SC_OPEN_MAX)
766 i = sysconf(_SC_OPEN_MAX);
767 #elif HAVE_GETDTABLESIZE && !defined(__linux__)
769 #elif defined(OPEN_MAX)
771 #elif defined(NOFILE)
773 #elif defined(_NFILE)
776 while((j=open("/dev/null", 0)) > 0) i=j;
777 close(i); close(i-1);
780 fprintf (fopen("conftestval", "w"), "%d\n", i);
784 SQUID_MAXFD=`cat conftestval`,
787 AC_MSG_RESULT($SQUID_MAXFD)
788 AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
790 dnl Not cached since people are likely to tune this
791 AC_MSG_CHECKING(Default UDP send buffer size)
795 #include <sys/types.h>
796 #include <sys/socket.h>
797 #include <netinet/in.h>
800 int fd,val=0,len=sizeof(int);
801 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
802 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
804 fprintf (fopen("conftestval", "w"), "%d\n", val);
808 SQUID_UDP_SO_SNDBUF=`cat conftestval`,
809 SQUID_UDP_SO_SNDBUF=16384,
810 SQUID_UDP_SO_SNDBUF=16384)
811 AC_MSG_RESULT($SQUID_UDP_SO_SNDBUF)
812 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_SNDBUF, $SQUID_UDP_SO_SNDBUF)
814 dnl Not cached since people are likely to tune this
815 AC_MSG_CHECKING(Default UDP receive buffer size)
819 #include <sys/types.h>
820 #include <sys/socket.h>
821 #include <netinet/in.h>
824 int fd,val=0,len=sizeof(int);
825 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
826 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
827 if (val <= 0) exit(1);
828 fprintf (fopen("conftestval", "w"), "%d\n", val);
832 SQUID_UDP_SO_RCVBUF=`cat conftestval`,
833 SQUID_UDP_SO_RCVBUF=16384,
834 SQUID_UDP_SO_RCVBUF=16384)
835 AC_MSG_RESULT($SQUID_UDP_SO_RCVBUF)
836 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_RCVBUF, $SQUID_UDP_SO_RCVBUF)
838 dnl Not cached since people are likely to tune this
839 AC_MSG_CHECKING(Default TCP send buffer size)
843 #include <sys/types.h>
844 #include <sys/socket.h>
845 #include <netinet/in.h>
848 int fd,val=0,len=sizeof(int);
849 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
850 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
851 if (val <= 0) exit(1);
852 fprintf (fopen("conftestval", "w"), "%d\n", val);
856 SQUID_TCP_SO_SNDBUF=`cat conftestval`,
857 SQUID_TCP_SO_SNDBUF=16384,
858 SQUID_TCP_SO_SNDBUF=16384)
859 AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF)
860 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF)
862 dnl Not cached since people are likely to tune this
863 AC_MSG_CHECKING(Default TCP receive buffer size)
867 #include <sys/types.h>
868 #include <sys/socket.h>
869 #include <netinet/in.h>
872 int fd,val=0,len=sizeof(int);
873 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
874 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
875 if (val <= 0) exit(1);
876 fprintf (fopen("conftestval", "w"), "%d\n", val);
880 SQUID_TCP_SO_RCVBUF=`cat conftestval`,
881 SQUID_TCP_SO_RCVBUF=16384,
882 SQUID_TCP_SO_RCVBUF=16384)
883 AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF)
884 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF)
886 AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist,
887 AC_TRY_COMPILE([#include <stdio.h>],[char *s = sys_errlist[0];],
888 ac_cv_needs_sys_errlist="no",
889 ac_cv_needs_sys_errlist="yes")
891 if test "$ac_cv_needs_sys_errlist" = "yes" ; then
892 AC_DEFINE(NEED_SYS_ERRLIST)
895 dnl Not cached since people are likely to change this
896 AC_MSG_CHECKING(for libresolv _dns_ttl_ hack)
897 AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;,
899 AC_DEFINE(LIBRESOLV_DNS_TTL_HACK)],
902 dnl Need the debugging version of malloc if available
904 if test "$ac_cv_lib_malloc_main" = "yes" ; then
905 if test -r /usr/lib/debug/malloc.o ; then
906 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
908 if test -r /usr/lib/debug/mallocmap.o ; then
909 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
915 if test -z "$XTRA_LIBS"; then
921 dnl Clean up after OSF/1 core dump bug