/[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.7 - (show annotations) (download)
Fri Jul 23 03:51:49 1999 UTC (20 years, 10 months ago) by poptix
Branch: MAIN
Changes since 1.6: +1 -1 lines
 Committing in .

lets try looking in /lib for tcl =)

 Modified Files:
 	Makefile configure configure.in

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 DLOPEN_1=
1128 ;;
1129 BSD/OS)
1130 if test x`uname -r | cut -d . -f 1` = "x2"
1131 then
1132 echo "$ac_t""BSD/OS 2! statically linked modules are the only choice" 1>&6
1133 need_dl=0
1134 DEFAULT_MAKE=static
1135 else
1136 echo "$ac_t""BSD/OS 3+! ok I spose" 1>&6
1137 BEL_MOD_CC="shlicc"
1138 BEL_MOD_LD="shlicc"
1139 BEL_MOD_STRIP="${STRIP} -d"
1140 SHLIB_LD="shlicc -r"
1141 SHLIB_STRIP="touch"
1142 cat >> confdefs.h <<\EOF
1143 #define MODULES_OK 1
1144 EOF
1145
1146 fi
1147 # Extract the first word of "gmake", so it can be a program name with args.
1148 set dummy gmake; ac_word=$2
1149 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1150 echo "configure:1151: checking for $ac_word" >&5
1151 if eval "test \"`echo '$''{'ac_cv_prog_GMAKE'+set}'`\" = set"; then
1152 echo $ac_n "(cached) $ac_c" 1>&6
1153 else
1154 if test -n "$GMAKE"; then
1155 ac_cv_prog_GMAKE="$GMAKE" # Let the user override the test.
1156 else
1157 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1158 ac_dummy="$PATH"
1159 for ac_dir in $ac_dummy; do
1160 test -z "$ac_dir" && ac_dir=.
1161 if test -f $ac_dir/$ac_word; then
1162 ac_cv_prog_GMAKE="gmake"
1163 break
1164 fi
1165 done
1166 IFS="$ac_save_ifs"
1167 fi
1168 fi
1169 GMAKE="$ac_cv_prog_GMAKE"
1170 if test -n "$GMAKE"; then
1171 echo "$ac_t""$GMAKE" 1>&6
1172 else
1173 echo "$ac_t""no" 1>&6
1174 fi
1175
1176 if test "x$GMAKE" = "x"
1177 then
1178 echo ""
1179 echo "Yoicks! you have BSD/OS & you dont have 'gmake', you may"
1180 echo "not be able to compile the bot successfully :("
1181 echo ""
1182 fi
1183 ;;
1184 *BSD)
1185 echo "$ac_t""FreeBSD/NetBSD/OpenBSD - choose your poison" 1>&6
1186 SHLIB_CC="$CC -fpic"
1187 SHLIB_LD="ld -Bshareable -x"
1188 cat >> confdefs.h <<\EOF
1189 #define MODULES_OK 1
1190 EOF
1191
1192 DLOPEN_1=
1193 ;;
1194 SunOS)
1195 if test x`uname -r | cut -d . -f 1` = "x5"
1196 then
1197 echo "$ac_t""Solaris!" 1>&6
1198 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
1199 else
1200 echo "$ac_t""SunOS 4 :/" 1>&6
1201 SHLIB_LD="ld"
1202 SHLIB_STRIP="touch"
1203 fi
1204 cat >> confdefs.h <<\EOF
1205 #define MODULES_OK 1
1206 EOF
1207
1208 SHLIB_CC="${CC} -fPIC"
1209 BEL_MOD_CC="${CC} -fPIC"
1210 ;;
1211 OSF1)
1212 echo "$ac_t""OSF..." 1>&6
1213 case `uname -r | cut -d . -f 1` in
1214 V*)
1215 echo "$ac_t""Digital OSF" 1>&6
1216 SHLIB_LD="ld -shared -expect_unresolved '*'"
1217 SHLIB_STRIP="touch"
1218 cat >> confdefs.h <<\EOF
1219 #define MODULES_OK 1
1220 EOF
1221
1222 ;;
1223 1.0|1.1|1.2)
1224 echo "$ac_t""pre 1.3" 1>&6
1225 SHLIB_LD='ld -R -export $@:'
1226 cat >> confdefs.h <<\EOF
1227 #define OSF1_HACKS 1
1228 EOF
1229
1230 cat >> confdefs.h <<\EOF
1231 #define MODULES_OK 1
1232 EOF
1233
1234 ;;
1235 1.*)
1236 echo "$ac_t""1.3+" 1>&6
1237 SHLIB_CFL="$CC -fpic"
1238 SHLIB_LD='ld -shared'
1239 cat >> confdefs.h <<\EOF
1240 #define OSF1_HACKS 1
1241 EOF
1242
1243 cat >> confdefs.h <<\EOF
1244 #define MODULES_OK 1
1245 EOF
1246
1247 ;;
1248 *)
1249 echo "$ac_t""Some other weird OSF! No modules for you.." 1>&6
1250 need_dl=0
1251 DEFAULT_MAKE=static
1252 ;;
1253 esac
1254 cat >> confdefs.h <<\EOF
1255 #define STOP_UAC 1
1256 EOF
1257
1258 ;;
1259 HP-UX)
1260 echo "$ac_t""HP-UX" 1>&6
1261 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
1262 echo "configure:1263: checking for shl_load in -ldld" >&5
1263 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
1264 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1265 echo $ac_n "(cached) $ac_c" 1>&6
1266 else
1267 ac_save_LIBS="$LIBS"
1268 LIBS="-ldld $LIBS"
1269 cat > conftest.$ac_ext <<EOF
1270 #line 1271 "configure"
1271 #include "confdefs.h"
1272 /* Override any gcc2 internal prototype to avoid an error. */
1273 /* We use char because int might match the return type of a gcc2
1274 builtin and then its argument prototype would still apply. */
1275 char shl_load();
1276
1277 int main() {
1278 shl_load()
1279 ; return 0; }
1280 EOF
1281 if { (eval echo configure:1282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1282 rm -rf conftest*
1283 eval "ac_cv_lib_$ac_lib_var=yes"
1284 else
1285 echo "configure: failed program was:" >&5
1286 cat conftest.$ac_ext >&5
1287 rm -rf conftest*
1288 eval "ac_cv_lib_$ac_lib_var=no"
1289 fi
1290 rm -f conftest*
1291 LIBS="$ac_save_LIBS"
1292
1293 fi
1294 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1295 echo "$ac_t""yes" 1>&6
1296 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1297 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1298 cat >> confdefs.h <<EOF
1299 #define $ac_tr_lib 1
1300 EOF
1301
1302 LIBS="-ldld $LIBS"
1303
1304 else
1305 echo "$ac_t""no" 1>&6
1306 fi
1307
1308 cat >> confdefs.h <<\EOF
1309 #define MODULES_OK 1
1310 EOF
1311
1312 cat >> confdefs.h <<\EOF
1313 #define HPUX_HACKS 1
1314 EOF
1315
1316 if test x`uname -r | cut -d . -f 2` = "x10"
1317 then
1318 cat >> confdefs.h <<\EOF
1319 #define HPUX10_HACKS 1
1320 EOF
1321
1322 fi
1323 BEL_MOD_LD="gcc -Wl,-E"
1324 SHLIB_CC="gcc -fPIC"
1325 SHLIB_LD="ld -b"
1326 need_dl=0
1327 ;;
1328 IRIX64)
1329 echo "$ac_t""you are cursed with IRIX" 1>&6
1330 IRIX=yes
1331 STRIP=
1332 need_dl=0
1333 DEFAULT_MAKE=static
1334 ;;
1335 IRIX)
1336 echo "$ac_t""you are cursed with IRIX" 1>&6
1337 IRIX=yes
1338 STRIP=
1339 need_dl=0
1340 DEFAULT_MAKE=static
1341 ;;
1342 *)
1343 if test -r /mach
1344 then
1345 echo "$ac_t""NeXT...We are borg" 1>&6
1346 echo "$ac_t""break out the static modules" 1>&6
1347 echo "$ac_t""Hiya DK :P" 1>&6
1348 cat >> confdefs.h <<\EOF
1349 #define BORGCUBES 1
1350 EOF
1351
1352 else
1353 echo "$ac_t""Something unknown!!" 1>&6
1354 echo "$ac_t""If you get dynamic modules to work" 1>&6
1355 fi
1356 need_dl=0
1357 DEFAULT_MAKE=static
1358 ;;
1359 esac
1360
1361 if test ${IRIX} = yes
1362 then
1363 echo Skipping library tests because they CONFUSE Irix.
1364 else
1365 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
1366 echo "configure:1367: checking for socket in -lsocket" >&5
1367 ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
1368 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1369 echo $ac_n "(cached) $ac_c" 1>&6
1370 else
1371 ac_save_LIBS="$LIBS"
1372 LIBS="-lsocket $LIBS"
1373 cat > conftest.$ac_ext <<EOF
1374 #line 1375 "configure"
1375 #include "confdefs.h"
1376 /* Override any gcc2 internal prototype to avoid an error. */
1377 /* We use char because int might match the return type of a gcc2
1378 builtin and then its argument prototype would still apply. */
1379 char socket();
1380
1381 int main() {
1382 socket()
1383 ; return 0; }
1384 EOF
1385 if { (eval echo configure:1386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1386 rm -rf conftest*
1387 eval "ac_cv_lib_$ac_lib_var=yes"
1388 else
1389 echo "configure: failed program was:" >&5
1390 cat conftest.$ac_ext >&5
1391 rm -rf conftest*
1392 eval "ac_cv_lib_$ac_lib_var=no"
1393 fi
1394 rm -f conftest*
1395 LIBS="$ac_save_LIBS"
1396
1397 fi
1398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1399 echo "$ac_t""yes" 1>&6
1400 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1401 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1402 cat >> confdefs.h <<EOF
1403 #define $ac_tr_lib 1
1404 EOF
1405
1406 LIBS="-lsocket $LIBS"
1407
1408 else
1409 echo "$ac_t""no" 1>&6
1410 fi
1411
1412 echo $ac_n "checking for connect in -lnsl""... $ac_c" 1>&6
1413 echo "configure:1414: checking for connect in -lnsl" >&5
1414 ac_lib_var=`echo nsl'_'connect | sed 'y%./+-%__p_%'`
1415 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1416 echo $ac_n "(cached) $ac_c" 1>&6
1417 else
1418 ac_save_LIBS="$LIBS"
1419 LIBS="-lnsl $LIBS"
1420 cat > conftest.$ac_ext <<EOF
1421 #line 1422 "configure"
1422 #include "confdefs.h"
1423 /* Override any gcc2 internal prototype to avoid an error. */
1424 /* We use char because int might match the return type of a gcc2
1425 builtin and then its argument prototype would still apply. */
1426 char connect();
1427
1428 int main() {
1429 connect()
1430 ; return 0; }
1431 EOF
1432 if { (eval echo configure:1433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1433 rm -rf conftest*
1434 eval "ac_cv_lib_$ac_lib_var=yes"
1435 else
1436 echo "configure: failed program was:" >&5
1437 cat conftest.$ac_ext >&5
1438 rm -rf conftest*
1439 eval "ac_cv_lib_$ac_lib_var=no"
1440 fi
1441 rm -f conftest*
1442 LIBS="$ac_save_LIBS"
1443
1444 fi
1445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1446 echo "$ac_t""yes" 1>&6
1447 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1448 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1449 cat >> confdefs.h <<EOF
1450 #define $ac_tr_lib 1
1451 EOF
1452
1453 LIBS="-lnsl $LIBS"
1454
1455 else
1456 echo "$ac_t""no" 1>&6
1457 fi
1458
1459 echo $ac_n "checking for gethostbyname in -ldns""... $ac_c" 1>&6
1460 echo "configure:1461: checking for gethostbyname in -ldns" >&5
1461 ac_lib_var=`echo dns'_'gethostbyname | sed 'y%./+-%__p_%'`
1462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1463 echo $ac_n "(cached) $ac_c" 1>&6
1464 else
1465 ac_save_LIBS="$LIBS"
1466 LIBS="-ldns $LIBS"
1467 cat > conftest.$ac_ext <<EOF
1468 #line 1469 "configure"
1469 #include "confdefs.h"
1470 /* Override any gcc2 internal prototype to avoid an error. */
1471 /* We use char because int might match the return type of a gcc2
1472 builtin and then its argument prototype would still apply. */
1473 char gethostbyname();
1474
1475 int main() {
1476 gethostbyname()
1477 ; return 0; }
1478 EOF
1479 if { (eval echo configure:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1480 rm -rf conftest*
1481 eval "ac_cv_lib_$ac_lib_var=yes"
1482 else
1483 echo "configure: failed program was:" >&5
1484 cat conftest.$ac_ext >&5
1485 rm -rf conftest*
1486 eval "ac_cv_lib_$ac_lib_var=no"
1487 fi
1488 rm -f conftest*
1489 LIBS="$ac_save_LIBS"
1490
1491 fi
1492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1493 echo "$ac_t""yes" 1>&6
1494 ac_tr_lib=HAVE_LIB`echo dns | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1495 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1496 cat >> confdefs.h <<EOF
1497 #define $ac_tr_lib 1
1498 EOF
1499
1500 LIBS="-ldns $LIBS"
1501
1502 else
1503 echo "$ac_t""no" 1>&6
1504 fi
1505
1506 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
1507 echo "configure:1508: checking for dlopen in -ldl" >&5
1508 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
1509 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1510 echo $ac_n "(cached) $ac_c" 1>&6
1511 else
1512 ac_save_LIBS="$LIBS"
1513 LIBS="-ldl $LIBS"
1514 cat > conftest.$ac_ext <<EOF
1515 #line 1516 "configure"
1516 #include "confdefs.h"
1517 /* Override any gcc2 internal prototype to avoid an error. */
1518 /* We use char because int might match the return type of a gcc2
1519 builtin and then its argument prototype would still apply. */
1520 char dlopen();
1521
1522 int main() {
1523 dlopen()
1524 ; return 0; }
1525 EOF
1526 if { (eval echo configure:1527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1527 rm -rf conftest*
1528 eval "ac_cv_lib_$ac_lib_var=yes"
1529 else
1530 echo "configure: failed program was:" >&5
1531 cat conftest.$ac_ext >&5
1532 rm -rf conftest*
1533 eval "ac_cv_lib_$ac_lib_var=no"
1534 fi
1535 rm -f conftest*
1536 LIBS="$ac_save_LIBS"
1537
1538 fi
1539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1540 echo "$ac_t""yes" 1>&6
1541 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1542 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1543 cat >> confdefs.h <<EOF
1544 #define $ac_tr_lib 1
1545 EOF
1546
1547 LIBS="-ldl $LIBS"
1548
1549 else
1550 echo "$ac_t""no" 1>&6
1551 fi
1552
1553 if test x`${UNAME}` = "xSunOS"
1554 then
1555 echo $ac_n "checking for SunOS 4""... $ac_c" 1>&6
1556 echo "configure:1557: checking for SunOS 4" >&5
1557 if test x`uname -r | cut -d . -f 1` = "x5"
1558 then
1559 echo "$ac_t""Solaris -- "*bollocks*" zarni " 1>&6
1560 else
1561 echo "$ac_t""SunOS -- sigh" 1>&6
1562 echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
1563 echo "configure:1564: checking for main in -ldl" >&5
1564 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
1565 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1566 echo $ac_n "(cached) $ac_c" 1>&6
1567 else
1568 ac_save_LIBS="$LIBS"
1569 LIBS="-ldl $LIBS"
1570 cat > conftest.$ac_ext <<EOF
1571 #line 1572 "configure"
1572 #include "confdefs.h"
1573
1574 int main() {
1575 main()
1576 ; return 0; }
1577 EOF
1578 if { (eval echo configure:1579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1579 rm -rf conftest*
1580 eval "ac_cv_lib_$ac_lib_var=yes"
1581 else
1582 echo "configure: failed program was:" >&5
1583 cat conftest.$ac_ext >&5
1584 rm -rf conftest*
1585 eval "ac_cv_lib_$ac_lib_var=no"
1586 fi
1587 rm -f conftest*
1588 LIBS="$ac_save_LIBS"
1589
1590 fi
1591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1592 echo "$ac_t""yes" 1>&6
1593 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1594 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1595 cat >> confdefs.h <<EOF
1596 #define $ac_tr_lib 1
1597 EOF
1598
1599 LIBS="-ldl $LIBS"
1600
1601 else
1602 echo "$ac_t""no" 1>&6
1603 fi
1604
1605 fi
1606 fi
1607 fi
1608
1609 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
1610 echo "configure:1611: checking whether byte ordering is bigendian" >&5
1611 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
1612 echo $ac_n "(cached) $ac_c" 1>&6
1613 else
1614 ac_cv_c_bigendian=unknown
1615 # See if sys/param.h defines the BYTE_ORDER macro.
1616 cat > conftest.$ac_ext <<EOF
1617 #line 1618 "configure"
1618 #include "confdefs.h"
1619 #include <sys/types.h>
1620 #include <sys/param.h>
1621 int main() {
1622
1623 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
1624 bogus endian macros
1625 #endif
1626 ; return 0; }
1627 EOF
1628 if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1629 rm -rf conftest*
1630 # It does; now see whether it defined to BIG_ENDIAN or not.
1631 cat > conftest.$ac_ext <<EOF
1632 #line 1633 "configure"
1633 #include "confdefs.h"
1634 #include <sys/types.h>
1635 #include <sys/param.h>
1636 int main() {
1637
1638 #if BYTE_ORDER != BIG_ENDIAN
1639 not big endian
1640 #endif
1641 ; return 0; }
1642 EOF
1643 if { (eval echo configure:1644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1644 rm -rf conftest*
1645 ac_cv_c_bigendian=yes
1646 else
1647 echo "configure: failed program was:" >&5
1648 cat conftest.$ac_ext >&5
1649 rm -rf conftest*
1650 ac_cv_c_bigendian=no
1651 fi
1652 rm -f conftest*
1653 else
1654 echo "configure: failed program was:" >&5
1655 cat conftest.$ac_ext >&5
1656 fi
1657 rm -f conftest*
1658 if test $ac_cv_c_bigendian = unknown; then
1659 if test "$cross_compiling" = yes; then
1660 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1661 else
1662 cat > conftest.$ac_ext <<EOF
1663 #line 1664 "configure"
1664 #include "confdefs.h"
1665 main () {
1666 /* Are we little or big endian? From Harbison&Steele. */
1667 union
1668 {
1669 long l;
1670 char c[sizeof (long)];
1671 } u;
1672 u.l = 1;
1673 exit (u.c[sizeof (long) - 1] == 1);
1674 }
1675 EOF
1676 if { (eval echo configure:1677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1677 then
1678 ac_cv_c_bigendian=no
1679 else
1680 echo "configure: failed program was:" >&5
1681 cat conftest.$ac_ext >&5
1682 rm -fr conftest*
1683 ac_cv_c_bigendian=yes
1684 fi
1685 rm -fr conftest*
1686 fi
1687
1688 fi
1689 fi
1690
1691 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
1692 if test $ac_cv_c_bigendian = yes; then
1693 cat >> confdefs.h <<\EOF
1694 #define WORDS_BIGENDIAN 1
1695 EOF
1696
1697 fi
1698
1699 echo $ac_n "checking size of long""... $ac_c" 1>&6
1700 echo "configure:1701: checking size of long" >&5
1701 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
1702 echo $ac_n "(cached) $ac_c" 1>&6
1703 else
1704 if test "$cross_compiling" = yes; then
1705 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1706 else
1707 cat > conftest.$ac_ext <<EOF
1708 #line 1709 "configure"
1709 #include "confdefs.h"
1710 #include <stdio.h>
1711 main()
1712 {
1713 FILE *f=fopen("conftestval", "w");
1714 if (!f) exit(1);
1715 fprintf(f, "%d\n", sizeof(long));
1716 exit(0);
1717 }
1718 EOF
1719 if { (eval echo configure:1720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1720 then
1721 ac_cv_sizeof_long=`cat conftestval`
1722 else
1723 echo "configure: failed program was:" >&5
1724 cat conftest.$ac_ext >&5
1725 rm -fr conftest*
1726 ac_cv_sizeof_long=0
1727 fi
1728 rm -fr conftest*
1729 fi
1730
1731 fi
1732 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
1733 cat >> confdefs.h <<EOF
1734 #define SIZEOF_LONG $ac_cv_sizeof_long
1735 EOF
1736
1737
1738 echo $ac_n "checking size of int""... $ac_c" 1>&6
1739 echo "configure:1740: checking size of int" >&5
1740 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
1741 echo $ac_n "(cached) $ac_c" 1>&6
1742 else
1743 if test "$cross_compiling" = yes; then
1744 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1745 else
1746 cat > conftest.$ac_ext <<EOF
1747 #line 1748 "configure"
1748 #include "confdefs.h"
1749 #include <stdio.h>
1750 main()
1751 {
1752 FILE *f=fopen("conftestval", "w");
1753 if (!f) exit(1);
1754 fprintf(f, "%d\n", sizeof(int));
1755 exit(0);
1756 }
1757 EOF
1758 if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1759 then
1760 ac_cv_sizeof_int=`cat conftestval`
1761 else
1762 echo "configure: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 rm -fr conftest*
1765 ac_cv_sizeof_int=0
1766 fi
1767 rm -fr conftest*
1768 fi
1769
1770 fi
1771 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1772 cat >> confdefs.h <<EOF
1773 #define SIZEOF_INT $ac_cv_sizeof_int
1774 EOF
1775
1776
1777
1778 ac_header_dirent=no
1779 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1780 do
1781 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1782 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
1783 echo "configure:1784: checking for $ac_hdr that defines DIR" >&5
1784 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
1785 echo $ac_n "(cached) $ac_c" 1>&6
1786 else
1787 cat > conftest.$ac_ext <<EOF
1788 #line 1789 "configure"
1789 #include "confdefs.h"
1790 #include <sys/types.h>
1791 #include <$ac_hdr>
1792 int main() {
1793 DIR *dirp = 0;
1794 ; return 0; }
1795 EOF
1796 if { (eval echo configure:1797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1797 rm -rf conftest*
1798 eval "ac_cv_header_dirent_$ac_safe=yes"
1799 else
1800 echo "configure: failed program was:" >&5
1801 cat conftest.$ac_ext >&5
1802 rm -rf conftest*
1803 eval "ac_cv_header_dirent_$ac_safe=no"
1804 fi
1805 rm -f conftest*
1806 fi
1807 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
1808 echo "$ac_t""yes" 1>&6
1809 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1810 cat >> confdefs.h <<EOF
1811 #define $ac_tr_hdr 1
1812 EOF
1813 ac_header_dirent=$ac_hdr; break
1814 else
1815 echo "$ac_t""no" 1>&6
1816 fi
1817 done
1818 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1819 if test $ac_header_dirent = dirent.h; then
1820 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
1821 echo "configure:1822: checking for opendir in -ldir" >&5
1822 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
1823 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1824 echo $ac_n "(cached) $ac_c" 1>&6
1825 else
1826 ac_save_LIBS="$LIBS"
1827 LIBS="-ldir $LIBS"
1828 cat > conftest.$ac_ext <<EOF
1829 #line 1830 "configure"
1830 #include "confdefs.h"
1831 /* Override any gcc2 internal prototype to avoid an error. */
1832 /* We use char because int might match the return type of a gcc2
1833 builtin and then its argument prototype would still apply. */
1834 char opendir();
1835
1836 int main() {
1837 opendir()
1838 ; return 0; }
1839 EOF
1840 if { (eval echo configure:1841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1841 rm -rf conftest*
1842 eval "ac_cv_lib_$ac_lib_var=yes"
1843 else
1844 echo "configure: failed program was:" >&5
1845 cat conftest.$ac_ext >&5
1846 rm -rf conftest*
1847 eval "ac_cv_lib_$ac_lib_var=no"
1848 fi
1849 rm -f conftest*
1850 LIBS="$ac_save_LIBS"
1851
1852 fi
1853 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1854 echo "$ac_t""yes" 1>&6
1855 LIBS="$LIBS -ldir"
1856 else
1857 echo "$ac_t""no" 1>&6
1858 fi
1859
1860 else
1861 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
1862 echo "configure:1863: checking for opendir in -lx" >&5
1863 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
1864 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1865 echo $ac_n "(cached) $ac_c" 1>&6
1866 else
1867 ac_save_LIBS="$LIBS"
1868 LIBS="-lx $LIBS"
1869 cat > conftest.$ac_ext <<EOF
1870 #line 1871 "configure"
1871 #include "confdefs.h"
1872 /* Override any gcc2 internal prototype to avoid an error. */
1873 /* We use char because int might match the return type of a gcc2
1874 builtin and then its argument prototype would still apply. */
1875 char opendir();
1876
1877 int main() {
1878 opendir()
1879 ; return 0; }
1880 EOF
1881 if { (eval echo configure:1882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1882 rm -rf conftest*
1883 eval "ac_cv_lib_$ac_lib_var=yes"
1884 else
1885 echo "configure: failed program was:" >&5
1886 cat conftest.$ac_ext >&5
1887 rm -rf conftest*
1888 eval "ac_cv_lib_$ac_lib_var=no"
1889 fi
1890 rm -f conftest*
1891 LIBS="$ac_save_LIBS"
1892
1893 fi
1894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1895 echo "$ac_t""yes" 1>&6
1896 LIBS="$LIBS -lx"
1897 else
1898 echo "$ac_t""no" 1>&6
1899 fi
1900
1901 fi
1902
1903 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
1904 echo "configure:1905: checking for sys/wait.h that is POSIX.1 compatible" >&5
1905 if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
1906 echo $ac_n "(cached) $ac_c" 1>&6
1907 else
1908 cat > conftest.$ac_ext <<EOF
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911 #include <sys/types.h>
1912 #include <sys/wait.h>
1913 #ifndef WEXITSTATUS
1914 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
1915 #endif
1916 #ifndef WIFEXITED
1917 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
1918 #endif
1919 int main() {
1920 int s;
1921 wait (&s);
1922 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
1923 ; return 0; }
1924 EOF
1925 if { (eval echo configure:1926: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1926 rm -rf conftest*
1927 ac_cv_header_sys_wait_h=yes
1928 else
1929 echo "configure: failed program was:" >&5
1930 cat conftest.$ac_ext >&5
1931 rm -rf conftest*
1932 ac_cv_header_sys_wait_h=no
1933 fi
1934 rm -f conftest*
1935 fi
1936
1937 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
1938 if test $ac_cv_header_sys_wait_h = yes; then
1939 cat >> confdefs.h <<\EOF
1940 #define HAVE_SYS_WAIT_H 1
1941 EOF
1942
1943 fi
1944
1945 for ac_hdr in sys/time.h sys/select.h sys/rusage.h unistd.h stdarg.h dlfcn.h
1946 do
1947 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1948 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1949 echo "configure:1950: checking for $ac_hdr" >&5
1950 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1951 echo $ac_n "(cached) $ac_c" 1>&6
1952 else
1953 cat > conftest.$ac_ext <<EOF
1954 #line 1955 "configure"
1955 #include "confdefs.h"
1956 #include <$ac_hdr>
1957 EOF
1958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1959 { (eval echo configure:1960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1961 if test -z "$ac_err"; then
1962 rm -rf conftest*
1963 eval "ac_cv_header_$ac_safe=yes"
1964 else
1965 echo "$ac_err" >&5
1966 echo "configure: failed program was:" >&5
1967 cat conftest.$ac_ext >&5
1968 rm -rf conftest*
1969 eval "ac_cv_header_$ac_safe=no"
1970 fi
1971 rm -f conftest*
1972 fi
1973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1974 echo "$ac_t""yes" 1>&6
1975 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1976 cat >> confdefs.h <<EOF
1977 #define $ac_tr_hdr 1
1978 EOF
1979
1980 else
1981 echo "$ac_t""no" 1>&6
1982 fi
1983 done
1984
1985
1986 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1987 echo "configure:1988: checking for ANSI C header files" >&5
1988 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1989 echo $ac_n "(cached) $ac_c" 1>&6
1990 else
1991 cat > conftest.$ac_ext <<EOF
1992 #line 1993 "configure"
1993 #include "confdefs.h"
1994 #include <stdlib.h>
1995 #include <stdarg.h>
1996 #include <string.h>
1997 #include <float.h>
1998 EOF
1999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2000 { (eval echo configure:2001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2002 if test -z "$ac_err"; then
2003 rm -rf conftest*
2004 ac_cv_header_stdc=yes
2005 else
2006 echo "$ac_err" >&5
2007 echo "configure: failed program was:" >&5
2008 cat conftest.$ac_ext >&5
2009 rm -rf conftest*
2010 ac_cv_header_stdc=no
2011 fi
2012 rm -f conftest*
2013
2014 if test $ac_cv_header_stdc = yes; then
2015 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
2016 cat > conftest.$ac_ext <<EOF
2017 #line 2018 "configure"
2018 #include "confdefs.h"
2019 #include <string.h>
2020 EOF
2021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2022 egrep "memchr" >/dev/null 2>&1; then
2023 :
2024 else
2025 rm -rf conftest*
2026 ac_cv_header_stdc=no
2027 fi
2028 rm -f conftest*
2029
2030 fi
2031
2032 if test $ac_cv_header_stdc = yes; then
2033 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
2034 cat > conftest.$ac_ext <<EOF
2035 #line 2036 "configure"
2036 #include "confdefs.h"
2037 #include <stdlib.h>
2038 EOF
2039 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2040 egrep "free" >/dev/null 2>&1; then
2041 :
2042 else
2043 rm -rf conftest*
2044 ac_cv_header_stdc=no
2045 fi
2046 rm -f conftest*
2047
2048 fi
2049
2050 if test $ac_cv_header_stdc = yes; then
2051 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
2052 if test "$cross_compiling" = yes; then
2053 :
2054 else
2055 cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <ctype.h>
2059 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2060 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
2061 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
2062 int main () { int i; for (i = 0; i < 256; i++)
2063 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2064 exit (0); }
2065
2066 EOF
2067 if { (eval echo configure:2068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2068 then
2069 :
2070 else
2071 echo "configure: failed program was:" >&5
2072 cat conftest.$ac_ext >&5
2073 rm -fr conftest*
2074 ac_cv_header_stdc=no
2075 fi
2076 rm -fr conftest*
2077 fi
2078
2079 fi
2080 fi
2081
2082 echo "$ac_t""$ac_cv_header_stdc" 1>&6
2083 if test $ac_cv_header_stdc = yes; then
2084 cat >> confdefs.h <<\EOF
2085 #define STDC_HEADERS 1
2086 EOF
2087
2088 fi
2089
2090 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2091 echo "configure:2092: checking for pid_t" >&5
2092 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2093 echo $ac_n "(cached) $ac_c" 1>&6
2094 else
2095 cat > conftest.$ac_ext <<EOF
2096 #line 2097 "configure"
2097 #include "confdefs.h"
2098 #include <sys/types.h>
2099 #if STDC_HEADERS
2100 #include <stdlib.h>
2101 #include <stddef.h>
2102 #endif
2103 EOF
2104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2105 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2106 rm -rf conftest*
2107 ac_cv_type_pid_t=yes
2108 else
2109 rm -rf conftest*
2110 ac_cv_type_pid_t=no
2111 fi
2112 rm -f conftest*
2113
2114 fi
2115 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2116 if test $ac_cv_type_pid_t = no; then
2117 cat >> confdefs.h <<\EOF
2118 #define pid_t int
2119 EOF
2120
2121 fi
2122
2123 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
2124 echo "configure:2125: checking whether time.h and sys/time.h may both be included" >&5
2125 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
2127 else
2128 cat > conftest.$ac_ext <<EOF
2129 #line 2130 "configure"
2130 #include "confdefs.h"
2131 #include <sys/types.h>
2132 #include <sys/time.h>
2133 #include <time.h>
2134 int main() {
2135 struct tm *tp;
2136 ; return 0; }
2137 EOF
2138 if { (eval echo configure:2139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2139 rm -rf conftest*
2140 ac_cv_header_time=yes
2141 else
2142 echo "configure: failed program was:" >&5
2143 cat conftest.$ac_ext >&5
2144 rm -rf conftest*
2145 ac_cv_header_time=no
2146 fi
2147 rm -f conftest*
2148 fi
2149
2150 echo "$ac_t""$ac_cv_header_time" 1>&6
2151 if test $ac_cv_header_time = yes; then
2152 cat >> confdefs.h <<\EOF
2153 #define TIME_WITH_SYS_TIME 1
2154 EOF
2155
2156 fi
2157
2158
2159 for ac_func in rename getrusage getdtablesize srandom random sigaction
2160 do
2161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2162 echo "configure:2163: checking for $ac_func" >&5
2163 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2164 echo $ac_n "(cached) $ac_c" 1>&6
2165 else
2166 cat > conftest.$ac_ext <<EOF
2167 #line 2168 "configure"
2168 #include "confdefs.h"
2169 /* System header to define __stub macros and hopefully few prototypes,
2170 which can conflict with char $ac_func(); below. */
2171 #include <assert.h>
2172 /* Override any gcc2 internal prototype to avoid an error. */
2173 /* We use char because int might match the return type of a gcc2
2174 builtin and then its argument prototype would still apply. */
2175 char $ac_func();
2176
2177 int main() {
2178
2179 /* The GNU C library defines this for functions which it implements
2180 to always fail with ENOSYS. Some functions are actually named
2181 something starting with __ and the normal name is an alias. */
2182 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2183 choke me
2184 #else
2185 $ac_func();
2186 #endif
2187
2188 ; return 0; }
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2191 rm -rf conftest*
2192 eval "ac_cv_func_$ac_func=yes"
2193 else
2194 echo "configure: failed program was:" >&5
2195 cat conftest.$ac_ext >&5
2196 rm -rf conftest*
2197 eval "ac_cv_func_$ac_func=no"
2198 fi
2199 rm -f conftest*
2200 fi
2201
2202 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2203 echo "$ac_t""yes" 1>&6
2204 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2205 cat >> confdefs.h <<EOF
2206 #define $ac_tr_func 1
2207 EOF
2208
2209 else
2210 echo "$ac_t""no" 1>&6
2211 fi
2212 done
2213
2214 for ac_func in sigemptyset vsprintf strcasecmp setpgid clock dlopen
2215 do
2216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2217 echo "configure:2218: checking for $ac_func" >&5
2218 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2219 echo $ac_n "(cached) $ac_c" 1>&6
2220 else
2221 cat > conftest.$ac_ext <<EOF
2222 #line 2223 "configure"
2223 #include "confdefs.h"
2224 /* System header to define __stub macros and hopefully few prototypes,
2225 which can conflict with char $ac_func(); below. */
2226 #include <assert.h>
2227 /* Override any gcc2 internal prototype to avoid an error. */
2228 /* We use char because int might match the return type of a gcc2
2229 builtin and then its argument prototype would still apply. */
2230 char $ac_func();
2231
2232 int main() {
2233
2234 /* The GNU C library defines this for functions which it implements
2235 to always fail with ENOSYS. Some functions are actually named
2236 something starting with __ and the normal name is an alias. */
2237 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2238 choke me
2239 #else
2240 $ac_func();
2241 #endif
2242
2243 ; return 0; }
2244 EOF
2245 if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2246 rm -rf conftest*
2247 eval "ac_cv_func_$ac_func=yes"
2248 else
2249 echo "configure: failed program was:" >&5
2250 cat conftest.$ac_ext >&5
2251 rm -rf conftest*
2252 eval "ac_cv_func_$ac_func=no"
2253 fi
2254 rm -f conftest*
2255 fi
2256
2257 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2258 echo "$ac_t""yes" 1>&6
2259 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2260 cat >> confdefs.h <<EOF
2261 #define $ac_tr_func 1
2262 EOF
2263
2264 else
2265 echo "$ac_t""no" 1>&6
2266 fi
2267 done
2268
2269 for ac_func in dprintf bzero uname vsnprintf
2270 do
2271 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2272 echo "configure:2273: checking for $ac_func" >&5
2273 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2274 echo $ac_n "(cached) $ac_c" 1>&6
2275 else
2276 cat > conftest.$ac_ext <<EOF
2277 #line 2278 "configure"
2278 #include "confdefs.h"
2279 /* System header to define __stub macros and hopefully few prototypes,
2280 which can conflict with char $ac_func(); below. */
2281 #include <assert.h>
2282 /* Override any gcc2 internal prototype to avoid an error. */
2283 /* We use char because int might match the return type of a gcc2
2284 builtin and then its argument prototype would still apply. */
2285 char $ac_func();
2286
2287 int main() {
2288
2289 /* The GNU C library defines this for functions which it implements
2290 to always fail with ENOSYS. Some functions are actually named
2291 something starting with __ and the normal name is an alias. */
2292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2293 choke me
2294 #else
2295 $ac_func();
2296 #endif
2297
2298 ; return 0; }
2299 EOF
2300 if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2301 rm -rf conftest*
2302 eval "ac_cv_func_$ac_func=yes"
2303 else
2304 echo "configure: failed program was:" >&5
2305 cat conftest.$ac_ext >&5
2306 rm -rf conftest*
2307 eval "ac_cv_func_$ac_func=no"
2308 fi
2309 rm -f conftest*
2310 fi
2311
2312 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2313 echo "$ac_t""yes" 1>&6
2314 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2315 cat >> confdefs.h <<EOF
2316 #define $ac_tr_func 1
2317 EOF
2318
2319 else
2320 echo "$ac_t""no" 1>&6
2321 fi
2322 done
2323
2324
2325 if test "${ac_cv_func_vsprintf}" = "no"
2326 then
2327 echo ""
2328 echo "Your system does not have the sprintf/vsprintf libraries."
2329 echo "These are required to compile almost anything. Sorry."
2330 echo ""
2331 exit
2332 fi
2333
2334 if test "${ac_cv_header_stdc}" = "no"
2335 then
2336 echo ""
2337 echo "Your system must support ANSI C Header files."
2338 echo "These are required for the language support. Sorry."
2339 exit
2340 fi
2341
2342 echo $ac_n "checking space left in file database struct""... $ac_c" 1>&6
2343 echo "configure:2344: checking space left in file database struct" >&5
2344 cat >abacab.c <<'EOF'
2345 #include <stdio.h>
2346 #include <sys/time.h>
2347 #include "src/mod/filesys.mod/files.h"
2348 main() {
2349 fprintf(stderr,"%d/%d",512-sizeof(struct filler),sizeof(filedb));
2350 }
2351 EOF
2352 ${CC} -o abacab abacab.c
2353 FILEDB_SPACE=`./abacab`
2354 echo "$ac_t""$FILEDB_SPACE bytes" 1>&6
2355 rm -f abacab abacab.o abacab.c
2356 echo " (standard is currently 48/512 bytes)"
2357
2358
2359 # ---------- begin robey's tcl thingies
2360
2361 # Extract the first word of "basename", so it can be a program name with args.
2362 set dummy basename; ac_word=$2
2363 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2364 echo "configure:2365: checking for $ac_word" >&5
2365 if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
2366 echo $ac_n "(cached) $ac_c" 1>&6
2367 else
2368 if test -n "$BASENAME"; then
2369 ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test.
2370 else
2371 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2372 ac_dummy="$PATH"
2373 for ac_dir in $ac_dummy; do
2374 test -z "$ac_dir" && ac_dir=.
2375 if test -f $ac_dir/$ac_word; then
2376 ac_cv_prog_BASENAME="basename"
2377 break
2378 fi
2379 done
2380 IFS="$ac_save_ifs"
2381 fi
2382 fi
2383 BASENAME="$ac_cv_prog_BASENAME"
2384 if test -n "$BASENAME"; then
2385 echo "$ac_t""$BASENAME" 1>&6
2386 else
2387 echo "$ac_t""no" 1>&6
2388 fi
2389
2390 # Extract the first word of "dirname", so it can be a program name with args.
2391 set dummy dirname; ac_word=$2
2392 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2393 echo "configure:2394: checking for $ac_word" >&5
2394 if eval "test \"`echo '$''{'ac_cv_prog_DIRNAME'+set}'`\" = set"; then
2395 echo $ac_n "(cached) $ac_c" 1>&6
2396 else
2397 if test -n "$DIRNAME"; then
2398 ac_cv_prog_DIRNAME="$DIRNAME" # Let the user override the test.
2399 else
2400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2401 ac_dummy="$PATH"
2402 for ac_dir in $ac_dummy; do
2403 test -z "$ac_dir" && ac_dir=.
2404 if test -f $ac_dir/$ac_word; then
2405 ac_cv_prog_DIRNAME="dirname"
2406 break
2407 fi
2408 done
2409 IFS="$ac_save_ifs"
2410 fi
2411 fi
2412 DIRNAME="$ac_cv_prog_DIRNAME"
2413 if test -n "$DIRNAME"; then
2414 echo "$ac_t""$DIRNAME" 1>&6
2415 else
2416 echo "$ac_t""no" 1>&6
2417 fi
2418
2419 if test $BASENAME = "" || test $DIRNAME = ""
2420 then
2421 echo ack...no basename or dirname, we cant configure tcl without em.
2422 exit 1
2423 fi
2424
2425 # Check whether --with-tcllib or --without-tcllib was given.
2426 if test "${with_tcllib+set}" = set; then
2427 withval="$with_tcllib"
2428 tcllibname=$withval
2429 fi
2430
2431 # Check whether --with-tclinc or --without-tclinc was given.
2432 if test "${with_tclinc+set}" = set; then
2433 withval="$with_tclinc"
2434 tclincname=$withval
2435 fi
2436
2437
2438 if test -r "$tcllibname"
2439 then
2440 TCLLIB=`$DIRNAME $tcllibname`
2441 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
2442 echo "using tcllib $TCLLIB/lib$TCLLIBFN"
2443 else
2444
2445 libnames="tcl.so tcl.so.1\
2446 tcl8.2.so tcl8.2.so.1 tcl82.so.1.0 tcl82.so.1\
2447 tcl8.1.so tcl8.1.so.1 tcl81.so.1.0 tcl81.so.1\
2448 tcl8.0.so tcl8.0.so.1 tcl80.so.1.0 tcl80.so.1\
2449 tcl7.6.so tcl7.6.so.1 tcl76.so.1.0 tcl76.so.1\
2450 tcl7.5.so tcl7.5.so.1 tcl75.so.1.0 tcl75.so.1\
2451 tcl.a\
2452 tcl8.2.a tcl82.a\
2453 tcl8.1.a tcl81.a\
2454 tcl8.0.a tcl80.a\
2455 tcl7.6.a tcl76.a\
2456 tcl7.5.a tcl75.a\
2457 tcl7.4.a tcl74.a"
2458
2459 # look for libtcl: if TCLLIB is set, check there first
2460 if test "$TCLLIB" != ""
2461 then
2462 TCLLIBFN=notfound
2463 for checkfn in $libnames
2464 do
2465 if test -r $TCLLIB/lib$checkfn
2466 then
2467 if test $TCLLIBFN = notfound
2468 then
2469 TCLLIBFN=$checkfn
2470 fi
2471 fi
2472 done
2473 if test $TCLLIBFN = notfound
2474 then
2475 echo "Environment variable TCLLIB is set, but incorrect."
2476 unset TCLLIB
2477 fi
2478 fi
2479
2480 # check in common places now
2481 echo $ac_n "checking for libtcl""... $ac_c" 1>&6
2482 echo "configure:2483: checking for libtcl" >&5
2483 if test "$TCLLIB" = ""
2484 then
2485 for checkfn in $libnames
2486 do
2487 if test "$TCLLIB" = ""
2488 then
2489 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
2490 do
2491 if test -r $check/lib$checkfn
2492 then
2493 if test "$TCLLIB" = ""
2494 then
2495 echo "$ac_t""found in $check/lib$checkfn" 1>&6
2496 TCLLIB=$check
2497 TCLLIBFN=$checkfn
2498 fi
2499 fi
2500 done
2501 fi
2502 done
2503 else
2504 echo "$ac_t""found in $TCLLIB/lib$TCLLIBFN" 1>&6
2505 fi
2506
2507 fi # option
2508
2509 # give up if they don't even have that
2510 if test "$TCLLIB" = ""
2511 then
2512 echo "$ac_t""not found" 1>&6
2513 fi
2514
2515 # now look for pesky $TCLINCFN file
2516 if test -r "$tclincname"
2517 then
2518 TCLINC=`$DIRNAME $tclincname`
2519 TCLINCFN=`$BASENAME $tclincname`
2520 echo "using TCL header $TCLINC/$TCLINCFN"
2521 else
2522 TCLINCFN=tcl.h
2523 if test "$TCLINC" != ""
2524 then
2525 if test ! -r $TCLINC/$TCLINCFN
2526 then
2527 echo "Environment variable TCLINC is set, but incorrect."
2528 unset TCLINC
2529 fi
2530 fi
2531
2532 # check in common places now
2533 echo $ac_n "checking for $TCLINCFN""... $ac_c" 1>&6
2534 echo "configure:2535: checking for $TCLINCFN" >&5
2535 if test "$TCLINC" = ""
2536 then
2537 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
2538 do
2539 if test -r $check/$TCLINCFN
2540 then
2541 if test "$TCLINC" != ""
2542 then
2543 break
2544 fi
2545 echo "$ac_t""found in $check/$TCLINCFN" 1>&6
2546 TCLINC=$check
2547 break
2548 fi
2549 done
2550 # freebsd hack
2551 if test "$TCLINC" = ""
2552 then
2553 for ver in 8.2 8.1 8.0 7.6 7.5 7.4
2554 do
2555 if test -r /usr/local/include/tcl$ver/$TCLINCFN
2556 then
2557 if test "$TCLINC" != ""
2558 then
2559 break
2560 fi
2561 echo "$ac_t""found in /usr/local/include/tcl$ver/$TCLINCFN" 1>&6
2562 TCLINC=/usr/local/include/tcl$ver
2563 break
2564 fi
2565 done
2566 fi
2567 else
2568 echo "$ac_t""found in $TCLINC/$TCLINCFN" 1>&6
2569 fi
2570
2571 # had TCLLIB but not TCLINC? so close... :(
2572 if test "$TCLINC" = ""
2573 then
2574 echo "$ac_t""not found" 1>&6
2575 unset TCLLIB
2576 unset TCLLIBFN
2577 fi
2578 fi # option
2579
2580 # done looking, now either TCLLIB & TCLINC are both set, or neither is set
2581
2582 if test "$TCLLIB" = ""
2583 then
2584 echo ""
2585 echo "I can't find Tcl on this system."
2586 echo ""
2587 echo "Eggdrop now requires Tcl to compile. If you already have Tcl"
2588 echo "installed on this system, and I just wasn't looking in the right"
2589 echo "place for it, set the environment variables TCLLIB and TCLINC so"
2590 echo "I will know where to find 'libtcl.a' (or 'libtcl.so') and '$TCLINCFN'"
2591 echo "(respectively). Then run 'configure' again."
2592 echo ""
2593 echo "Read the README file if you don't know what Tcl is or how to get"
2594 echo "it and install it."
2595 echo ""
2596 exit 1
2597 else
2598 echo Checking $TCLINC directory for tcl version
2599 echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
2600 echo "configure:2601: checking for Tcl version" >&5
2601 tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "7.5" | wc -l`
2602 if test $tclver = 0; then
2603 tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "7.6" | wc -l`
2604 if test $tclver = 0; then
2605 tclver=`grep TCL_VERSION $TCLINC/$TCLINCFN | grep "8.0" | wc -l`
2606 if test $tclver = 0; then
2607 tclver=`grep TCL_VERSION