/[cvs]/eggdrop1.6/configure
ViewVC logotype

Contents of /eggdrop1.6/configure

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.19 - (show annotations) (download)
Sun Jan 9 14:59:28 2000 UTC (20 years, 5 months ago) by fabian
Branch: MAIN
Changes since 1.18: +2 -2 lines
resync with 1.4, a few 1.5 specific additions

1 #! /bin/sh
2
3 # From configure.in Revision
4 # Guess values for system-dependent variables and create Makefiles.
5 # Generated automatically using autoconf version 2.13
6 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Defaults:
12 ac_help=
13 ac_default_prefix=/usr/local
14 # Any additions from configure.in:
15 ac_default_prefix=\${HOME}/eggdrop
16 ac_help="$ac_help
17 --with-tcllib=PATH full path to tcl library"
18 ac_help="$ac_help
19 --with-tclinc=PATH full path to tcl header"
20
21 # Initialize some variables set by options.
22 # The variables have the same names as the options, with
23 # dashes changed to underlines.
24 build=NONE
25 cache_file=./config.cache
26 exec_prefix=NONE
27 host=NONE
28 no_create=
29 nonopt=NONE
30 no_recursion=
31 prefix=NONE
32 program_prefix=NONE
33 program_suffix=NONE
34 program_transform_name=s,x,x,
35 silent=
36 site=
37 srcdir=
38 target=NONE
39 verbose=
40 x_includes=NONE
41 x_libraries=NONE
42 bindir='${exec_prefix}/bin'
43 sbindir='${exec_prefix}/sbin'
44 libexecdir='${exec_prefix}/libexec'
45 datadir='${prefix}/share'
46 sysconfdir='${prefix}/etc'
47 sharedstatedir='${prefix}/com'
48 localstatedir='${prefix}/var'
49 libdir='${exec_prefix}/lib'
50 includedir='${prefix}/include'
51 oldincludedir='/usr/include'
52 infodir='${prefix}/info'
53 mandir='${prefix}/man'
54
55 # Initialize some other variables.
56 subdirs=
57 MFLAGS= MAKEFLAGS=
58 SHELL=${CONFIG_SHELL-/bin/sh}
59 # Maximum number of lines to put in a shell here document.
60 ac_max_here_lines=12
61
62 ac_prev=
63 for ac_option
64 do
65
66 # If the previous option needs an argument, assign it.
67 if test -n "$ac_prev"; then
68 eval "$ac_prev=\$ac_option"
69 ac_prev=
70 continue
71 fi
72
73 case "$ac_option" in
74 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
75 *) ac_optarg= ;;
76 esac
77
78 # Accept the important Cygnus configure options, so we can diagnose typos.
79
80 case "$ac_option" in
81
82 -bindir | --bindir | --bindi | --bind | --bin | --bi)
83 ac_prev=bindir ;;
84 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
85 bindir="$ac_optarg" ;;
86
87 -build | --build | --buil | --bui | --bu)
88 ac_prev=build ;;
89 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90 build="$ac_optarg" ;;
91
92 -cache-file | --cache-file | --cache-fil | --cache-fi \
93 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
94 ac_prev=cache_file ;;
95 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
96 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
97 cache_file="$ac_optarg" ;;
98
99 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
100 ac_prev=datadir ;;
101 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
102 | --da=*)
103 datadir="$ac_optarg" ;;
104
105 -disable-* | --disable-*)
106 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
107 # Reject names that are not valid shell variable names.
108 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
109 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
110 fi
111 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
112 eval "enable_${ac_feature}=no" ;;
113
114 -enable-* | --enable-*)
115 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
116 # Reject names that are not valid shell variable names.
117 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
118 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
119 fi
120 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
121 case "$ac_option" in
122 *=*) ;;
123 *) ac_optarg=yes ;;
124 esac
125 eval "enable_${ac_feature}='$ac_optarg'" ;;
126
127 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
128 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
129 | --exec | --exe | --ex)
130 ac_prev=exec_prefix ;;
131 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
132 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
133 | --exec=* | --exe=* | --ex=*)
134 exec_prefix="$ac_optarg" ;;
135
136 -gas | --gas | --ga | --g)
137 # Obsolete; use --with-gas.
138 with_gas=yes ;;
139
140 -help | --help | --hel | --he)
141 # Omit some internal or obsolete options to make the list less imposing.
142 # This message is too long to be a string in the A/UX 3.1 sh.
143 cat << EOF
144 Usage: configure [options] [host]
145 Options: [defaults in brackets after descriptions]
146 Configuration:
147 --cache-file=FILE cache test results in FILE
148 --help print this message
149 --no-create do not create output files
150 --quiet, --silent do not print \`checking...' messages
151 --version print the version of autoconf that created configure
152 Directory and file names:
153 --prefix=PREFIX install architecture-independent files in PREFIX
154 [$ac_default_prefix]
155 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
156 [same as prefix]
157 --bindir=DIR user executables in DIR [EPREFIX/bin]
158 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
159 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
160 --datadir=DIR read-only architecture-independent data in DIR
161 [PREFIX/share]
162 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
163 --sharedstatedir=DIR modifiable architecture-independent data in DIR
164 [PREFIX/com]
165 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
166 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
167 --includedir=DIR C header files in DIR [PREFIX/include]
168 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
169 --infodir=DIR info documentation in DIR [PREFIX/info]
170 --mandir=DIR man documentation in DIR [PREFIX/man]
171 --srcdir=DIR find the sources in DIR [configure dir or ..]
172 --program-prefix=PREFIX prepend PREFIX to installed program names
173 --program-suffix=SUFFIX append SUFFIX to installed program names
174 --program-transform-name=PROGRAM
175 run sed PROGRAM on installed program names
176 EOF
177 cat << EOF
178 Host type:
179 --build=BUILD configure for building on BUILD [BUILD=HOST]
180 --host=HOST configure for HOST [guessed]
181 --target=TARGET configure for TARGET [TARGET=HOST]
182 Features and packages:
183 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
184 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
185 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
186 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
187 --x-includes=DIR X include files are in DIR
188 --x-libraries=DIR X library files are in DIR
189 EOF
190 if test -n "$ac_help"; then
191 echo "--enable and --with options recognized:$ac_help"
192 fi
193 exit 0 ;;
194
195 -host | --host | --hos | --ho)
196 ac_prev=host ;;
197 -host=* | --host=* | --hos=* | --ho=*)
198 host="$ac_optarg" ;;
199
200 -includedir | --includedir | --includedi | --included | --include \
201 | --includ | --inclu | --incl | --inc)
202 ac_prev=includedir ;;
203 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
204 | --includ=* | --inclu=* | --incl=* | --inc=*)
205 includedir="$ac_optarg" ;;
206
207 -infodir | --infodir | --infodi | --infod | --info | --inf)
208 ac_prev=infodir ;;
209 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
210 infodir="$ac_optarg" ;;
211
212 -libdir | --libdir | --libdi | --libd)
213 ac_prev=libdir ;;
214 -libdir=* | --libdir=* | --libdi=* | --libd=*)
215 libdir="$ac_optarg" ;;
216
217 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
218 | --libexe | --libex | --libe)
219 ac_prev=libexecdir ;;
220 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
221 | --libexe=* | --libex=* | --libe=*)
222 libexecdir="$ac_optarg" ;;
223
224 -localstatedir | --localstatedir | --localstatedi | --localstated \
225 | --localstate | --localstat | --localsta | --localst \
226 | --locals | --local | --loca | --loc | --lo)
227 ac_prev=localstatedir ;;
228 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
229 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
230 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
231 localstatedir="$ac_optarg" ;;
232
233 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
234 ac_prev=mandir ;;
235 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
236 mandir="$ac_optarg" ;;
237
238 -nfp | --nfp | --nf)
239 # Obsolete; use --without-fp.
240 with_fp=no ;;
241
242 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
243 | --no-cr | --no-c)
244 no_create=yes ;;
245
246 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
247 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248 no_recursion=yes ;;
249
250 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
251 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
252 | --oldin | --oldi | --old | --ol | --o)
253 ac_prev=oldincludedir ;;
254 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
255 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
256 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
257 oldincludedir="$ac_optarg" ;;
258
259 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
260 ac_prev=prefix ;;
261 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
262 prefix="$ac_optarg" ;;
263
264 -program-prefix | --program-prefix | --program-prefi | --program-pref \
265 | --program-pre | --program-pr | --program-p)
266 ac_prev=program_prefix ;;
267 -program-prefix=* | --program-prefix=* | --program-prefi=* \
268 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
269 program_prefix="$ac_optarg" ;;
270
271 -program-suffix | --program-suffix | --program-suffi | --program-suff \
272 | --program-suf | --program-su | --program-s)
273 ac_prev=program_suffix ;;
274 -program-suffix=* | --program-suffix=* | --program-suffi=* \
275 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
276 program_suffix="$ac_optarg" ;;
277
278 -program-transform-name | --program-transform-name \
279 | --program-transform-nam | --program-transform-na \
280 | --program-transform-n | --program-transform- \
281 | --program-transform | --program-transfor \
282 | --program-transfo | --program-transf \
283 | --program-trans | --program-tran \
284 | --progr-tra | --program-tr | --program-t)
285 ac_prev=program_transform_name ;;
286 -program-transform-name=* | --program-transform-name=* \
287 | --program-transform-nam=* | --program-transform-na=* \
288 | --program-transform-n=* | --program-transform-=* \
289 | --program-transform=* | --program-transfor=* \
290 | --program-transfo=* | --program-transf=* \
291 | --program-trans=* | --program-tran=* \
292 | --progr-tra=* | --program-tr=* | --program-t=*)
293 program_transform_name="$ac_optarg" ;;
294
295 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
296 | -silent | --silent | --silen | --sile | --sil)
297 silent=yes ;;
298
299 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
300 ac_prev=sbindir ;;
301 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
302 | --sbi=* | --sb=*)
303 sbindir="$ac_optarg" ;;
304
305 -sharedstatedir | --sharedstatedir | --sharedstatedi \
306 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
307 | --sharedst | --shareds | --shared | --share | --shar \
308 | --sha | --sh)
309 ac_prev=sharedstatedir ;;
310 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
311 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
312 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
313 | --sha=* | --sh=*)
314 sharedstatedir="$ac_optarg" ;;
315
316 -site | --site | --sit)
317 ac_prev=site ;;
318 -site=* | --site=* | --sit=*)
319 site="$ac_optarg" ;;
320
321 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
322 ac_prev=srcdir ;;
323 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
324 srcdir="$ac_optarg" ;;
325
326 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
327 | --syscon | --sysco | --sysc | --sys | --sy)
328 ac_prev=sysconfdir ;;
329 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
330 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
331 sysconfdir="$ac_optarg" ;;
332
333 -target | --target | --targe | --targ | --tar | --ta | --t)
334 ac_prev=target ;;
335 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
336 target="$ac_optarg" ;;
337
338 -v | -verbose | --verbose | --verbos | --verbo | --verb)
339 verbose=yes ;;
340
341 -version | --version | --versio | --versi | --vers)
342 echo "configure generated by autoconf version 2.13"
343 exit 0 ;;
344
345 -with-* | --with-*)
346 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
347 # Reject names that are not valid shell variable names.
348 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
349 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
350 fi
351 ac_package=`echo $ac_package| sed 's/-/_/g'`
352 case "$ac_option" in
353 *=*) ;;
354 *) ac_optarg=yes ;;
355 esac
356 eval "with_${ac_package}='$ac_optarg'" ;;
357
358 -without-* | --without-*)
359 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
360 # Reject names that are not valid shell variable names.
361 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
362 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
363 fi
364 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 eval "with_${ac_package}=no" ;;
366
367 --x)
368 # Obsolete; use --with-x.
369 with_x=yes ;;
370
371 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
372 | --x-incl | --x-inc | --x-in | --x-i)
373 ac_prev=x_includes ;;
374 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
375 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
376 x_includes="$ac_optarg" ;;
377
378 -x-libraries | --x-libraries | --x-librarie | --x-librari \
379 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
380 ac_prev=x_libraries ;;
381 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
382 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
383 x_libraries="$ac_optarg" ;;
384
385 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
386 ;;
387
388 *)
389 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
390 echo "configure: warning: $ac_option: invalid host type" 1>&2
391 fi
392 if test "x$nonopt" != xNONE; then
393 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
394 fi
395 nonopt="$ac_option"
396 ;;
397
398 esac
399 done
400
401 if test -n "$ac_prev"; then
402 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 fi
404
405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
406
407 # File descriptor usage:
408 # 0 standard input
409 # 1 file creation
410 # 2 errors and warnings
411 # 3 some systems may open it to /dev/tty
412 # 4 used on the Kubota Titan
413 # 6 checking for... messages and results
414 # 5 compiler messages saved in config.log
415 if test "$silent" = yes; then
416 exec 6>/dev/null
417 else
418 exec 6>&1
419 fi
420 exec 5>./config.log
421
422 echo "\
423 This file contains any messages produced by compilers while
424 running configure, to aid debugging if configure makes a mistake.
425 " 1>&5
426
427 # Strip out --no-create and --no-recursion so they do not pile up.
428 # Also quote any args containing shell metacharacters.
429 ac_configure_args=
430 for ac_arg
431 do
432 case "$ac_arg" in
433 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
434 | --no-cr | --no-c) ;;
435 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
436 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
437 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
438 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
439 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
440 esac
441 done
442
443 # NLS nuisances.
444 # Only set these to C if already set. These must not be set unconditionally
445 # because not all systems understand e.g. LANG=C (notably SCO).
446 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
447 # Non-C LC_CTYPE values break the ctype check.
448 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
449 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
450 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
451 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
452
453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
454 rm -rf conftest* confdefs.h
455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 echo > confdefs.h
457
458 # A filename unique to this package, relative to the directory that
459 # configure is in, which we can look for to find out if srcdir is correct.
460 ac_unique_file=eggdrop.conf.dist
461
462 # Find the source files, if location was not specified.
463 if test -z "$srcdir"; then
464 ac_srcdir_defaulted=yes
465 # Try the directory containing this script, then its parent.
466 ac_prog=$0
467 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
468 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
469 srcdir=$ac_confdir
470 if test ! -r $srcdir/$ac_unique_file; then
471 srcdir=..
472 fi
473 else
474 ac_srcdir_defaulted=no
475 fi
476 if test ! -r $srcdir/$ac_unique_file; then
477 if test "$ac_srcdir_defaulted" = yes; then
478 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
479 else
480 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481 fi
482 fi
483 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
484
485 # Prefer explicitly selected file to automatically selected ones.
486 if test -z "$CONFIG_SITE"; then
487 if test "x$prefix" != xNONE; then
488 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
489 else
490 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491 fi
492 fi
493 for ac_site_file in $CONFIG_SITE; do
494 if test -r "$ac_site_file"; then
495 echo "loading site script $ac_site_file"
496 . "$ac_site_file"
497 fi
498 done
499
500 if test -r "$cache_file"; then
501 echo "loading cache $cache_file"
502 . $cache_file
503 else
504 echo "creating cache $cache_file"
505 > $cache_file
506 fi
507
508 ac_ext=c
509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
510 ac_cpp='$CPP $CPPFLAGS'
511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
513 cross_compiling=$ac_cv_prog_cc_cross
514
515 ac_exeext=
516 ac_objext=o
517 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
518 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
519 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
520 ac_n= ac_c='
521 ' ac_t=' '
522 else
523 ac_n=-n ac_c= ac_t=
524 fi
525 else
526 ac_n= ac_c='\c' ac_t=
527 fi
528
529
530
531
532
533 echo "$ac_t""" 1>&6
534 echo "$ac_t""This is eggdrop's GNU configure script." 1>&6
535 echo "$ac_t""It's going to run a bunch of strange tests to hopefully" 1>&6
536 echo "$ac_t""make your compile work without much twiddling." 1>&6
537 echo "$ac_t""" 1>&6
538
539
540 # Setup build environment
541 # Extract the first word of "gcc", so it can be a program name with args.
542 set dummy gcc; ac_word=$2
543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
544 echo "configure:545: checking for $ac_word" >&5
545 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
546 echo $ac_n "(cached) $ac_c" 1>&6
547 else
548 if test -n "$CC"; then
549 ac_cv_prog_CC="$CC" # Let the user override the test.
550 else
551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
552 ac_dummy="$PATH"
553 for ac_dir in $ac_dummy; do
554 test -z "$ac_dir" && ac_dir=.
555 if test -f $ac_dir/$ac_word; then
556 ac_cv_prog_CC="gcc"
557 break
558 fi
559 done
560 IFS="$ac_save_ifs"
561 fi
562 fi
563 CC="$ac_cv_prog_CC"
564 if test -n "$CC"; then
565 echo "$ac_t""$CC" 1>&6
566 else
567 echo "$ac_t""no" 1>&6
568 fi
569
570 if test -z "$CC"; then
571 # Extract the first word of "cc", so it can be a program name with args.
572 set dummy cc; ac_word=$2
573 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
574 echo "configure:575: checking for $ac_word" >&5
575 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
576 echo $ac_n "(cached) $ac_c" 1>&6
577 else
578 if test -n "$CC"; then
579 ac_cv_prog_CC="$CC" # Let the user override the test.
580 else
581 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
582 ac_prog_rejected=no
583 ac_dummy="$PATH"
584 for ac_dir in $ac_dummy; do
585 test -z "$ac_dir" && ac_dir=.
586 if test -f $ac_dir/$ac_word; then
587 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
588 ac_prog_rejected=yes
589 continue
590 fi
591 ac_cv_prog_CC="cc"
592 break
593 fi
594 done
595 IFS="$ac_save_ifs"
596 if test $ac_prog_rejected = yes; then
597 # We found a bogon in the path, so make sure we never use it.
598 set dummy $ac_cv_prog_CC
599 shift
600 if test $# -gt 0; then
601 # We chose a different compiler from the bogus one.
602 # However, it has the same basename, so the bogon will be chosen
603 # first if we set CC to just the basename; use the full file name.
604 shift
605 set dummy "$ac_dir/$ac_word" "$@"
606 shift
607 ac_cv_prog_CC="$@"
608 fi
609 fi
610 fi
611 fi
612 CC="$ac_cv_prog_CC"
613 if test -n "$CC"; then
614 echo "$ac_t""$CC" 1>&6
615 else
616 echo "$ac_t""no" 1>&6
617 fi
618
619 if test -z "$CC"; then
620 case "`uname -s`" in
621 *win32* | *WIN32*)
622 # Extract the first word of "cl", so it can be a program name with args.
623 set dummy cl; ac_word=$2
624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
625 echo "configure:626: checking for $ac_word" >&5
626 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
627 echo $ac_n "(cached) $ac_c" 1>&6
628 else
629 if test -n "$CC"; then
630 ac_cv_prog_CC="$CC" # Let the user override the test.
631 else
632 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
633 ac_dummy="$PATH"
634 for ac_dir in $ac_dummy; do
635 test -z "$ac_dir" && ac_dir=.
636 if test -f $ac_dir/$ac_word; then
637 ac_cv_prog_CC="cl"
638 break
639 fi
640 done
641 IFS="$ac_save_ifs"
642 fi
643 fi
644 CC="$ac_cv_prog_CC"
645 if test -n "$CC"; then
646 echo "$ac_t""$CC" 1>&6
647 else
648 echo "$ac_t""no" 1>&6
649 fi
650 ;;
651 esac
652 fi
653 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
654 fi
655
656 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
657 echo "configure:658: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
658
659 ac_ext=c
660 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
661 ac_cpp='$CPP $CPPFLAGS'
662 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
663 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
664 cross_compiling=$ac_cv_prog_cc_cross
665
666 cat > conftest.$ac_ext << EOF
667
668 #line 669 "configure"
669 #include "confdefs.h"
670
671 main(){return(0);}
672 EOF
673 if { (eval echo configure:674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
674 ac_cv_prog_cc_works=yes
675 # If we can't run a trivial program, we are probably using a cross compiler.
676 if (./conftest; exit) 2>/dev/null; then
677 ac_cv_prog_cc_cross=no
678 else
679 ac_cv_prog_cc_cross=yes
680 fi
681 else
682 echo "configure: failed program was:" >&5
683 cat conftest.$ac_ext >&5
684 ac_cv_prog_cc_works=no
685 fi
686 rm -fr conftest*
687 ac_ext=c
688 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
689 ac_cpp='$CPP $CPPFLAGS'
690 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
691 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
692 cross_compiling=$ac_cv_prog_cc_cross
693
694 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
695 if test $ac_cv_prog_cc_works = no; then
696 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
697 fi
698 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
699 echo "configure:700: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
700 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
701 cross_compiling=$ac_cv_prog_cc_cross
702
703 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
704 echo "configure:705: checking whether we are using GNU C" >&5
705 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
706 echo $ac_n "(cached) $ac_c" 1>&6
707 else
708 cat > conftest.c <<EOF
709 #ifdef __GNUC__
710 yes;
711 #endif
712 EOF
713 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
714 ac_cv_prog_gcc=yes
715 else
716 ac_cv_prog_gcc=no
717 fi
718 fi
719
720 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
721
722 if test $ac_cv_prog_gcc = yes; then
723 GCC=yes
724 else
725 GCC=
726 fi
727
728 ac_test_CFLAGS="${CFLAGS+set}"
729 ac_save_CFLAGS="$CFLAGS"
730 CFLAGS=
731 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
732 echo "configure:733: checking whether ${CC-cc} accepts -g" >&5
733 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
734 echo $ac_n "(cached) $ac_c" 1>&6
735 else
736 echo 'void f(){}' > conftest.c
737 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
738 ac_cv_prog_cc_g=yes
739 else
740 ac_cv_prog_cc_g=no
741 fi
742 rm -f conftest*
743
744 fi
745
746 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
747 if test "$ac_test_CFLAGS" = set; then
748 CFLAGS="$ac_save_CFLAGS"
749 elif test $ac_cv_prog_cc_g = yes; then
750 if test "$GCC" = yes; then
751 CFLAGS="-g -O2"
752 else
753 CFLAGS="-g"
754 fi
755 else
756 if test "$GCC" = yes; then
757 CFLAGS="-O2"
758 else
759 CFLAGS=
760 fi
761 fi
762
763 if test "x${cross_compiling}" = "x"
764 then
765 cat << 'EOF' >&2
766 configure: error:
767
768 This system does not appear to have a working C compiler.
769 A working C compiler is required to compile eggdrop.
770
771 EOF
772 exit 1
773 fi
774
775
776 # Crazy machines
777 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
778 echo "configure:779: checking how to run the C preprocessor" >&5
779 # On Suns, sometimes $CPP names a directory.
780 if test -n "$CPP" && test -d "$CPP"; then
781 CPP=
782 fi
783 if test -z "$CPP"; then
784 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
785 echo $ac_n "(cached) $ac_c" 1>&6
786 else
787 # This must be in double quotes, not single quotes, because CPP may get
788 # substituted into the Makefile and "${CC-cc}" will confuse make.
789 CPP="${CC-cc} -E"
790 # On the NeXT, cc -E runs the code through the compiler's parser,
791 # not just through cpp.
792 cat > conftest.$ac_ext <<EOF
793 #line 794 "configure"
794 #include "confdefs.h"
795 #include <assert.h>
796 Syntax Error
797 EOF
798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
799 { (eval echo configure:800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
801 if test -z "$ac_err"; then
802 :
803 else
804 echo "$ac_err" >&5
805 echo "configure: failed program was:" >&5
806 cat conftest.$ac_ext >&5
807 rm -rf conftest*
808 CPP="${CC-cc} -E -traditional-cpp"
809 cat > conftest.$ac_ext <<EOF
810 #line 811 "configure"
811 #include "confdefs.h"
812 #include <assert.h>
813 Syntax Error
814 EOF
815 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
816 { (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
817 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
818 if test -z "$ac_err"; then
819 :
820 else
821 echo "$ac_err" >&5
822 echo "configure: failed program was:" >&5
823 cat conftest.$ac_ext >&5
824 rm -rf conftest*
825 CPP="${CC-cc} -nologo -E"
826 cat > conftest.$ac_ext <<EOF
827 #line 828 "configure"
828 #include "confdefs.h"
829 #include <assert.h>
830 Syntax Error
831 EOF
832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
833 { (eval echo configure:834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
835 if test -z "$ac_err"; then
836 :
837 else
838 echo "$ac_err" >&5
839 echo "configure: failed program was:" >&5
840 cat conftest.$ac_ext >&5
841 rm -rf conftest*
842 CPP=/lib/cpp
843 fi
844 rm -f conftest*
845 fi
846 rm -f conftest*
847 fi
848 rm -f conftest*
849 ac_cv_prog_CPP="$CPP"
850 fi
851 CPP="$ac_cv_prog_CPP"
852 else
853 ac_cv_prog_CPP="$CPP"
854 fi
855 echo "$ac_t""$CPP" 1>&6
856
857 echo $ac_n "checking for AIX""... $ac_c" 1>&6
858 echo "configure:859: checking for AIX" >&5
859 cat > conftest.$ac_ext <<EOF
860 #line 861 "configure"
861 #include "confdefs.h"
862 #ifdef _AIX
863 yes
864 #endif
865
866 EOF
867 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
868 egrep "yes" >/dev/null 2>&1; then
869 rm -rf conftest*
870 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
871 #define _ALL_SOURCE 1
872 EOF
873
874 else
875 rm -rf conftest*
876 echo "$ac_t""no" 1>&6
877 fi
878 rm -f conftest*
879
880
881 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
882 echo "configure:883: checking for POSIXized ISC" >&5
883 if test -d /etc/conf/kconfig.d &&
884 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
885 then
886 echo "$ac_t""yes" 1>&6
887 ISC=yes # If later tests want to check for ISC.
888 cat >> confdefs.h <<\EOF
889 #define _POSIX_SOURCE 1
890 EOF
891
892 if test "$GCC" = yes; then
893 CC="$CC -posix"
894 else
895 CC="$CC -Xp"
896 fi
897 else
898 echo "$ac_t""no" 1>&6
899 ISC=
900 fi
901
902 ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
903 echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
904 echo "configure:905: checking for minix/config.h" >&5
905 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
906 echo $ac_n "(cached) $ac_c" 1>&6
907 else
908 cat > conftest.$ac_ext <<EOF
909 #line 910 "configure"
910 #include "confdefs.h"
911 #include <minix/config.h>
912 EOF
913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
914 { (eval echo configure:915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
916 if test -z "$ac_err"; then
917 rm -rf conftest*
918 eval "ac_cv_header_$ac_safe=yes"
919 else
920 echo "$ac_err" >&5
921 echo "configure: failed program was:" >&5
922 cat conftest.$ac_ext >&5
923 rm -rf conftest*
924 eval "ac_cv_header_$ac_safe=no"
925 fi
926 rm -f conftest*
927 fi
928 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
929 echo "$ac_t""yes" 1>&6
930 MINIX=yes
931 else
932 echo "$ac_t""no" 1>&6
933 MINIX=
934 fi
935
936 if test "$MINIX" = yes; then
937 cat >> confdefs.h <<\EOF
938 #define _POSIX_SOURCE 1
939 EOF
940
941 cat >> confdefs.h <<\EOF
942 #define _POSIX_1_SOURCE 2
943 EOF
944
945 cat >> confdefs.h <<\EOF
946 #define _MINIX 1
947 EOF
948
949 fi
950
951
952 # Checks for programs
953 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
954 echo "configure:955: checking whether ${MAKE-make} sets \${MAKE}" >&5
955 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
956 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
957 echo $ac_n "(cached) $ac_c" 1>&6
958 else
959 cat > conftestmake <<\EOF
960 all:
961 @echo 'ac_maketemp="${MAKE}"'
962 EOF
963 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
964 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
965 if test -n "$ac_maketemp"; then
966 eval ac_cv_prog_make_${ac_make}_set=yes
967 else
968 eval ac_cv_prog_make_${ac_make}_set=no
969 fi
970 rm -f conftestmake
971 fi
972 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
973 echo "$ac_t""yes" 1>&6
974 SET_MAKE=
975 else
976 echo "$ac_t""no" 1>&6
977 SET_MAKE="MAKE=${MAKE-make}"
978 fi
979
980 # Extract the first word of "ranlib", so it can be a program name with args.
981 set dummy ranlib; ac_word=$2
982 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
983 echo "configure:984: checking for $ac_word" >&5
984 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
985 echo $ac_n "(cached) $ac_c" 1>&6
986 else
987 if test -n "$RANLIB"; then
988 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
989 else
990 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
991 ac_dummy="$PATH"
992 for ac_dir in $ac_dummy; do
993 test -z "$ac_dir" && ac_dir=.
994 if test -f $ac_dir/$ac_word; then
995 ac_cv_prog_RANLIB="ranlib"
996 break
997 fi
998 done
999 IFS="$ac_save_ifs"
1000 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1001 fi
1002 fi
1003 RANLIB="$ac_cv_prog_RANLIB"
1004 if test -n "$RANLIB"; then
1005 echo "$ac_t""$RANLIB" 1>&6
1006 else
1007 echo "$ac_t""no" 1>&6
1008 fi
1009
1010 ac_aux_dir=
1011 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1012 if test -f $ac_dir/install-sh; then
1013 ac_aux_dir=$ac_dir
1014 ac_install_sh="$ac_aux_dir/install-sh -c"
1015 break
1016 elif test -f $ac_dir/install.sh; then
1017 ac_aux_dir=$ac_dir
1018 ac_install_sh="$ac_aux_dir/install.sh -c"
1019 break
1020 fi
1021 done
1022 if test -z "$ac_aux_dir"; then
1023 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
1024 fi
1025 ac_config_guess=$ac_aux_dir/config.guess
1026 ac_config_sub=$ac_aux_dir/config.sub
1027 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1028
1029 # Find a good install program. We prefer a C program (faster),
1030 # so one script is as good as another. But avoid the broken or
1031 # incompatible versions:
1032 # SysV /etc/install, /usr/sbin/install
1033 # SunOS /usr/etc/install
1034 # IRIX /sbin/install
1035 # AIX /bin/install
1036 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1037 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1038 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1039 # ./install, which can be erroneously created by make from ./install.sh.
1040 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1041 echo "configure:1042: checking for a BSD compatible install" >&5
1042 if test -z "$INSTALL"; then
1043 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
1045 else
1046 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1047 for ac_dir in $PATH; do
1048 # Account for people who put trailing slashes in PATH elements.
1049 case "$ac_dir/" in
1050 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1051 *)
1052 # OSF1 and SCO ODT 3.0 have their own names for install.
1053 # Don't use installbsd from OSF since it installs stuff as root
1054 # by default.
1055 for ac_prog in ginstall scoinst install; do
1056 if test -f $ac_dir/$ac_prog; then
1057 if test $ac_prog = install &&
1058 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1059 # AIX install. It has an incompatible calling convention.
1060 :
1061 else
1062 ac_cv_path_install="$ac_dir/$ac_prog -c"
1063 break 2
1064 fi
1065 fi
1066 done
1067 ;;
1068 esac
1069 done
1070 IFS="$ac_save_IFS"
1071
1072 fi
1073 if test "${ac_cv_path_install+set}" = set; then
1074 INSTALL="$ac_cv_path_install"
1075 else
1076 # As a last resort, use the slow shell script. We don't cache a
1077 # path for INSTALL within a source directory, because that will
1078 # break other packages using the cache if that directory is
1079 # removed, or if the path is relative.
1080 INSTALL="$ac_install_sh"
1081 fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether ln -s works" >&5
1095 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1096 echo $ac_n "(cached) $ac_c" 1>&6
1097 else
1098 rm -f conftestdata
1099 if ln -s X conftestdata 2>/dev/null
1100 then
1101 rm -f conftestdata
1102 ac_cv_prog_LN_S="ln -s"
1103 else
1104 ac_cv_prog_LN_S=ln
1105 fi
1106 fi
1107 LN_S="$ac_cv_prog_LN_S"
1108 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1109 echo "$ac_t""yes" 1>&6
1110 else
1111 echo "$ac_t""no" 1>&6
1112 fi
1113
1114 # Extract the first word of "strip", so it can be a program name with args.
1115 set dummy strip; ac_word=$2
1116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1117 echo "configure:1118: checking for $ac_word" >&5
1118 if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
1119 echo $ac_n "(cached) $ac_c" 1>&6
1120 else
1121 if test -n "$STRIP"; then
1122 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
1123 else
1124 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1125 ac_dummy="$PATH"
1126 for ac_dir in $ac_dummy; do
1127 test -z "$ac_dir" && ac_dir=.
1128 if test -f $ac_dir/$ac_word; then
1129 ac_cv_prog_STRIP="strip"
1130 break
1131 fi
1132 done
1133 IFS="$ac_save_ifs"
1134 fi
1135 fi
1136 STRIP="$ac_cv_prog_STRIP"
1137 if test -n "$STRIP"; then
1138 echo "$ac_t""$STRIP" 1>&6
1139 else
1140 echo "$ac_t""no" 1>&6
1141 fi
1142
1143 if test "x${STRIP}" = "x"
1144 then
1145 STRIP=touch
1146 fi
1147
1148 # awk is needed for Tcl library and header checks, and eggdrop version subst
1149 for ac_prog in mawk gawk nawk awk
1150 do
1151 # Extract the first word of "$ac_prog", so it can be a program name with args.
1152 set dummy $ac_prog; ac_word=$2
1153 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1154 echo "configure:1155: checking for $ac_word" >&5
1155 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1156 echo $ac_n "(cached) $ac_c" 1>&6
1157 else
1158 if test -n "$AWK"; then
1159 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1160 else
1161 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1162 ac_dummy="$PATH"
1163 for ac_dir in $ac_dummy; do
1164 test -z "$ac_dir" && ac_dir=.
1165 if test -f $ac_dir/$ac_word; then
1166 ac_cv_prog_AWK="$ac_prog"
1167 break
1168 fi
1169 done
1170 IFS="$ac_save_ifs"
1171 fi
1172 fi
1173 AWK="$ac_cv_prog_AWK"
1174 if test -n "$AWK"; then
1175 echo "$ac_t""$AWK" 1>&6
1176 else
1177 echo "$ac_t""no" 1>&6
1178 fi
1179
1180 test -n "$AWK" && break
1181 done
1182
1183 if test "x${AWK}" = "x"
1184 then
1185 cat << 'EOF' >&2
1186 configure: error:
1187
1188 This system seems to lack a working 'awk' command.
1189 A working 'awk' command is required to compile eggdrop.
1190
1191 EOF
1192 exit 1
1193 fi
1194
1195 # basename is needed for Tcl library and header checks
1196 # Extract the first word of "basename", so it can be a program name with args.
1197 set dummy basename; ac_word=$2
1198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1199 echo "configure:1200: checking for $ac_word" >&5
1200 if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
1201 echo $ac_n "(cached) $ac_c" 1>&6
1202 else
1203 if test -n "$BASENAME"; then
1204 ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test.
1205 else
1206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1207 ac_dummy="$PATH"
1208 for ac_dir in $ac_dummy; do
1209 test -z "$ac_dir" && ac_dir=.
1210 if test -f $ac_dir/$ac_word; then
1211 ac_cv_prog_BASENAME="basename"
1212 break
1213 fi
1214 done
1215 IFS="$ac_save_ifs"
1216 fi
1217 fi
1218 BASENAME="$ac_cv_prog_BASENAME"
1219 if test -n "$BASENAME"; then
1220 echo "$ac_t""$BASENAME" 1>&6
1221 else
1222 echo "$ac_t""no" 1>&6
1223 fi
1224
1225 if test "x${BASENAME}" = "x"
1226 then
1227 cat << 'EOF' >&2
1228 configure: error:
1229
1230 This system seems to lack a working 'basename' command.
1231 A working 'basename' command is required to compile eggdrop.
1232
1233 EOF
1234 exit 1
1235 fi
1236
1237 # Extract the first word of "uname", so it can be a program name with args.
1238 set dummy uname; ac_word=$2
1239 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1240 echo "configure:1241: checking for $ac_word" >&5
1241 if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then
1242 echo $ac_n "(cached) $ac_c" 1>&6
1243 else
1244 if test -n "$UNAME"; then
1245 ac_cv_prog_UNAME="$UNAME" # Let the user override the test.
1246 else
1247 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1248 ac_dummy="$PATH"
1249 for ac_dir in $ac_dummy; do
1250 test -z "$ac_dir" && ac_dir=.
1251 if test -f $ac_dir/$ac_word; then
1252 ac_cv_prog_UNAME="uname"
1253 break
1254 fi
1255 done
1256 IFS="$ac_save_ifs"
1257 fi
1258 fi
1259 UNAME="$ac_cv_prog_UNAME"
1260 if test -n "$UNAME"; then
1261 echo "$ac_t""$UNAME" 1>&6
1262 else
1263 echo "$ac_t""no" 1>&6
1264 fi
1265
1266
1267 # Test the os and set the module linking settings
1268 LINUX=no
1269 IRIX=no
1270 SUNOS=no
1271 HPUX=no
1272 MOD_CC="${CC}"
1273 MOD_LD="${CC}"
1274 MOD_STRIP="${STRIP}"
1275 SHLIB_CC="${CC}"
1276 SHLIB_LD="${CC}"
1277 SHLIB_STRIP="${STRIP}"
1278 NEED_DL=1
1279 DEFAULT_MAKE=debug
1280
1281 echo $ac_n "checking your OS""... $ac_c" 1>&6
1282 echo "configure:1283: checking your OS" >&5
1283 if eval "test \"`echo '$''{'egg_cv_var_system'+set}'`\" = set"
1284 then
1285 echo $ac_n "(cached) $ac_c" 1>&6
1286 else
1287 eval "egg_cv_var_system=`${UNAME}`"
1288 fi
1289
1290 case "$egg_cv_var_system" in
1291 BSD/OS)
1292 if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
1293 then
1294 echo "$ac_t""BSD/OS 2! statically linked modules are the only choice" 1>&6
1295 NEED_DL=0
1296 DEFAULT_MAKE=static
1297 else
1298 echo "$ac_t""BSD/OS 3+! ok I spose" 1>&6
1299 MOD_CC=shlicc
1300 MOD_LD=shlicc
1301 MOD_STRIP="${STRIP} -d"
1302 SHLIB_LD="shlicc -r"
1303 SHLIB_STRIP=touch
1304 cat >> confdefs.h <<\EOF
1305 #define MODULES_OK 1
1306 EOF
1307 fi
1308 ;;
1309 CYGWIN*)
1310 echo "$ac_t""Cygwin" 1>&6
1311 NEED_DL=0
1312 DEFAULT_MAKE=static
1313 ;;
1314 HP-UX)
1315 echo "$ac_t""HP-UX, just shoot yourself now" 1>&6
1316 HPUX=yes
1317 MOD_LD="gcc -Wl,-E"
1318 SHLIB_CC="gcc -fPIC"
1319 SHLIB_LD="ld -b"
1320 NEED_DL=0
1321 cat >> confdefs.h <<\EOF
1322 #define MODULES_OK 1
1323 EOF
1324 cat >> confdefs.h <<\EOF
1325 #define HPUX_HACKS 1
1326 EOF
1327 if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
1328 then
1329 cat >> confdefs.h <<\EOF
1330 #define HPUX10_HACKS 1
1331 EOF
1332 fi
1333 ;;
1334 IRIX)
1335 echo "$ac_t""you are cursed with IRIX" 1>&6
1336 IRIX=yes
1337 SHLIB_STRIP=touch
1338 NEED_DL=0
1339 DEFAULT_MAKE=static
1340 ;;
1341 IRIX64)
1342 echo "$ac_t""IRIX64" 1>&6
1343 IRIX=yes
1344 SHLIB_STRIP=strip
1345 NEED_DL=0
1346 DEFAULT_MAKE=static
1347 ;;
1348 Linux)
1349 echo "$ac_t""Linux! The choice of the GNU generation" 1>&6
1350 LINUX=yes
1351 CFLAGS="$CFLAGS -Wall"
1352 MOD_LD="${CC}"
1353 SHLIB_LD="${CC} -shared -nostartfiles"
1354 cat >> confdefs.h <<\EOF
1355 #define MODULES_OK 1
1356 EOF
1357 ;;
1358 Lynx)
1359 SHLIB_STRIP=touch
1360 echo "$ac_t""Lynx OS" 1>&6
1361 ;;
1362 OSF1)
1363 echo "$ac_t""OSF..." 1>&6
1364 case `${UNAME} -r | cut -d . -f 1` in
1365 V*)
1366 echo "$ac_t"" Digital OSF" 1>&6
1367 if test "x$AWK" = "xgawk"
1368 then
1369 AWK=awk
1370 fi
1371 MOD_CC=cc
1372 MOD_LD=cc
1373 SHLIB_CC=cc
1374 SHLIB_LD="ld -shared -expect_unresolved '*'"
1375 SHLIB_STRIP=touch
1376 cat >> confdefs.h <<\EOF
1377 #define MODULES_OK 1
1378 EOF
1379 ;;
1380 1.0|1.1|1.2)
1381 echo "$ac_t"" pre 1.3" 1>&6
1382 SHLIB_LD="ld -R -export :"
1383 cat >> confdefs.h <<\EOF
1384 #define MODULES_OK 1
1385 EOF
1386 cat >> confdefs.h <<\EOF
1387 #define OSF1_HACKS 1
1388 EOF
1389 ;;
1390 1.*)
1391 echo "$ac_t"" 1.3+" 1>&6
1392 SHLIB_CC="${CC} -fpic"
1393 SHLIB_LD="ld -shared"
1394 cat >> confdefs.h <<\EOF
1395 #define MODULES_OK 1
1396 EOF
1397 cat >> confdefs.h <<\EOF
1398 #define OSF1_HACKS 1
1399 EOF
1400 ;;
1401 *)
1402 echo "$ac_t"" Some other weird OSF! No modules for you..." 1>&6
1403 NEED_DL=0
1404 DEFAULT_MAKE=static
1405 ;;
1406 esac
1407 cat >> confdefs.h <<\EOF
1408 #define STOP_UAC 1
1409 EOF
1410 ;;
1411 SunOS)
1412 if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
1413 then
1414 echo "$ac_t""Solaris -- yay" 1>&6
1415 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1416 else
1417 echo "$ac_t""SunOS -- sigh" 1>&6
1418 SUNOS=yes
1419 SHLIB_LD=ld
1420 SHLIB_STRIP=touch
1421 cat >> confdefs.h <<\EOF
1422 #define DLOPEN_1 1
1423 EOF
1424 fi
1425 MOD_CC="${CC} -fPIC"
1426 SHLIB_CC="${CC} -fPIC"
1427 cat >> confdefs.h <<\EOF
1428 #define MODULES_OK 1
1429 EOF
1430 ;;
1431 *BSD)
1432 echo "$ac_t""FreeBSD/NetBSD/OpenBSD - choose your poison" 1>&6
1433 SHLIB_CC="${CC} -fpic"
1434 SHLIB_LD="ld -Bshareable -x"
1435 cat >> confdefs.h <<\EOF
1436 #define MODULES_OK 1
1437 EOF
1438 ;;
1439 *)
1440 if test -r "/mach"
1441 then
1442 echo "$ac_t""NeXT...We are borg, you will be assimilated" 1>&6
1443 echo "$ac_t""break out the static modules, it's all you'll ever get :P" 1>&6
1444 echo "$ac_t""Hiya DK :P" 1>&6
1445 NEED_DL=0
1446 DEFAULT_MAKE=static
1447 cat >> confdefs.h <<\EOF
1448 #define BORGCUBES 1
1449 EOF
1450 else
1451 if test -r "/cmds"
1452 then
1453 echo "$ac_t""QNX" 1>&6
1454 SHLIB_STRIP=touch
1455 NEED_DL=0
1456 DEFAULT_MAKE=static
1457 else
1458 echo "$ac_t""Something unknown!" 1>&6
1459 echo "$ac_t""If you get dynamic modules to work, be sure to let the devel team know HOW :)" 1>&6
1460 NEED_DL=0
1461 DEFAULT_MAKE=static
1462 fi
1463 fi
1464 ;;
1465 esac
1466
1467
1468 # Checks for system libraries
1469 if test "$IRIX" = "yes"
1470 then
1471 echo "configure: warning: Skipping library tests because they CONFUSE Irix." 1>&2
1472 else
1473 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1474 echo "configure:1475: checking for socket in -lsocket" >&5
1475 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1476 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1477 echo $ac_n "(cached) $ac_c" 1>&6
1478 else
1479 ac_save_LIBS="$LIBS"
1480 LIBS="-lsocket $LIBS"
1481 cat > conftest.$ac_ext <<EOF
1482 #line 1483 "configure"
1483 #include "confdefs.h"
1484 /* Override any gcc2 internal prototype to avoid an error. */
1485 /* We use char because int might match the return type of a gcc2
1486 builtin and then its argument prototype would still apply. */
1487 char socket();
1488
1489 int main() {
1490 socket()
1491 ; return 0; }
1492 EOF
1493 if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1494 rm -rf conftest*
1495 eval "ac_cv_lib_$ac_lib_var=yes"
1496 else
1497 echo "configure: failed program was:" >&5
1498 cat conftest.$ac_ext >&5
1499 rm -rf conftest*
1500 eval "ac_cv_lib_$ac_lib_var=no"
1501 fi
1502 rm -f conftest*
1503 LIBS="$ac_save_LIBS"
1504
1505 fi
1506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1507 echo "$ac_t""yes" 1>&6
1508 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1509 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1510 cat >> confdefs.h <<EOF
1511 #define $ac_tr_lib 1
1512 EOF
1513
1514 LIBS="-lsocket $LIBS"
1515
1516 else
1517 echo "$ac_t""no" 1>&6
1518 fi
1519
1520 echo $ac_n "checking for connect in -lnsl""... $ac_c" 1>&6
1521 echo "configure:1522: checking for connect in -lnsl" >&5
1522 ac_lib_var=`echo nsl'_'connect | sed 'y%./+-%__p_%'`
1523 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1524 echo $ac_n "(cached) $ac_c" 1>&6
1525 else
1526 ac_save_LIBS="$LIBS"
1527 LIBS="-lnsl $LIBS"
1528 cat > conftest.$ac_ext <<EOF
1529 #line 1530 "configure"
1530 #include "confdefs.h"
1531 /* Override any gcc2 internal prototype to avoid an error. */
1532 /* We use char because int might match the return type of a gcc2
1533 builtin and then its argument prototype would still apply. */
1534 char connect();
1535
1536 int main() {
1537 connect()
1538 ; return 0; }
1539 EOF
1540 if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1541 rm -rf conftest*
1542 eval "ac_cv_lib_$ac_lib_var=yes"
1543 else
1544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 rm -rf conftest*
1547 eval "ac_cv_lib_$ac_lib_var=no"
1548 fi
1549 rm -f conftest*
1550 LIBS="$ac_save_LIBS"
1551
1552 fi
1553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1554 echo "$ac_t""yes" 1>&6
1555 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1556 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1557 cat >> confdefs.h <<EOF
1558 #define $ac_tr_lib 1
1559 EOF
1560
1561 LIBS="-lnsl $LIBS"
1562
1563 else
1564 echo "$ac_t""no" 1>&6
1565 fi
1566
1567 echo $ac_n "checking for gethostbyname in -ldns""... $ac_c" 1>&6
1568 echo "configure:1569: checking for gethostbyname in -ldns" >&5
1569 ac_lib_var=`echo dns'_'gethostbyname | sed 'y%./+-%__p_%'`
1570 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572 else
1573 ac_save_LIBS="$LIBS"
1574 LIBS="-ldns $LIBS"
1575 cat > conftest.$ac_ext <<EOF
1576 #line 1577 "configure"
1577 #include "confdefs.h"
1578 /* Override any gcc2 internal prototype to avoid an error. */
1579 /* We use char because int might match the return type of a gcc2
1580 builtin and then its argument prototype would still apply. */
1581 char gethostbyname();
1582
1583 int main() {
1584 gethostbyname()
1585 ; return 0; }
1586 EOF
1587 if { (eval echo configure:1588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1588 rm -rf conftest*
1589 eval "ac_cv_lib_$ac_lib_var=yes"
1590 else
1591 echo "configure: failed program was:" >&5
1592 cat conftest.$ac_ext >&5
1593 rm -rf conftest*
1594 eval "ac_cv_lib_$ac_lib_var=no"
1595 fi
1596 rm -f conftest*
1597 LIBS="$ac_save_LIBS"
1598
1599 fi
1600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1601 echo "$ac_t""yes" 1>&6
1602 ac_tr_lib=HAVE_LIB`echo dns | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1603 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1604 cat >> confdefs.h <<EOF
1605 #define $ac_tr_lib 1
1606 EOF
1607
1608 LIBS="-ldns $LIBS"
1609
1610 else
1611 echo "$ac_t""no" 1>&6
1612 fi
1613
1614 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1615 echo "configure:1616: checking for dlopen in -ldl" >&5
1616 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1617 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1618 echo $ac_n "(cached) $ac_c" 1>&6
1619 else
1620 ac_save_LIBS="$LIBS"
1621 LIBS="-ldl $LIBS"
1622 cat > conftest.$ac_ext <<EOF
1623 #line 1624 "configure"
1624 #include "confdefs.h"
1625 /* Override any gcc2 internal prototype to avoid an error. */
1626 /* We use char because int might match the return type of a gcc2
1627 builtin and then its argument prototype would still apply. */
1628 char dlopen();
1629
1630 int main() {
1631 dlopen()
1632 ; return 0; }
1633 EOF
1634 if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1635 rm -rf conftest*
1636 eval "ac_cv_lib_$ac_lib_var=yes"
1637 else
1638 echo "configure: failed program was:" >&5
1639 cat conftest.$ac_ext >&5
1640 rm -rf conftest*
1641 eval "ac_cv_lib_$ac_lib_var=no"
1642 fi
1643 rm -f conftest*
1644 LIBS="$ac_save_LIBS"
1645
1646 fi
1647 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1648 echo "$ac_t""yes" 1>&6
1649 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1650 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1651 cat >> confdefs.h <<EOF
1652 #define $ac_tr_lib 1
1653 EOF
1654
1655 LIBS="-ldl $LIBS"
1656
1657 else
1658 echo "$ac_t""no" 1>&6
1659 fi
1660
1661 # This is needed for Tcl libraries compiled with thread support
1662 echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
1663 echo "configure:1664: checking for pthread_mutex_init in -lpthread" >&5
1664 ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
1665 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1666 echo $ac_n "(cached) $ac_c" 1>&6
1667 else
1668 ac_save_LIBS="$LIBS"
1669 LIBS="-lpthread $LIBS"
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1673 /* Override any gcc2 internal prototype to avoid an error. */
1674 /* We use char because int might match the return type of a gcc2
1675 builtin and then its argument prototype would still apply. */
1676 char pthread_mutex_init();
1677
1678 int main() {
1679 pthread_mutex_init()
1680 ; return 0; }
1681 EOF
1682 if { (eval echo configure:1683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1683 rm -rf conftest*
1684 eval "ac_cv_lib_$ac_lib_var=yes"
1685 else
1686 echo "configure: failed program was:" >&5
1687 cat conftest.$ac_ext >&5
1688 rm -rf conftest*
1689 eval "ac_cv_lib_$ac_lib_var=no"
1690 fi
1691 rm -f conftest*
1692 LIBS="$ac_save_LIBS"
1693
1694 fi
1695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1696 echo "$ac_t""yes" 1>&6
1697 ac_cv_lib_pthread_pthread_mutex_init=yes
1698 else
1699 echo "$ac_t""no" 1>&6
1700 ac_cv_lib_pthread_pthread_mutex_init=no
1701 fi
1702
1703 if test "$SUNOS" = "yes"
1704 then
1705 # For suns without yp or something like that
1706 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
1707 echo "configure:1708: checking for main in -ldl" >&5
1708 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
1709 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1710 echo $ac_n "(cached) $ac_c" 1>&6
1711 else
1712 ac_save_LIBS="$LIBS"
1713 LIBS="-ldl $LIBS"
1714 cat > conftest.$ac_ext <<EOF
1715 #line 1716 "configure"
1716 #include "confdefs.h"
1717
1718 int main() {
1719 main()
1720 ; return 0; }
1721 EOF
1722 if { (eval echo configure:1723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1723 rm -rf conftest*
1724 eval "ac_cv_lib_$ac_lib_var=yes"
1725 else
1726 echo "configure: failed program was:" >&5
1727 cat conftest.$ac_ext >&5
1728 rm -rf conftest*
1729 eval "ac_cv_lib_$ac_lib_var=no"
1730 fi
1731 rm -f conftest*
1732 LIBS="$ac_save_LIBS"
1733
1734 fi
1735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1736 echo "$ac_t""yes" 1>&6
1737 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1738 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1739 cat >> confdefs.h <<EOF
1740 #define $ac_tr_lib 1
1741 EOF
1742
1743 LIBS="-ldl $LIBS"
1744
1745 else
1746 echo "$ac_t""no" 1>&6
1747 fi
1748
1749 else
1750 if test "$HPUX" = "yes"
1751 then
1752 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1753 echo "configure:1754: checking for shl_load in -ldld" >&5
1754 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1755 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1756 echo $ac_n "(cached) $ac_c" 1>&6
1757 else
1758 ac_save_LIBS="$LIBS"
1759 LIBS="-ldld $LIBS"
1760 cat > conftest.$ac_ext <<EOF
1761 #line 1762 "configure"
1762 #include "confdefs.h"
1763 /* Override any gcc2 internal prototype to avoid an error. */
1764 /* We use char because int might match the return type of a gcc2
1765 builtin and then its argument prototype would still apply. */
1766 char shl_load();
1767
1768 int main() {
1769 shl_load()
1770 ; return 0; }
1771 EOF
1772 if { (eval echo configure:1773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1773 rm -rf conftest*
1774 eval "ac_cv_lib_$ac_lib_var=yes"
1775 else
1776 echo "configure: failed program was:" >&5
1777 cat conftest.$ac_ext >&5
1778 rm -rf conftest*
1779 eval "ac_cv_lib_$ac_lib_var=no"
1780 fi
1781 rm -f conftest*
1782 LIBS="$ac_save_LIBS"
1783
1784 fi
1785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1786 echo "$ac_t""yes" 1>&6
1787 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1788 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1789 cat >> confdefs.h <<EOF
1790 #define $ac_tr_lib 1
1791 EOF
1792
1793 LIBS="-ldld $LIBS"
1794
1795 else
1796 echo "$ac_t""no" 1>&6
1797 fi
1798
1799 fi
1800 fi
1801 fi
1802
1803 echo $ac_n "checking for res_init""... $ac_c" 1>&6
1804 echo "configure:1805: checking for res_init" >&5
1805 if eval "test \"`echo '$''{'ac_cv_func_res_init'+set}'`\" = set"; then
1806 echo $ac_n "(cached) $ac_c" 1>&6
1807 else
1808 cat > conftest.$ac_ext <<EOF
1809 #line 1810 "configure"
1810 #include "confdefs.h"
1811 /* System header to define __stub macros and hopefully few prototypes,
1812 which can conflict with char res_init(); below. */
1813 #include <assert.h>
1814 /* Override any gcc2 internal prototype to avoid an error. */
1815 /* We use char because int might match the return type of a gcc2
1816 builtin and then its argument prototype would still apply. */
1817 char res_init();
1818
1819 int main() {
1820
1821 /* The GNU C library defines this for functions which it implements
1822 to always fail with ENOSYS. Some functions are actually named
1823 something starting with __ and the normal name is an alias. */
1824 #if defined (__stub_res_init) || defined (__stub___res_init)
1825 choke me
1826 #else
1827 res_init();
1828 #endif
1829
1830 ; return 0; }
1831 EOF
1832 if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1833 rm -rf conftest*
1834 eval "ac_cv_func_res_init=yes"
1835 else
1836 echo "configure: failed program was:" >&5
1837 cat conftest.$ac_ext >&5
1838 rm -rf conftest*
1839 eval "ac_cv_func_res_init=no"
1840 fi
1841 rm -f conftest*
1842 fi
1843
1844 if eval "test \"`echo '$ac_cv_func_'res_init`\" = yes"; then
1845 echo "$ac_t""yes" 1>&6
1846 :
1847 else
1848 echo "$ac_t""no" 1>&6
1849 echo $ac_n "checking for res_init in -lbind""... $ac_c" 1>&6
1850 echo "configure:1851: checking for res_init in -lbind" >&5
1851 ac_lib_var=`echo bind'_'res_init | sed 'y%./+-%__p_%'`
1852 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1853 echo $ac_n "(cached) $ac_c" 1>&6
1854 else
1855 ac_save_LIBS="$LIBS"
1856 LIBS="-lbind $LIBS"
1857 cat > conftest.$ac_ext <<EOF
1858 #line 1859 "configure"
1859 #include "confdefs.h"
1860 /* Override any gcc2 internal prototype to avoid an error. */
1861 /* We use char because int might match the return type of a gcc2
1862 builtin and then its argument prototype would still apply. */
1863 char res_init();
1864
1865 int main() {
1866 res_init()
1867 ; return 0; }
1868 EOF
1869 if { (eval echo configure:1870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1870 rm -rf conftest*
1871 eval "ac_cv_lib_$ac_lib_var=yes"
1872 else
1873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 rm -rf conftest*
1876 eval "ac_cv_lib_$ac_lib_var=no"
1877 fi
1878 rm -f conftest*
1879 LIBS="$ac_save_LIBS"
1880
1881 fi
1882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1883 echo "$ac_t""yes" 1>&6
1884 RESLIB="-lbind"
1885 else
1886 echo "$ac_t""no" 1>&6
1887 echo $ac_n "checking for res_init in -lresolv""... $ac_c" 1>&6
1888 echo "configure:1889: checking for res_init in -lresolv" >&5
1889 ac_lib_var=`echo resolv'_'res_init | sed 'y%./+-%__p_%'`
1890 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1891 echo $ac_n "(cached) $ac_c" 1>&6
1892 else
1893 ac_save_LIBS="$LIBS"
1894 LIBS="-lresolv $LIBS"
1895 cat > conftest.$ac_ext <<EOF
1896 #line 1897 "configure"
1897 #include "confdefs.h"
1898 /* Override any gcc2 internal prototype to avoid an error. */
1899 /* We use char because int might match the return type of a gcc2
1900 builtin and then its argument prototype would still apply. */
1901 char res_init();
1902
1903 int main() {
1904 res_init()
1905 ; return 0; }
1906 EOF
1907 if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1908 rm -rf conftest*
1909 eval "ac_cv_lib_$ac_lib_var=yes"
1910 else
1911 echo "configure: failed program was:" >&5
1912 cat conftest.$ac_ext >&5
1913 rm -rf conftest*
1914 eval "ac_cv_lib_$ac_lib_var=no"
1915 fi
1916 rm -f conftest*
1917 LIBS="$ac_save_LIBS"
1918
1919 fi
1920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1921 echo "$ac_t""yes" 1>&6
1922 RESLIB="-lresolv"
1923 else
1924 echo "$ac_t""no" 1>&6
1925 { echo "configure: error: No resolver library found" 1>&2; exit 1; }
1926 fi
1927
1928 fi
1929
1930 fi
1931
1932
1933 echo $ac_n "checking for res_mkquery""... $ac_c" 1>&6
1934 echo "configure:1935: checking for res_mkquery" >&5
1935 if eval "test \"`echo '$''{'ac_cv_func_res_mkquery'+set}'`\" = set"; then
1936 echo $ac_n "(cached) $ac_c" 1>&6
1937 else
1938 cat > conftest.$ac_ext <<EOF
1939 #line 1940 "configure"
1940 #include "confdefs.h"
1941 /* System header to define __stub macros and hopefully few prototypes,
1942 which can conflict with char res_mkquery(); below. */
1943 #include <assert.h>
1944 /* Override any gcc2 internal prototype to avoid an error. */
1945 /* We use char because int might match the return type of a gcc2
1946 builtin and then its argument prototype would still apply. */
1947 char res_mkquery();
1948
1949 int main() {
1950
1951 /* The GNU C library defines this for functions which it implements
1952 to always fail with ENOSYS. Some functions are actually named
1953 something starting with __ and the normal name is an alias. */
1954 #if defined (__stub_res_mkquery) || defined (__stub___res_mkquery)
1955 choke me
1956 #else
1957 res_mkquery();
1958 #endif
1959
1960 ; return 0; }
1961 EOF
1962 if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1963 rm -rf conftest*
1964 eval "ac_cv_func_res_mkquery=yes"
1965 else
1966 echo "configure: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 rm -rf conftest*
1969 eval "ac_cv_func_res_mkquery=no"
1970 fi
1971 rm -f conftest*
1972 fi
1973
1974 if eval "test \"`echo '$ac_cv_func_'res_mkquery`\" = yes"; then
1975 echo "$ac_t""yes" 1>&6
1976 :
1977 else
1978 echo "$ac_t""no" 1>&6
1979 echo $ac_n "checking for res_mkquery in -lbind""... $ac_c" 1>&6
1980 echo "configure:1981: checking for res_mkquery in -lbind" >&5
1981 ac_lib_var=`echo bind'_'res_mkquery | sed 'y%./+-%__p_%'`
1982 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1983 echo $ac_n "(cached) $ac_c" 1>&6
1984 else
1985 ac_save_LIBS="$LIBS"
1986 LIBS="-lbind $LIBS"
1987 cat > conftest.$ac_ext <<EOF
1988 #line 1989 "configure"
1989 #include "confdefs.h"
1990 /* Override any gcc2 internal prototype to avoid an error. */
1991 /* We use char because int might match the return type of a gcc2
1992 builtin and then its argument prototype would still apply. */
1993 char res_mkquery();
1994
1995 int main() {
1996 res_mkquery()
1997 ; return 0; }
1998 EOF
1999 if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2000 rm -rf conftest*
2001 eval "ac_cv_lib_$ac_lib_var=yes"
2002 else
2003 echo "configure: failed program was:" >&5
2004 cat conftest.$ac_ext >&5
2005 rm -rf conftest*
2006 eval "ac_cv_lib_$ac_lib_var=no"
2007 fi
2008 rm -f conftest*
2009 LIBS="$ac_save_LIBS"
2010
2011 fi
2012 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2013 echo "$ac_t""yes" 1>&6
2014 RESLIB="-lbind"
2015 else
2016 echo "$ac_t""no" 1>&6
2017 echo $ac_n "checking for res_mkquery in -lresolv""... $ac_c" 1>&6
2018 echo "configure:2019: checking for res_mkquery in -lresolv" >&5
2019 ac_lib_var=`echo resolv'_'res_mkquery | sed 'y%./+-%__p_%'`
2020 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2021 echo $ac_n "(cached) $ac_c" 1>&6
2022 else
2023 ac_save_LIBS="$LIBS"
2024 LIBS="-lresolv $LIBS"
2025 cat > conftest.$ac_ext <<EOF
2026 #line 2027 "configure"
2027 #include "confdefs.h"
2028 /* Override any gcc2 internal prototype to avoid an error. */
2029 /* We use char because int might match the return type of a gcc2
2030 builtin and then its argument prototype would still apply. */
2031 char res_mkquery();
2032
2033 int main() {
2034 res_mkquery()
2035 ; return 0; }
2036 EOF
2037 if { (eval echo configure:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2038 rm -rf conftest*
2039 eval "ac_cv_lib_$ac_lib_var=yes"
2040 else
2041 echo "configure: failed program was:" >&5
2042 cat conftest.$ac_ext >&5
2043 rm -rf conftest*
2044 eval "ac_cv_lib_$ac_lib_var=no"
2045 fi
2046 rm -f conftest*
2047 LIBS="$ac_save_LIBS"
2048
2049 fi
2050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2051 echo "$ac_t""yes" 1>&6
2052 RESLIB="-lresolv"
2053 else
2054 echo "$ac_t""no" 1>&6
2055 { echo "configure: error: No resolver library found" 1>&2; exit 1; }
2056 fi
2057
2058 fi
2059
2060 fi
2061
2062
2063
2064
2065
2066 # Checks for header files
2067 ac_header_dirent=no
2068 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2069 do
2070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2071 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2072 echo "configure:2073: checking for $ac_hdr that defines DIR" >&5
2073 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2074 echo $ac_n "(cached) $ac_c" 1>&6
2075 else
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <sys/types.h>
2080 #include <$ac_hdr>
2081 int main() {
2082 DIR *dirp = 0;
2083 ; return 0; }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2086 rm -rf conftest*
2087 eval "ac_cv_header_dirent_$ac_safe=yes"
2088 else
2089 echo "configure: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 rm -rf conftest*
2092 eval "ac_cv_header_dirent_$ac_safe=no"
2093 fi
2094 rm -f conftest*
2095 fi
2096 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2097 echo "$ac_t""yes" 1>&6
2098 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2099 cat >> confdefs.h <<EOF
2100 #define $ac_tr_hdr 1
2101 EOF
2102 ac_header_dirent=$ac_hdr; break
2103 else
2104 echo "$ac_t""no" 1>&6
2105 fi
2106 done
2107 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2108 if test $ac_header_dirent = dirent.h; then
2109 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2110 echo "configure:2111: checking for opendir in -ldir" >&5
2111 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2112 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2113 echo $ac_n "(cached) $ac_c" 1>&6
2114 else
2115 ac_save_LIBS="$LIBS"
2116 LIBS="-ldir $LIBS"
2117 cat > conftest.$ac_ext <<EOF
2118 #line 2119 "configure"
2119 #include "confdefs.h"
2120 /* Override any gcc2 internal prototype to avoid an error. */
2121 /* We use char because int might match the return type of a gcc2
2122 builtin and then its argument prototype would still apply. */
2123 char opendir();
2124
2125 int main() {
2126 opendir()
2127 ; return 0; }
2128 EOF
2129 if { (eval echo configure:2130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2130 rm -rf conftest*
2131 eval "ac_cv_lib_$ac_lib_var=yes"
2132 else
2133 echo "configure: failed program was:" >&5
2134 cat conftest.$ac_ext >&5
2135 rm -rf conftest*
2136 eval "ac_cv_lib_$ac_lib_var=no"
2137 fi
2138 rm -f conftest*
2139 LIBS="$ac_save_LIBS"
2140
2141 fi
2142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2143 echo "$ac_t""yes" 1>&6
2144 LIBS="$LIBS -ldir"
2145 else
2146 echo "$ac_t""no" 1>&6
2147 fi
2148
2149 else
2150 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2151 echo "configure:2152: checking for opendir in -lx" >&5
2152 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2153 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2154 echo $ac_n "(cached) $ac_c" 1>&6
2155 else
2156 ac_save_LIBS="$LIBS"
2157 LIBS="-lx $LIBS"
2158 cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2161 /* Override any gcc2 internal prototype to avoid an error. */
2162 /* We use char because int might match the return type of a gcc2
2163 builtin and then its argument prototype would still apply. */
2164 char opendir();
2165
2166 int main() {
2167 opendir()
2168 ; return 0; }
2169 EOF
2170 if { (eval echo configure:2171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2171 rm -rf conftest*
2172 eval "ac_cv_lib_$ac_lib_var=yes"
2173 else
2174 echo "configure: failed program was:" >&5
2175 cat conftest.$ac_ext >&5
2176 rm -rf conftest*
2177 eval "ac_cv_lib_$ac_lib_var=no"
2178 fi
2179 rm -f conftest*
2180 LIBS="$ac_save_LIBS"
2181
2182 fi
2183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2184 echo "$ac_t""yes" 1>&6
2185 LIBS="$LIBS -lx"
2186 else
2187 echo "$ac_t""no" 1>&6
2188 fi
2189
2190 fi
2191
2192 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
2193 echo "configure:2194: checking for sys/wait.h that is POSIX.1 compatible" >&5
2194 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2196 else
2197 cat > conftest.$ac_ext <<EOF
2198 #line 2199 "configure"
2199 #include "confdefs.h"
2200 #include <sys/types.h>
2201 #include <sys/wait.h>
2202 #ifndef WEXITSTATUS
2203 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
2204 #endif
2205 #ifndef WIFEXITED
2206 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
2207 #endif
2208 int main() {
2209 int s;
2210 wait (&s);
2211 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
2212 ; return 0; }
2213 EOF
2214 if { (eval echo configure:2215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2215 rm -rf conftest*
2216 ac_cv_header_sys_wait_h=yes
2217 else
2218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
2220 rm -rf conftest*
2221 ac_cv_header_sys_wait_h=no
2222 fi
2223 rm -f conftest*
2224 fi
2225
2226 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
2227 if test $ac_cv_header_sys_wait_h = yes; then
2228 cat >> confdefs.h <<\EOF
2229 #define HAVE_SYS_WAIT_H 1
2230 EOF
2231
2232 fi
2233
2234 for ac_hdr in sys/time.h
2235 do
2236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2238 echo "configure:2239: checking for $ac_hdr" >&5
2239 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2240 echo $ac_n "(cached) $ac_c" 1>&6
2241 else
2242 cat > conftest.$ac_ext <<EOF
2243 #line 2244 "configure"
2244 #include "confdefs.h"
2245 #include <$ac_hdr>
2246 EOF
2247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2248 { (eval echo configure:2249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2250 if test -z "$ac_err"; then
2251 rm -rf conftest*
2252 eval "ac_cv_header_$ac_safe=yes"
2253 else
2254 echo "$ac_err" >&5
2255 echo "configure: failed program was:" >&5
2256 cat conftest.$ac_ext >&5
2257 rm -rf conftest*
2258 eval "ac_cv_header_$ac_safe=no"
2259 fi
2260 rm -f conftest*
2261 fi
2262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2263 echo "$ac_t""yes" 1>&6
2264 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2265 cat >> confdefs.h <<EOF
2266 #define $ac_tr_hdr 1
2267 EOF
2268
2269 else
2270 echo "$ac_t""no" 1>&6
2271 fi
2272 done
2273
2274 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2275 echo "configure:2276: checking whether time.h and sys/time.h may both be included" >&5
2276 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
2278 else
2279 cat > conftest.$ac_ext <<EOF
2280 #line 2281 "configure"
2281 #include "confdefs.h"
2282 #include <sys/types.h>
2283 #include <sys/time.h>
2284 #include <time.h>
2285 int main() {
2286 struct tm *tp;
2287 ; return 0; }
2288 EOF
2289 if { (eval echo configure:2290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2290 rm -rf conftest*
2291 ac_cv_header_time=yes
2292 else
2293 echo "configure: failed program was:" >&5
2294 cat conftest.$ac_ext >&5
2295 rm -rf conftest*
2296 ac_cv_header_time=no
2297 fi
2298 rm -f conftest*
2299 fi
2300
2301 echo "$ac_t""$ac_cv_header_time" 1>&6
2302 if test $ac_cv_header_time = yes; then
2303 cat >> confdefs.h <<\EOF
2304 #define TIME_WITH_SYS_TIME 1
2305 EOF
2306
2307 fi
2308
2309 for ac_hdr in sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h
2310 do
2311 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2312 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2313 echo "configure:2314: checking for $ac_hdr" >&5
2314 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2315 echo $ac_n "(cached) $ac_c" 1>&6
2316 else
2317 cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #include <$ac_hdr>
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326 rm -rf conftest*
2327 eval "ac_cv_header_$ac_safe=yes"
2328 else
2329 echo "$ac_err" >&5
2330 echo "configure: failed program was:" >&5
2331 cat conftest.$ac_ext >&5
2332 rm -rf conftest*
2333 eval "ac_cv_header_$ac_safe=no"
2334 fi
2335 rm -f conftest*
2336 fi
2337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2338 echo "$ac_t""yes" 1>&6
2339 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2340 cat >> confdefs.h <<EOF
2341 #define $ac_tr_hdr 1
2342 EOF
2343
2344 else
2345 echo "$ac_t""no" 1>&6
2346 fi
2347 done
2348
2349
2350 # Checks for typedefs, structures, and compiler characteristics
2351 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
2352 echo "configure:2353: checking for ANSI C header files" >&5
2353 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
2354 echo $ac_n "(cached) $ac_c" 1>&6
2355 else
2356 cat > conftest.$ac_ext <<EOF
2357 #line 2358 "configure"
2358 #include "confdefs.h"
2359 #include <stdlib.h>
2360 #include <stdarg.h>
2361 #include <string.h>
2362 #include <float.h>
2363 EOF
2364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2365 { (eval echo configure:2366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2366 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2367 if test -z "$ac_err"; then
2368 rm -rf conftest*
2369 ac_cv_header_stdc=yes
2370 else
2371 echo "$ac_err" >&5
2372 echo "configure: failed program was:" >&5
2373 cat conftest.$ac_ext >&5
2374 rm -rf conftest*
2375 ac_cv_header_stdc=no
2376 fi
2377 rm -f conftest*
2378
2379 if test $ac_cv_header_stdc = yes; then
2380 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2381 cat > conftest.$ac_ext <<EOF
2382 #line 2383 "configure"
2383 #include "confdefs.h"
2384 #include <string.h>
2385 EOF
2386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2387 egrep "memchr" >/dev/null 2>&1; then
2388 :
2389 else
2390 rm -rf conftest*
2391 ac_cv_header_stdc=no
2392 fi
2393 rm -f conftest*
2394
2395 fi
2396
2397 if test $ac_cv_header_stdc = yes; then
2398 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2399 cat > conftest.$ac_ext <<EOF
2400 #line 2401 "configure"
2401 #include "confdefs.h"
2402 #include <stdlib.h>
2403 EOF
2404 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2405 egrep "free" >/dev/null 2>&1; then
2406 :
2407 else
2408 rm -rf conftest*
2409 ac_cv_header_stdc=no
2410 fi
2411 rm -f conftest*
2412
2413 fi
2414
2415 if test $ac_cv_header_stdc = yes; then
2416 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2417 if test "$cross_compiling" = yes; then
2418 :
2419 else
2420 cat > conftest.$ac_ext <<EOF
2421 #line 2422 "configure"
2422 #include "confdefs.h"
2423 #include <ctype.h>
2424 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2425 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2426 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2427 int main () { int i; for (i = 0; i < 256; i++)
2428 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2429 exit (0); }
2430
2431 EOF
2432 if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2433 then
2434 :
2435 else
2436 echo "configure: failed program was:" >&5
2437 cat conftest.$ac_ext >&5
2438 rm -fr conftest*
2439 ac_cv_header_stdc=no
2440 fi
2441 rm -fr conftest*
2442 fi
2443
2444 fi
2445 fi
2446
2447 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2448 if test $ac_cv_header_stdc = yes; then
2449 cat >> confdefs.h <<\EOF
2450 #define STDC_HEADERS 1
2451 EOF
2452
2453 fi
2454
2455 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2456 echo "configure:2457: checking for pid_t" >&5
2457 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2458 echo $ac_n "(cached) $ac_c" 1>&6
2459 else
2460 cat > conftest.$ac_ext <<EOF
2461 #line 2462 "configure"
2462 #include "confdefs.h"
2463 #include <sys/types.h>
2464 #if STDC_HEADERS
2465 #include <stdlib.h>
2466 #include <stddef.h>
2467 #endif
2468 EOF
2469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2470 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2471 rm -rf conftest*
2472 ac_cv_type_pid_t=yes
2473 else
2474 rm -rf conftest*
2475 ac_cv_type_pid_t=no
2476 fi
2477 rm -f conftest*
2478
2479 fi
2480 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2481 if test $ac_cv_type_pid_t = no; then
2482 cat >> confdefs.h <<\EOF
2483 #define pid_t int
2484 EOF
2485
2486 fi
2487
2488 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
2489 echo "configure:2490: checking whether byte ordering is bigendian" >&5
2490 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
2491 echo $ac_n "(cached) $ac_c" 1>&6
2492 else
2493 ac_cv_c_bigendian=unknown
2494 # See if sys/param.h defines the BYTE_ORDER macro.
2495 cat > conftest.$ac_ext <<EOF
2496 #line 2497 "configure"
2497 #include "confdefs.h"
2498 #include <sys/types.h>
2499 #include <sys/param.h>
2500 int main() {
2501
2502 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
2503 bogus endian macros
2504 #endif
2505 ; return 0; }
2506 EOF
2507 if { (eval echo configure:2508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2508 rm -rf conftest*
2509 # It does; now see whether it defined to BIG_ENDIAN or not.
2510 cat > conftest.$ac_ext <<EOF
2511 #line 2512 "configure"
2512 #include "confdefs.h"
2513 #include <sys/types.h>
2514 #include <sys/param.h>
2515 int main() {
2516
2517 #if BYTE_ORDER != BIG_ENDIAN
2518 not big endian
2519 #endif
2520 ; return 0; }
2521 EOF
2522 if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2523 rm -rf conftest*
2524 ac_cv_c_bigendian=yes
2525 else
2526 echo "configure: failed program was:" >&5
2527 cat conftest.$ac_ext >&5
2528 rm -rf conftest*
2529 ac_cv_c_bigendian=no
2530 fi
2531 rm -f conftest*
2532 else
2533 echo "configure: failed program was:" >&5
2534 cat conftest.$ac_ext >&5
2535 fi
2536 rm -f conftest*
2537 if test $ac_cv_c_bigendian = unknown; then
2538 if test "$cross_compiling" = yes; then
2539 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2540 else
2541 cat > conftest.$ac_ext <<EOF
2542 #line 2543 "configure"
2543 #include "confdefs.h"
2544 main () {
2545 /* Are we little or big endian? From Harbison&Steele. */
2546 union
2547 {
2548 long l;
2549 char c[sizeof (long)];
2550 } u;
2551 u.l = 1;
2552 exit (u.c[sizeof (long) - 1] == 1);
2553 }
2554 EOF
2555 if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2556 then
2557 ac_cv_c_bigendian=no
2558 else
2559 echo "configure: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 rm -fr conftest*
2562 ac_cv_c_bigendian=yes
2563 fi
2564 rm -fr conftest*
2565 fi
2566
2567 fi
2568 fi
2569
2570 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
2571 if test $ac_cv_c_bigendian = yes; then
2572 cat >> confdefs.h <<\EOF
2573 #define WORDS_BIGENDIAN 1
2574 EOF
2575
2576 fi
2577
2578 echo $ac_n "checking for inline""... $ac_c" 1>&6
2579 echo "configure:2580: checking for inline" >&5
2580 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
2581 echo $ac_n "(cached) $ac_c" 1>&6
2582 else
2583 ac_cv_c_inline=no
2584 for ac_kw in inline __inline__ __inline; do
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2588
2589 int main() {
2590 } $ac_kw foo() {
2591 ; return 0; }
2592 EOF
2593 if { (eval echo configure:2594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2594 rm -rf conftest*
2595 ac_cv_c_inline=$ac_kw; break
2596 else
2597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2599 fi
2600 rm -f conftest*
2601 done
2602
2603