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

Contents of /eggdrop1.4/configure

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


Revision 1.43 - (show annotations) (download)
Fri Dec 3 03:40:05 1999 UTC (20 years, 6 months ago) by guppy
Branch: MAIN
Changes since 1.42: +53 -53 lines
strip fix and the partfix (edited of course)

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