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

Annotation of /eggdrop-alpha/configure

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


Revision 1.8 - (hide annotations) (download)
Wed Jul 18 06:20:55 2001 UTC (18 years, 10 months ago) by tothwolf
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +557 -338 lines
sync with 1.6.6-CVS-995399486

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