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.113 1998/03/31 18:57:47 wessels Exp $
11 AC_CONFIG_HEADER(include/autoconf.h)
12 AC_REVISION($Revision: 1.113 $)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
327 HTCP_OBJS='$(HTCP_OBJS)'
333 AC_ARG_ENABLE(forw-via-db,
334 [ --enable-forw-via-db Enable Forw/Via database],
335 [ if test "$enableval" = "yes" ; then
336 echo "FORW-VIA enabled"
337 AC_DEFINE(FORW_VIA_DB)
341 # Force some compilers to use ANSI features
345 if test "$ac_cv_prog_CC" = "cc" ; then
346 echo "adding '-std1' to cc args for $host"
353 dnl Check for programs
358 AC_PATH_PROG(SH, sh, /bin/sh)
359 AC_PATH_PROG(FALSE, false, /usr/bin/false)
360 AC_PATH_PROG(TRUE, true, /usr/bin/true)
361 AC_PATH_PROG(RM, rm, $FALSE)
362 AC_PATH_PROG(MV, mv, $FALSE)
363 AC_PATH_PROG(MKDIR, mkdir, $FALSE)
364 AC_PATH_PROG(LN, ln, cp)
365 AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
366 AC_PATH_PROG(MAKEDEPEND, makedepend, $TRUE)
367 AC_PATH_PROG(AR, ar, $FALSE)
371 echo "Disabling 'ranlib' for HP-UX..."
385 dnl Check for headers
442 AC_CACHE_CHECK(if ANSI prototypes work,ac_cv_have_ansi_prototypes, [
443 AC_TRY_COMPILE([int foo(char *); int foo (char *bar) {return 1;}],
445 ac_cv_have_ansi_prototypes="yes",
446 ac_cv_have_ansi_prototypes="no")
448 if test $ac_cv_have_ansi_prototypes = "yes" ; then
449 AC_DEFINE(HAVE_ANSI_PROTOTYPES)
452 AC_CACHE_CHECK(for tm->tm_gmtoff,ac_cv_have_tm_gmoff, [
453 AC_TRY_COMPILE([#include <time.h>
454 #include <sys/time.h>],
457 ac_cv_have_tm_gmoff="yes",
458 ac_cv_have_tm_gmoff="no")
460 if test $ac_cv_have_tm_gmoff = "yes" ; then
461 AC_DEFINE(HAVE_TM_GMTOFF)
464 AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [
465 AC_TRY_COMPILE([#include <sys/types.h>
466 #include <malloc.h>],
467 [struct mallinfo foo;
469 ac_cv_have_ext_mallinfo="yes",
470 ac_cv_have_ext_mallinfo="no")
472 if test $ac_cv_have_ext_mallinfo = "yes" ; then
473 AC_DEFINE(HAVE_EXT_MALLINFO)
476 AC_CACHE_CHECK(for struct rusage,ac_cv_have_struct_rusage, [
479 #include <sys/time.h>
481 #if HAVE_SYS_RESOURCE_H
482 #include <sys/resource.h>
485 ac_cv_have_struct_rusage="yes",
486 ac_cv_have_struct_rusage="no")
488 if test $ac_cv_have_struct_rusage = "yes" ; then
489 AC_DEFINE(HAVE_STRUCT_RUSAGE)
492 AC_CACHE_CHECK(for ip->ip_hl, ac_cv_have_ip_hl, [
493 AC_TRY_COMPILE([#include <sys/types.h>
494 #include <netinet/in.h>
495 #include <netinet/in_systm.h>
496 #include <netinet/ip.h>
505 ac_cv_have_ip_hl="yes",
506 ac_cv_have_ip_hl="no")
508 if test $ac_cv_have_ip_hl = "yes" ; then
509 AC_DEFINE(HAVE_IP_HL)
512 dnl Check for typedefs
514 AC_CHECK_SIZEOF(long)
516 dnl Check for special functions
519 AC_CHECK_TYPE(pid_t, int)
520 AC_CHECK_TYPE(size_t, unsigned int)
521 AC_CHECK_TYPE(ssize_t, int)
522 AC_CHECK_TYPE(off_t, int)
523 AC_CHECK_TYPE(mode_t, u_short)
525 dnl Check for needed libraries
526 AC_CHECK_LIB(nsl, main)
527 AC_CHECK_LIB(socket, main)
528 AC_CHECK_LIB(gnumalloc, main)
529 if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
530 echo "Disabling extended malloc functions when using gnumalloc"
531 ac_cv_func_mallinfo=no
532 ac_cv_func_mallocblksize=no
533 ac_cv_func_mallopt=no
537 echo "skipping libmalloc check for $host"
540 echo "skipping libmalloc check for $host"
543 AC_CHECK_LIB(malloc, main)
547 AC_CHECK_LIB(bsd, main)
548 AC_CHECK_LIB(regex, main, [REGEXLIB="-lregex"])
551 echo "skipping libresolv checks for $host"
554 AC_CHECK_LIB(resolv, inet_aton, AC_CHECK_LIB(44bsd, inet_aton))
555 AC_CHECK_LIB(resolv, main)
558 AC_CHECK_LIB(m, main)
560 dnl Check for libcrypt
561 dnl We use crypt(3) which may be in libc, or in libcrypt (eg FreeBSD)
562 AC_CHECK_LIB(crypt, crypt, [CRYPTLIB="-lcrypt"])
565 dnl Check for pthreads
566 dnl We use pthreads when doing ASYNC I/O
567 AC_CHECK_LIB(pthread, main, [PTHREADLIB="-lpthread"])
570 dnl System-specific library modifications
574 if test "$GCC" = "yes"; then
575 echo "Removing -O for gcc on $host"
576 CFLAGS="`echo $CFLAGS | sed -e 's/-O[[0-9]]*//'`"
580 echo "Removing -lsocket for IRIX..."
581 LIBS=`echo $LIBS | sed -e s/-lsocket//`
582 echo "Removing -lnsl for IRIX..."
583 LIBS=`echo $LIBS | sed -e s/-lnsl//`
584 echo "Removing -lbsd for IRIX..."
585 LIBS=`echo $LIBS | sed -e s/-lbsd//`
587 dnl From: c0032033@ws.rz.tu-bs.de (Joerg Schumacher)
588 dnl Date: Thu, 17 Oct 1996 04:09:30 +0200
589 dnl Please change your configure script. AIX doesn't need -lbsd.
591 echo "Removing -lbsd for AIX..."
592 LIBS=`echo $LIBS | sed -e s/-lbsd//`
595 CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
596 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
598 [*-*-solaris2.[0-4]])
599 AC_DEFINE(GETTIMEOFDAY_NO_TZP)
603 # Recommended by Balint Nagy Endre <bne@CareNet.hu>
606 if test `uname -v` = "2.03"; then
607 echo "disabling mallinfo for $host"
608 ac_cv_func_mallinfo=no
614 dnl Check for library functions
652 # John Kay (jkay@nlanr.net) 19970818
653 echo "skipping poll() check for $host..."
658 echo "skipping poll() check for $host..."
666 dnl Yay! Another Linux brokenness. Its not good enough
667 dnl to know that setresuid() exists, because RedHat 5.0 declares
668 dnl setresuid() but doesn't implement it.
670 AC_CACHE_CHECK(if setresuid is implemented, ac_cv_func_setresuid,
674 if(setresuid(-1,-1,-1)) {
675 perror("setresuid:");
680 ],ac_cv_func_setresuid="yes",ac_cv_func_setresuid="no")
682 if test "$ac_cv_func_setresuid" = "yes" ; then
683 AC_DEFINE(HAVE_SETRESUID)
686 AC_MSG_CHECKING(if GNUregex needs to be compiled)
687 if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
693 [*-sun-solaris2.[0-4]])
700 AC_MSG_RESULT($USE_GNUREGEX)
701 if test "$USE_GNUREGEX" = "yes"; then
703 LIBREGEX="libregex.a"
704 AC_DEFINE(USE_GNUREGEX)
714 dnl Not cached since people are likely to tune this
715 AC_MSG_CHECKING(Default FD_SETSIZE value)
724 #include <sys/time.h>
726 #if HAVE_SYS_SELECT_H
727 #include <sys/select.h>
730 #include <sys/types.h>
733 fprintf (fopen("conftestval", "w"), "%d\n", FD_SETSIZE);
737 DEFAULT_FD_SETSIZE=`cat conftestval`,
738 DEFAULT_FD_SETSIZE=256,
739 DEFAULT_FD_SETSIZE=256)
740 AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
741 AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE)
743 dnl Not cached since people are likely to tune this
744 AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
748 #include <sys/time.h> /* needed on FreeBSD */
749 #include <sys/param.h>
750 #include <sys/resource.h>
755 #if defined(RLIMIT_NOFILE)
756 if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
757 perror("getrlimit: RLIMIT_NOFILE");
759 rl.rlim_cur = rl.rlim_max; /* set it to the max */
760 if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
761 perror("setrlimit: RLIMIT_NOFILE");
764 #elif defined(RLIMIT_OFILE)
765 if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
766 perror("getrlimit: RLIMIT_OFILE");
768 rl.rlim_cur = rl.rlim_max; /* set it to the max */
769 if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
770 perror("setrlimit: RLIMIT_OFILE");
773 #endif /* RLIMIT_NOFILE */
774 #endif /* HAVE_SETRLIMIT */
775 #if HAVE_SYSCONF && defined(_SC_OPEN_MAX)
776 i = sysconf(_SC_OPEN_MAX);
777 #elif HAVE_GETDTABLESIZE && !defined(__linux__)
779 #elif defined(OPEN_MAX)
781 #elif defined(NOFILE)
783 #elif defined(_NFILE)
786 while((j=open("/dev/null", 0)) > 0) i=j;
787 close(i); close(i-1);
790 fprintf (fopen("conftestval", "w"), "%d\n", i);
794 SQUID_MAXFD=`cat conftestval`,
797 AC_MSG_RESULT($SQUID_MAXFD)
798 AC_DEFINE_UNQUOTED(SQUID_MAXFD, $SQUID_MAXFD)
800 dnl Not cached since people are likely to tune this
801 AC_MSG_CHECKING(Default UDP send buffer size)
805 #include <sys/types.h>
806 #include <sys/socket.h>
807 #include <netinet/in.h>
810 int fd,val=0,len=sizeof(int);
811 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
812 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
814 fprintf (fopen("conftestval", "w"), "%d\n", val);
818 SQUID_UDP_SO_SNDBUF=`cat conftestval`,
819 SQUID_UDP_SO_SNDBUF=16384,
820 SQUID_UDP_SO_SNDBUF=16384)
821 AC_MSG_RESULT($SQUID_UDP_SO_SNDBUF)
822 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_SNDBUF, $SQUID_UDP_SO_SNDBUF)
824 dnl Not cached since people are likely to tune this
825 AC_MSG_CHECKING(Default UDP receive buffer size)
829 #include <sys/types.h>
830 #include <sys/socket.h>
831 #include <netinet/in.h>
834 int fd,val=0,len=sizeof(int);
835 if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
836 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
837 if (val <= 0) exit(1);
838 fprintf (fopen("conftestval", "w"), "%d\n", val);
842 SQUID_UDP_SO_RCVBUF=`cat conftestval`,
843 SQUID_UDP_SO_RCVBUF=16384,
844 SQUID_UDP_SO_RCVBUF=16384)
845 AC_MSG_RESULT($SQUID_UDP_SO_RCVBUF)
846 AC_DEFINE_UNQUOTED(SQUID_UDP_SO_RCVBUF, $SQUID_UDP_SO_RCVBUF)
848 dnl Not cached since people are likely to tune this
849 AC_MSG_CHECKING(Default TCP send buffer size)
853 #include <sys/types.h>
854 #include <sys/socket.h>
855 #include <netinet/in.h>
858 int fd,val=0,len=sizeof(int);
859 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
860 if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
861 if (val <= 0) exit(1);
862 fprintf (fopen("conftestval", "w"), "%d\n", val);
866 SQUID_TCP_SO_SNDBUF=`cat conftestval`,
867 SQUID_TCP_SO_SNDBUF=16384,
868 SQUID_TCP_SO_SNDBUF=16384)
869 AC_MSG_RESULT($SQUID_TCP_SO_SNDBUF)
870 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_SNDBUF, $SQUID_TCP_SO_SNDBUF)
872 dnl Not cached since people are likely to tune this
873 AC_MSG_CHECKING(Default TCP receive buffer size)
877 #include <sys/types.h>
878 #include <sys/socket.h>
879 #include <netinet/in.h>
882 int fd,val=0,len=sizeof(int);
883 if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
884 if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
885 if (val <= 0) exit(1);
886 fprintf (fopen("conftestval", "w"), "%d\n", val);
890 SQUID_TCP_SO_RCVBUF=`cat conftestval`,
891 SQUID_TCP_SO_RCVBUF=16384,
892 SQUID_TCP_SO_RCVBUF=16384)
893 AC_MSG_RESULT($SQUID_TCP_SO_RCVBUF)
894 AC_DEFINE_UNQUOTED(SQUID_TCP_SO_RCVBUF, $SQUID_TCP_SO_RCVBUF)
896 AC_CACHE_CHECK(if sys_errlist is already defined, ac_cv_needs_sys_errlist,
897 AC_TRY_COMPILE([#include <stdio.h>],[char *s = sys_errlist[0];],
898 ac_cv_needs_sys_errlist="no",
899 ac_cv_needs_sys_errlist="yes")
901 if test "$ac_cv_needs_sys_errlist" = "yes" ; then
902 AC_DEFINE(NEED_SYS_ERRLIST)
905 dnl Not cached since people are likely to change this
906 AC_MSG_CHECKING(for libresolv _dns_ttl_ hack)
907 AC_TRY_LINK(extern int _dns_ttl_;,return _dns_ttl_;,
909 AC_DEFINE(LIBRESOLV_DNS_TTL_HACK)],
912 dnl Need the debugging version of malloc if available
914 if test "$ac_cv_lib_malloc_main" = "yes" ; then
915 if test -r /usr/lib/debug/malloc.o ; then
916 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
918 if test -r /usr/lib/debug/mallocmap.o ; then
919 XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
925 if test -z "$XTRA_LIBS"; then
931 dnl Clean up after OSF/1 core dump bug