/[cvs]/eggdrop-alpha/configure
ViewVC logotype

Contents of /eggdrop-alpha/configure

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


Revision 1.7 - (show annotations) (download)
Wed Apr 25 09:33:42 2001 UTC (19 years, 1 month ago) by tothwolf
Branch: MAIN
Changes since 1.6: +107 -124 lines
sync with 1.6.5-CVS-987657030

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