/[cvs]/eggdrop1.9/configure.in
ViewVC logotype

Contents of /eggdrop1.9/configure.in

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


Revision 1.7 - (show annotations) (download)
Thu Oct 21 19:22:58 1999 UTC (19 years, 8 months ago) by fabian
Branch: MAIN
Changes since 1.6: +398 -243 lines
resync with 1.3 tree, 939863113-940380771

1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(eggdrop.conf.dist)
3 ac_default_prefix=\${HOME}/eggdrop
4 AC_CONFIG_HEADER(config.h)
5
6 AC_MSG_RESULT()
7 AC_MSG_RESULT(This is eggdrop's GNU configure script.)
8 AC_MSG_RESULT(It's going to run a bunch of strange tests to hopefully)
9 AC_MSG_RESULT(make your compile work without much twiddling.)
10 AC_MSG_RESULT()
11
12 AC_PROG_CC
13
14 dnl no cross-compiling!
15 if test ! "x${cross_compiling}" = "xno"
16 then
17 cat << 'EOF' >&2
18 configure: error:
19
20 This system does not appear to have a working C compiler.
21 A working C compiler is required to compile eggdrop.
22
23 EOF
24 exit 1
25 fi
26
27 dnl crazy machines
28 AC_AIX
29 AC_ISC_POSIX
30 AC_MINIX
31
32 dnl Checks for programs.
33 AC_PROG_MAKE_SET
34 AC_PROG_RANLIB
35 AC_PROG_INSTALL
36 AC_PROG_LN_S
37 AC_CHECK_PROG(STRIP,strip,strip)
38 AC_CHECK_PROG(UNAME,uname,uname)
39
40 dnl awk is needed for Tcl library stuff and version number checking.
41 AC_PROG_AWK
42 if test "x${AWK}" = "x"
43 then
44 cat << 'EOF' >&2
45 configure: error:
46
47 This system seems to lack a working 'awk' command.
48 A working 'awk' command is required to compile eggdrop.
49
50 EOF
51 exit 1
52 fi
53
54 dnl basename is needed for Tcl library stuff.
55 AC_CHECK_PROG(BASENAME,basename,basename)
56 if test "x${BASENAME}" = "x"
57 then
58 cat << 'EOF' >&2
59 configure: error:
60
61 This system seems to lack a working 'basename' command.
62 A working 'basename' command is required to compile eggdrop.
63
64 EOF
65 exit 1
66 fi
67
68 dnl dirname is needed for Tcl library stuff.
69 AC_CHECK_PROG(DIRNAME,dirname,dirname)
70 if test "x${DIRNAME}" = "x"
71 then
72 cat << 'EOF' >&2
73 configure: error:
74
75 This system seems to lack a working 'dirname' command.
76 A working 'dirname' command is required to compile eggdrop.
77
78 EOF
79 exit 1
80 fi
81
82 dnl stop putting -g in there! @#$!#$%!
83 if test "x${CFLAGS}" = "x"
84 then
85 if test "x${CC}" = "xgcc"
86 then
87 CFLAGS="-O2"
88 else
89 CFLAGS="-O"
90 fi
91 fi
92
93 if test "x${STRIP}" = "x"
94 then
95 STRIP=touch
96 fi
97
98 dnl test the os and set the module linking settings
99 EGGEXEC=eggdrop
100 LINUX=no
101 IRIX=no
102 SUNOS=no
103 HPUX=no
104 MOD_CC="${CC}"
105 MOD_LD="${CC}"
106 MOD_STRIP="${STRIP}"
107 SHLIB_CC="${CC}"
108 SHLIB_LD="${CC}"
109 SHLIB_STRIP="${STRIP}"
110 NEED_DL=1
111 DEFAULT_MAKE=eggdrop
112 AC_MSG_CHECKING(your OS)
113 SYSTEM=`${UNAME}`
114 case "$SYSTEM" in
115 BSD/OS)
116 if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
117 then
118 AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)
119 NEED_DL=0
120 DEFAULT_MAKE=static
121 else
122 AC_MSG_RESULT(BSD/OS 3+! ok I spose)
123 MOD_CC=shlicc
124 MOD_LD=shlicc
125 MOD_STRIP="${STRIP} -d"
126 SHLIB_LD="shlicc -r"
127 SHLIB_STRIP=touch
128 AC_DEFINE(MODULES_OK)
129 fi
130 ;;
131 CYGWIN*)
132 AC_MSG_RESULT(Cygwin)
133 NEED_DL=0
134 DEFAULT_MAKE=static
135 ;;
136 HP-UX)
137 AC_MSG_RESULT([HP-UX, just shoot yourself now])
138 HPUX=yes
139 MOD_LD="gcc -Wl,-E"
140 SHLIB_CC="gcc -fPIC"
141 SHLIB_LD="ld -b"
142 NEED_DL=0
143 AC_DEFINE(MODULES_OK)
144 AC_DEFINE(HPUX_HACKS)
145 if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
146 then
147 AC_DEFINE(HPUX10_HACKS)
148 fi
149 ;;
150 IRIX)
151 AC_MSG_RESULT(you are cursed with IRIX)
152 IRIX=yes
153 SHLIB_STRIP=touch
154 NEED_DL=0
155 DEFAULT_MAKE=static
156 ;;
157 IRIX64)
158 AC_MSG_RESULT(IRIX64)
159 IRIX=yes
160 SHLIB_STRIP=strip
161 NEED_DL=0
162 DEFAULT_MAKE=static
163 ;;
164 Linux)
165 AC_MSG_RESULT(Linux! The choice of the GNU generation)
166 LINUX=yes
167 CFLAGS="$CFLAGS -Wall"
168 MOD_LD="${CC}"
169 SHLIB_LD="${CC} -shared -nostartfiles"
170 DEFAULT_MAKE=debug
171 AC_DEFINE(MODULES_OK)
172 ;;
173 Lynx)
174 SHLIB_STRIP=touch
175 AC_MSG_RESULT(Lynx OS)
176 ;;
177 OSF1)
178 AC_MSG_RESULT(OSF...)
179 case `${UNAME} -r | cut -d . -f 1` in
180 V*)
181 AC_MSG_RESULT([ Digital OSF])
182 if test "x$AWK" = "xgawk"
183 then
184 AWK="awk"
185 fi
186 if test "x$INSTALL" = "x./install-sh"
187 then
188 INSTALL="installbsd"
189 fi
190 MOD_CC="cc"
191 MOD_LD="cc"
192 SHLIB_CC="cc"
193 SHLIB_LD="ld -shared -expect_unresolved '*'"
194 SHLIB_STRIP="touch"
195 AC_DEFINE(MODULES_OK)
196 ;;
197 1.0|1.1|1.2)
198 AC_MSG_RESULT([ pre 1.3])
199 SHLIB_LD="ld -R -export $@:"
200 AC_DEFINE(MODULES_OK)
201 AC_DEFINE(OSF1_HACKS)
202 ;;
203 1.*)
204 AC_MSG_RESULT([ 1.3+])
205 SHLIB_CC="${CC} -fpic"
206 SHLIB_LD="ld -shared"
207 AC_DEFINE(MODULES_OK)
208 AC_DEFINE(OSF1_HACKS)
209 ;;
210 *)
211 AC_MSG_RESULT([ Some other weird OSF! No modules for you...])
212 NEED_DL=0
213 DEFAULT_MAKE=static
214 ;;
215 esac
216 AC_DEFINE(STOP_UAC)
217 ;;
218 SunOS)
219 if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
220 then
221 AC_MSG_RESULT(Solaris -- yay)
222 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
223 else
224 AC_MSG_RESULT(SunOS -- sigh)
225 SUNOS=yes
226 SHLIB_LD=ld
227 SHLIB_STRIP=touch
228 AC_DEFINE(DLOPEN_1)
229 fi
230 MOD_CC="${CC} -fPIC"
231 SHLIB_CC="${CC} -fPIC"
232 AC_DEFINE(MODULES_OK)
233 ;;
234 *BSD)
235 AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
236 SHLIB_CC="${CC} -fpic"
237 SHLIB_LD="ld -Bshareable -x"
238 AC_DEFINE(MODULES_OK)
239 ;;
240 *)
241 if test -r "/mach"
242 then
243 AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
244 AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])
245 AC_MSG_RESULT(Hiya DK :P)
246 NEED_DL=0
247 DEFAULT_MAKE=static
248 AC_DEFINE(BORGCUBES)
249 else
250 if test -r "/cmds"
251 then
252 AC_MSG_RESULT(QNX)
253 NEED_DL=0
254 SHLIB_STRIP=touch
255 DEFAULT_MAKE=static
256 else
257 AC_MSG_RESULT(Something unknown!)
258 AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
259 NEED_DL=0
260 DEFAULT_MAKE=static
261 fi
262 fi
263 ;;
264 esac
265
266 dnl Checks for system libraries.
267 if test "$IRIX" = "yes"
268 then
269 AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
270 else
271 AC_CHECK_LIB(socket,socket)
272 AC_CHECK_LIB(nsl,connect)
273 AC_CHECK_LIB(dns,gethostbyname)
274 AC_CHECK_LIB(dl,dlopen)
275 dnl this is needed for Tcl compiled with thread support
276 AC_CHECK_LIB(pthread,pthread_create,ac_cv_lib_pthread_pthread_create=yes,ac_cv_lib_pthread_pthread_create=no)
277 if test "$SUNOS" = "yes"
278 then
279 dnl for suns without yp or something like that
280 AC_CHECK_LIB(dl,main)
281 else
282 if test "$HPUX" = "yes"
283 then
284 AC_CHECK_LIB(dld,shl_load)
285 fi
286 fi
287 fi
288
289 AC_CHECK_FUNC(res_init, ,
290 AC_CHECK_LIB(bind, res_init, RESLIB="-lbind",
291 AC_CHECK_LIB(resolv, res_init, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))
292
293 AC_CHECK_FUNC(res_mkquery, ,
294 AC_CHECK_LIB(bind, res_mkquery, RESLIB="-lbind",
295 AC_CHECK_LIB(resolv, res_mkquery, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))
296
297 dnl Checks for header files.
298 AC_HEADER_DIRENT
299 AC_HEADER_SYS_WAIT
300 AC_CHECK_HEADERS(sys/time.h)
301 AC_HEADER_TIME
302 AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
303
304 dnl Checks for typedefs, structures, and compiler characteristics.
305 AC_TYPE_PID_T
306 AC_C_BIGENDIAN
307 AC_C_INLINE
308 AC_CHECK_SIZEOF(long,0)
309 AC_CHECK_SIZEOF(int,0)
310
311 dnl Checks for library functions.
312 AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset)
313 AC_CHECK_FUNCS(rename strcasecmp getdtablesize bzero random srandom)
314 AC_CHECK_FUNCS(dprintf snprintf vsprintf vsnprintf dlopen)
315
316 if test "x${ac_cv_func_vsprintf}" = "xno"
317 then
318 cat << 'EOF' >&2
319 configure: error:
320
321 Your system does not have the sprintf/vsprintf libraries.
322 These are required to compile almost anything. Sorry.
323
324 EOF
325 exit 1
326 fi
327
328 if test "x${ac_cv_header_stdc}" = "xno"
329 then
330 cat << 'EOF' >&2
331 configure: error:
332
333 Your system must support ANSI C Header files.
334 These are required for the language support. Sorry.
335
336 EOF
337 exit 1
338 fi
339
340 AC_CYGWIN
341 if test ! "x${CYGWIN}" = "x"
342 then
343 AC_DEFINE(CYGWIN_HACKS)
344 fi
345
346 AC_EXEEXT
347 if test ! "x${EXEEXT}" = "x"
348 then
349 EGGEXEC=eggdrop${EXEEXT}
350 fi
351
352 dnl check how much space is left in filedb (informational purposes)
353 AC_MSG_CHECKING(space left in file database struct)
354
355 cat > abacab.c << 'EOF'
356 #include <stdio.h>
357 #include <sys/time.h>
358 #include "src/mod/filesys.mod/files.h"
359 main() {
360 fprintf(stdout, "%d/%d\n", 512 - sizeof(struct filler), sizeof(filedb));
361 }
362 EOF
363
364 ${CC} -o abacab${EXEEXT} abacab.c
365 FILEDB_SPACE=`./abacab${EXEEXT}`
366 AC_MSG_RESULT($FILEDB_SPACE bytes)
367 rm -f abacab${EXEEXT} abacab.o abacab.c
368 AC_MSG_RESULT([ (standard is currently 48/512 bytes)])
369
370 dnl where is tcl? is it here?
371 # ---------- begin robey's tcl thingies
372 # (well, what used to be robey's tcl thingies...)
373
374 tclrecommendver="8.2.1"
375
376 tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
377 tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
378 tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
379
380 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
381
382 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
383 /usr/lib /lib /usr/i486-linuxaout/lib \
384 $HOME/lib $HOME/tcl/lib $HOME"
385
386 tclheadernames="tcl.h"
387
388 tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
389 /usr/include $HOME/include $HOME/tcl/include $HOME"
390
391 tclconfigfile="tclConfig.sh"
392
393 dnl oohh new configure --variables for those with multiple tcl libs
394 AC_ARG_WITH(tcllib, [ --with-tcllib=PATH full path to tcl library], tcllibname=$withval)
395 AC_ARG_WITH(tclinc, [ --with-tclinc=PATH full path to tcl header], tclincname=$withval)
396
397 # make sure either both or neither $tcllibname and $tclincname are set
398 if test ! "x${tcllibname}" = "x"
399 then
400 if test "x${tclincname}" = "x"
401 then
402 cat << 'EOF' >&2
403 configure: warning:
404
405 You must specify both --with-tcllib and --with-tclinc for them to work.
406 configure will now attempt to autodetect both the Tcl library and header...
407
408 EOF
409 tcllibname=""
410 TCLLIB=""
411 TCLINC=""
412 fi
413 else
414 if test ! "x${tclincname}" = "x"
415 then
416 cat << 'EOF' >&2
417 configure: warning:
418
419 You must specify both --with-tcllib and --with-tclinc for them to work.
420 configure will now attempt to autodetect both the Tcl library and header...
421
422 EOF
423 tclincname=""
424 TCLLIB=""
425 TCLINC=""
426 fi
427 fi
428
429 # make sure either both or neither $TCLLIB and $TCLINC are set
430 if test ! "x${TCLLIB}" = "x"
431 then
432 if test "x${TCLINC}" = "x"
433 then
434 cat << 'EOF' >&2
435 configure: warning:
436
437 Environment variable TCLLIB was set, but I did not detect TCLINC.
438 Please set both TCLLIB and TCLINC correctly if you wish to use them.
439 configure will now attempt to autodetect both the Tcl library and header...
440
441 EOF
442 TCLLIB=""
443 fi
444 else
445 if test ! "x${TCLINC}" = "x"
446 then
447 cat << 'EOF' >&2
448 configure: warning:
449
450 Environment variable TCLINC was set, but I did not detect TCLLIB.
451 Please set both TCLLIB and TCLINC correctly if you wish to use them.
452 configure will now attempt to autodetect both the Tcl library and header...
453
454 EOF
455 TCLINC=""
456 fi
457 fi
458
459 # look for Tcl library: if $tcllibname is set, check there first
460 if test ! "x${tcllibname}" = "x"
461 then
462 if test -f "$tcllibname" && test -r "$tcllibname"
463 then
464 TCLLIB=`$DIRNAME $tcllibname`
465 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
466 changequote(,)dnl
467 TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
468 changequote([, ])dnl
469 TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
470 else
471 cat << EOF >&2
472 configure: warning:
473
474 The file '$tcllibname' given to option --with-tcllib is not valid.
475 configure will now attempt to autodetect both the Tcl library and header...
476
477 EOF
478 tcllibname=""
479 tclincname=""
480 TCLLIB=""
481 TCLLIBFN=""
482 TCLINC=""
483 TCLINCFN=""
484 fi
485 fi
486
487 # look for Tcl header: if $tclincname is set, check there first
488 if test ! "x${tclincname}" = "x"
489 then
490 if test -f "$tclincname" && test -r "$tclincname"
491 then
492 TCLINC=`$DIRNAME $tclincname`
493 TCLINCFN=`$BASENAME $tclincname`
494 else
495 cat << EOF >&2
496 configure: warning:
497
498 The file '$tclincname' given to option --with-tclinc is not valid.
499 configure will now attempt to autodetect both the Tcl library and header...
500
501 EOF
502 tcllibname=""
503 tclincname=""
504 TCLLIB=""
505 TCLLIBFN=""
506 TCLINC=""
507 TCLINCFN=""
508 fi
509 fi
510
511 # look for Tcl library: if $TCLLIB is set, check there first
512 if test "x${TCLLIBFN}" = "x"
513 then
514 if test ! "x${TCLLIB}" = "x"
515 then
516 if test -d "${TCLLIB}"
517 then
518 for tcllibfns in $tcllibnames
519 do
520 for tcllibext in $tcllibextensions
521 do
522 if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
523 then
524 TCLLIBFN=$tcllibfns$tcllibext
525 TCLLIBEXT=$tcllibext
526 TCLLIBFNS=$tcllibfns
527 break 2
528 fi
529 done
530 done
531 fi
532 if test "x${TCLLIBFN}" = "x"
533 then
534 cat << 'EOF' >&2
535 configure: warning:
536
537 Environment variable TCLLIB was set, but incorrect.
538 Please set both TCLLIB and TCLINC correctly if you wish to use them.
539 configure will now attempt to autodetect both the Tcl library and header...
540
541 EOF
542 TCLLIB=""
543 TCLLIBFN=""
544 TCLINC=""
545 TCLINCFN=""
546 fi
547 fi
548 fi
549
550 # look for Tcl header: if $TCLINC is set, check there first
551 if test "x${TCLINCFN}" = "x"
552 then
553 if test ! "x${TCLINC}" = "x"
554 then
555 if test -d "${TCLINC}"
556 then
557 for tclheaderfn in $tclheadernames
558 do
559 if test -r "$TCLINC/$tclheaderfn"
560 then
561 TCLINCFN=$tclheaderfn
562 fi
563 done
564 fi
565 if test "x${TCLINCFN}" = "x"
566 then
567 cat << 'EOF' >&2
568 configure: warning:
569
570 Environment variable TCLINC was set, but incorrect.
571 Please set both TCLLIB and TCLINC correctly if you wish to use them.
572 configure will now attempt to autodetect both the Tcl library and header...
573
574 EOF
575 TCLLIB=""
576 TCLLIBFN=""
577 TCLINC=""
578 TCLINCFN=""
579 fi
580 fi
581 fi
582
583 AC_MSG_CHECKING(for Tcl library)
584
585 # attempt autodetect for $TCLLIBFN if it's not set
586 if test ! "x${TCLLIBFN}" = "x"
587 then
588 AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
589 else
590 for tcllibfns in $tcllibnames
591 do
592 for tcllibext in $tcllibextensions
593 do
594 for tcllibpath in $tcllibpaths
595 do
596 if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
597 then
598 AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
599 TCLLIB=$tcllibpath
600 TCLLIBFN=$tcllibfns$tcllibext
601 TCLLIBEXT=$tcllibext
602 TCLLIBFNS=$tcllibfns
603 break 3
604 fi
605 done
606 done
607 done
608 fi
609
610 # show if $TCLLIBFN wasn't found
611 if test "x${TCLLIBFN}" = "x"
612 then
613 AC_MSG_RESULT(not found)
614 fi
615
616 AC_MSG_CHECKING(for Tcl header)
617
618 # attempt autodetect for $TCLINCFN if it's not set
619 if test ! "x${TCLINCFN}" = "x"
620 then
621 AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
622 else
623 for tclheaderpath in $tclheaderpaths
624 do
625 for tclheaderfn in $tclheadernames
626 do
627 if test -r "$tclheaderpath/$tclheaderfn"
628 then
629 AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
630 TCLINC=$tclheaderpath
631 TCLINCFN=$tclheaderfn
632 break 2
633 fi
634 done
635 done
636 # FreeBSD hack ...
637 if test "x${TCLINCFN}" = "x"
638 then
639 for tcllibfns in $tcllibnames
640 do
641 for tclheaderpath in $tclheaderpaths
642 do
643 for tclheaderfn in $tclheadernames
644 do
645 if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
646 then
647 AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
648 TCLINC=$tclheaderpath/$tcllibfns
649 TCLINCFN=$tclheaderfn
650 break 3
651 fi
652 done
653 done
654 done
655 fi
656 fi
657
658 # show if $TCLINCFN wasn't found
659 if test "x${TCLINCFN}" = "x"
660 then
661 AC_MSG_RESULT(not found)
662 fi
663
664 # done looking, now either TCLLIBFN & TCLINCFN are both set, or we will bail
665 if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
666 then
667 # is this really Tcl ?
668 TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
669 fi
670
671 # check Tcl version
672 AC_MSG_CHECKING(for Tcl version)
673 if test ! "x${TCL_VERSION}" = "x"
674 then
675 AC_MSG_RESULT($TCL_VERSION)
676 TCL_FOUND=1
677 else
678 AC_MSG_RESULT(not found)
679 TCL_FOUND=0
680 fi
681
682 if test $TCL_FOUND = 0
683 then
684 cat << 'EOF' >&2
685 configure: error:
686
687 I can't find Tcl on this system.
688
689 Eggdrop now requires Tcl to compile. If you already have Tcl
690 installed on this system, and I just wasn't looking in the right
691 place for it, set the environment variables TCLLIB and TCLINC so
692 I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'
693 (respectively). Then run 'configure' again.
694
695 Read the README file if you don't know what Tcl is or how to get
696 it and install it.
697
698 EOF
699 exit 1
700 fi
701
702 # is this Tcl version too old for us to use ?
703 TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
704 if test "$TCL_VER_PRE70" = "xyes"
705 then
706 cat << EOF >&2
707 configure: error:
708
709 Your Tcl version is much too old for eggdrop to use.
710 I suggest you download and complie a more recent version.
711 The most reliable current version is $tclrecommendver
712
713 EOF
714 exit 1
715 fi
716
717 # are we using a pre 7.5 Tcl version ?
718 changequote(,)dnl
719 TCL_VER_PRE75=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 5)) || (i[1] < 7)) print "yes"; else print "no"}'`
720 changequote([, ])dnl
721 if test "x${TCL_VER_PRE75}" = "xyes"
722 then
723 AC_DEFINE(HAVE_OLD_TCL)
724 fi
725
726 # check for Tcl threads
727 AC_MSG_CHECKING(for Tcl threads)
728 changequote(,)dnl
729 TCL_VER_POST81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 8) && (i[2] >= 1)) || (i[1] >= 9)) print "yes"; else print "no"}'`
730 changequote([, ])dnl
731 if test "x${TCL_VER_POST81}" = "xyes"
732 then
733
734 # check for TclpFinalizeThreadData()
735 if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
736 then
737 echo $ac_n "(cached) $ac_c" 1>&6
738 else
739 ac_save_LIBS="$LIBS"
740 if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
741 then
742 LIBS="-lpthread $LIBS"
743 fi
744 if test ! "x${TCLLIBEXT}" = "x.a"
745 then
746 LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
747 else
748 if test ! "x${tcllibname}" = "x"
749 then
750 LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
751 else
752 LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
753 fi
754 fi
755 cat > conftest.$ac_ext << EOF
756 #include "confdefs.h"
757 char TclpFinalizeThreadData();
758
759 int main() {
760 TclpFinalizeThreadData();
761 return 0;
762 }
763 EOF
764 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
765 then
766 rm -rf conftest*
767 eval "ac_cv_var_tcl_threads=yes"
768 else
769 echo "configure: failed program was:" >&5
770 cat conftest.$ac_ext >&5
771 rm -rf conftest*
772 eval "ac_cv_var_tcl_threads=no"
773 fi
774 rm -f conftest*
775 LIBS="$ac_save_LIBS"
776 fi
777 fi
778
779 if test "x${ac_cv_var_tcl_threads}" = "xyes"
780 then
781 AC_MSG_RESULT(yes)
782 cat << 'EOF' >&2
783 configure: warning:
784
785 Your Tcl library is compiled with threads.
786 There are known problems, but we will attempt to work around them.
787
788 EOF
789 AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
790 else
791 AC_MSG_RESULT(no)
792 fi
793
794 if test ! "x${TCLLIBEXT}" = "x.a"
795 then
796 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
797 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
798 else
799
800 # set default make as static for unshared Tcl library
801 if test ! "$DEFAULT_MAKE" = "static"
802 then
803 cat << 'EOF' >&2
804 configure: warning:
805
806 Your Tcl library is not a shared lib.
807 configure will now set default make type to static...
808
809 EOF
810 DEFAULT_MAKE=static
811 fi
812
813 # are we using a pre 7.4 Tcl version ?
814 changequote(,)dnl
815 TCL_VER_PRE74=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 4)) || (i[1] < 7)) print "yes"; else print "no"}'`
816 changequote([, ])dnl
817 if test "x${TCL_VER_PRE74}" = "xno"
818 then
819
820 # was the --with-tcllib option given ?
821 if test ! "x${tcllibname}" = "x"
822 then
823 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
824 TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
825 else
826 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
827 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
828 fi
829 else
830 cat << EOF >&2
831 configure: warning:
832
833 Your Tcl version ($TCL_VERSION) is older then 7.4.
834 There are known problems, but we will attempt to work around them.
835
836 EOF
837 TCL_REQS="libtcle.a"
838 TCL_LIBS="-L. -ltcle -lm"
839 fi
840 fi
841
842 # add -lpthread to $LIBS if we need it
843 if test "x${ac_cv_var_tcl_threads}" = "xyes" && test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
844 then
845 LIBS="-lpthread $LIBS"
846 fi
847
848 AC_SUBST(TCLLIB)
849 AC_SUBST(TCLLIBFN)
850 AC_SUBST(TCLINC)
851 AC_SUBST(TCLINCFN)
852 AC_SUBST(TCL_REQS)
853 AC_SUBST(TCL_LIBS)
854
855 # ---------- end of robey's tcl thingies
856
857 if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
858 then
859 if test "$LINUX" = "yes"
860 then
861 cat << 'EOF' >&2
862 configure: warning:
863
864 Since you are on a Linux system, this has a known problem,
865 I know a kludge for it,
866 EOF
867
868 if test -r "/lib/libdl.so.1"
869 then
870 cat << 'EOF' >&2
871 and you seem to have it, so we'll do that...
872
873 EOF
874 AC_DEFINE(HAVE_DLOPEN)
875 LIBS="/lib/libdl.so.1 $LIBS"
876 else
877 cat << 'EOF' >&2
878 which you DONT seem to have... doh!
879 perhaps you may still have the stuff lying around somewhere
880 if you work out where it is, add it to your XLIBS= lines
881 and #define HAVE_DLOPEN in config.h
882
883 we'll proceed on anyway, but you probably won't be able
884 to 'make eggdrop' but you might be able to make the
885 static bot (I'll default your make to this version).
886
887 EOF
888 DEFAULT_MAKE=static
889 fi
890 else
891 cat << 'EOF' >&2
892 configure: warning:
893
894 You don't seem to have libdl anywhere I can find it, this will
895 prevent you from doing dynamic modules, I'll set your default
896 make to static linking.
897
898 EOF
899 DEFAULT_MAKE=static
900 fi
901 fi
902
903 EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
904
905 if test "x$DEST" = "x"
906 then
907 DEST=\${prefix}
908 fi
909
910 AC_SUBST(DEST)
911 AC_SUBST(CC)
912 AC_SUBST(MOD_LD)
913 AC_SUBST(MOD_CC)
914 AC_SUBST(MOD_STRIP)
915 AC_SUBST(SHLIB_LD)
916 AC_SUBST(SHLIB_CC)
917 AC_SUBST(SHLIB_STRIP)
918 AC_SUBST(RESLIB)
919 AC_SUBST(DEFAULT_MAKE)
920 AC_SUBST(EGGEXEC)
921 AC_SUBST(EGGVERSION)
922 AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
923
924 AC_MSG_RESULT()
925 AC_MSG_RESULT(Configure is done.)
926 AC_MSG_RESULT()
927 if test -f "./$EGGEXEC"
928 then
929 AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
930 else
931 AC_MSG_RESULT(Type 'make' to create the bot.)
932 fi
933 AC_MSG_RESULT()

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23