/[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.10 - (show annotations) (download)
Tue Aug 24 07:55:51 1999 UTC (20 years, 9 months ago) by guppy
Branch: MAIN
Changes since 1.9: +75 -75 lines
blah

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