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

Contents of /eggdrop1.4/configure.in

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


Revision 1.35 - (show annotations) (download)
Tue Oct 26 08:08:38 1999 UTC (20 years, 9 months ago) by arthur2
Branch: MAIN
Changes since 1.34: +32 -7 lines
putlog-misc

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 dnl Checks for header files.
290 AC_HEADER_DIRENT
291 AC_HEADER_SYS_WAIT
292 AC_CHECK_HEADERS(sys/time.h)
293 AC_HEADER_TIME
294 AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
295
296 dnl Checks for typedefs, structures, and compiler characteristics.
297 AC_TYPE_PID_T
298 AC_C_BIGENDIAN
299 AC_C_INLINE
300 AC_CHECK_SIZEOF(long,0)
301 AC_CHECK_SIZEOF(int,0)
302
303 dnl Checks for library functions.
304 AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset)
305 AC_CHECK_FUNCS(rename strcasecmp getdtablesize bzero random srandom)
306 AC_CHECK_FUNCS(dprintf snprintf vsprintf vsnprintf dlopen)
307
308 if test "x${ac_cv_func_vsprintf}" = "xno"
309 then
310 cat << 'EOF' >&2
311 configure: error:
312
313 Your system does not have the sprintf/vsprintf libraries.
314 These are required to compile almost anything. Sorry.
315
316 EOF
317 exit 1
318 fi
319
320 if test "x${ac_cv_header_stdc}" = "xno"
321 then
322 cat << 'EOF' >&2
323 configure: error:
324
325 Your system must support ANSI C Header files.
326 These are required for the language support. Sorry.
327
328 EOF
329 exit 1
330 fi
331
332 AC_CYGWIN
333 if test ! "x${CYGWIN}" = "x"
334 then
335 AC_DEFINE(CYGWIN_HACKS)
336 fi
337
338 AC_EXEEXT
339 if test ! "x${EXEEXT}" = "x"
340 then
341 EGGEXEC=eggdrop${EXEEXT}
342 fi
343
344 dnl check how much space is left in filedb (informational purposes)
345 AC_MSG_CHECKING(space left in file database struct)
346 if eval "test \"`echo '$''{'ac_cv_var_filedb_struct'+set}'`\" = set"
347 then
348 echo $ac_n "(cached) $ac_c" 1>&6
349 else
350 cat > conftest.$ac_ext << EOF
351 #include "confdefs.h"
352 #include <stdio.h>
353 #include <sys/time.h>
354 #include "src/mod/filesys.mod/files.h"
355 int main() {
356 fprintf(stdout, "%d/%d %s\n", 512 - sizeof(struct filler), sizeof(filedb), "bytes");
357 }
358 EOF
359 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
360 then
361 ac_cv_var_filedb_struct=`./conftest${ac_exeext}`
362 rm -rf conftest*
363 else
364 echo "configure: failed program was:" >&5
365 cat conftest.$ac_ext >&5
366 ac_cv_var_filedb_struct=unknown
367 rm -rf conftest*
368 fi
369 rm -f conftest*
370 fi
371 AC_MSG_RESULT($ac_cv_var_filedb_struct)
372 AC_MSG_RESULT([ (standard is currently 48/512 bytes)])
373
374 dnl where is tcl? is it here?
375 # ---------- begin robey's tcl thingies
376 # (well, what used to be robey's tcl thingies...)
377
378 tclrecommendver="8.2.1"
379
380 tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
381 tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
382 tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
383
384 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
385
386 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
387 /usr/lib /lib /usr/i486-linuxaout/lib \
388 $HOME/lib $HOME/tcl/lib $HOME"
389
390 tclheadernames="tcl.h"
391
392 tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
393 /usr/include $HOME/include $HOME/tcl/include $HOME"
394
395 tclconfigfile="tclConfig.sh"
396
397 dnl oohh new configure --variables for those with multiple tcl libs
398 AC_ARG_WITH(tcllib, [ --with-tcllib=PATH full path to tcl library], tcllibname=$withval)
399 AC_ARG_WITH(tclinc, [ --with-tclinc=PATH full path to tcl header], tclincname=$withval)
400
401 # make sure either both or neither $tcllibname and $tclincname are set
402 if test ! "x${tcllibname}" = "x"
403 then
404 if test "x${tclincname}" = "x"
405 then
406 cat << 'EOF' >&2
407 configure: warning:
408
409 You must specify both --with-tcllib and --with-tclinc for them to work.
410 configure will now attempt to autodetect both the Tcl library and header...
411
412 EOF
413 tcllibname=""
414 TCLLIB=""
415 TCLINC=""
416 fi
417 else
418 if test ! "x${tclincname}" = "x"
419 then
420 cat << 'EOF' >&2
421 configure: warning:
422
423 You must specify both --with-tcllib and --with-tclinc for them to work.
424 configure will now attempt to autodetect both the Tcl library and header...
425
426 EOF
427 tclincname=""
428 TCLLIB=""
429 TCLINC=""
430 fi
431 fi
432
433 # make sure either both or neither $TCLLIB and $TCLINC are set
434 if test ! "x${TCLLIB}" = "x"
435 then
436 if test "x${TCLINC}" = "x"
437 then
438 cat << 'EOF' >&2
439 configure: warning:
440
441 Environment variable TCLLIB was set, but I did not detect TCLINC.
442 Please set both TCLLIB and TCLINC correctly if you wish to use them.
443 configure will now attempt to autodetect both the Tcl library and header...
444
445 EOF
446 TCLLIB=""
447 fi
448 else
449 if test ! "x${TCLINC}" = "x"
450 then
451 cat << 'EOF' >&2
452 configure: warning:
453
454 Environment variable TCLINC was set, but I did not detect TCLLIB.
455 Please set both TCLLIB and TCLINC correctly if you wish to use them.
456 configure will now attempt to autodetect both the Tcl library and header...
457
458 EOF
459 TCLINC=""
460 fi
461 fi
462
463 # look for Tcl library: if $tcllibname is set, check there first
464 if test ! "x${tcllibname}" = "x"
465 then
466 if test -f "$tcllibname" && test -r "$tcllibname"
467 then
468 TCLLIB=`$DIRNAME $tcllibname`
469 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
470 changequote(,)dnl
471 TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
472 changequote([, ])dnl
473 TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
474 else
475 cat << EOF >&2
476 configure: warning:
477
478 The file '$tcllibname' given to option --with-tcllib is not valid.
479 configure will now attempt to autodetect both the Tcl library and header...
480
481 EOF
482 tcllibname=""
483 tclincname=""
484 TCLLIB=""
485 TCLLIBFN=""
486 TCLINC=""
487 TCLINCFN=""
488 fi
489 fi
490
491 # look for Tcl header: if $tclincname is set, check there first
492 if test ! "x${tclincname}" = "x"
493 then
494 if test -f "$tclincname" && test -r "$tclincname"
495 then
496 TCLINC=`$DIRNAME $tclincname`
497 TCLINCFN=`$BASENAME $tclincname`
498 else
499 cat << EOF >&2
500 configure: warning:
501
502 The file '$tclincname' given to option --with-tclinc is not valid.
503 configure will now attempt to autodetect both the Tcl library and header...
504
505 EOF
506 tcllibname=""
507 tclincname=""
508 TCLLIB=""
509 TCLLIBFN=""
510 TCLINC=""
511 TCLINCFN=""
512 fi
513 fi
514
515 # look for Tcl library: if $TCLLIB is set, check there first
516 if test "x${TCLLIBFN}" = "x"
517 then
518 if test ! "x${TCLLIB}" = "x"
519 then
520 if test -d "${TCLLIB}"
521 then
522 for tcllibfns in $tcllibnames
523 do
524 for tcllibext in $tcllibextensions
525 do
526 if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
527 then
528 TCLLIBFN=$tcllibfns$tcllibext
529 TCLLIBEXT=$tcllibext
530 TCLLIBFNS=$tcllibfns
531 break 2
532 fi
533 done
534 done
535 fi
536 if test "x${TCLLIBFN}" = "x"
537 then
538 cat << 'EOF' >&2
539 configure: warning:
540
541 Environment variable TCLLIB was set, but incorrect.
542 Please set both TCLLIB and TCLINC correctly if you wish to use them.
543 configure will now attempt to autodetect both the Tcl library and header...
544
545 EOF
546 TCLLIB=""
547 TCLLIBFN=""
548 TCLINC=""
549 TCLINCFN=""
550 fi
551 fi
552 fi
553
554 # look for Tcl header: if $TCLINC is set, check there first
555 if test "x${TCLINCFN}" = "x"
556 then
557 if test ! "x${TCLINC}" = "x"
558 then
559 if test -d "${TCLINC}"
560 then
561 for tclheaderfn in $tclheadernames
562 do
563 if test -r "$TCLINC/$tclheaderfn"
564 then
565 TCLINCFN=$tclheaderfn
566 fi
567 done
568 fi
569 if test "x${TCLINCFN}" = "x"
570 then
571 cat << 'EOF' >&2
572 configure: warning:
573
574 Environment variable TCLINC was set, but incorrect.
575 Please set both TCLLIB and TCLINC correctly if you wish to use them.
576 configure will now attempt to autodetect both the Tcl library and header...
577
578 EOF
579 TCLLIB=""
580 TCLLIBFN=""
581 TCLINC=""
582 TCLINCFN=""
583 fi
584 fi
585 fi
586
587 AC_MSG_CHECKING(for Tcl library)
588
589 # attempt autodetect for $TCLLIBFN if it's not set
590 if test ! "x${TCLLIBFN}" = "x"
591 then
592 AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
593 else
594 for tcllibfns in $tcllibnames
595 do
596 for tcllibext in $tcllibextensions
597 do
598 for tcllibpath in $tcllibpaths
599 do
600 if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
601 then
602 AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
603 TCLLIB=$tcllibpath
604 TCLLIBFN=$tcllibfns$tcllibext
605 TCLLIBEXT=$tcllibext
606 TCLLIBFNS=$tcllibfns
607 break 3
608 fi
609 done
610 done
611 done
612 fi
613
614 # show if $TCLLIBFN wasn't found
615 if test "x${TCLLIBFN}" = "x"
616 then
617 AC_MSG_RESULT(not found)
618 fi
619
620 AC_MSG_CHECKING(for Tcl header)
621
622 # attempt autodetect for $TCLINCFN if it's not set
623 if test ! "x${TCLINCFN}" = "x"
624 then
625 AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
626 else
627 for tclheaderpath in $tclheaderpaths
628 do
629 for tclheaderfn in $tclheadernames
630 do
631 if test -r "$tclheaderpath/$tclheaderfn"
632 then
633 AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
634 TCLINC=$tclheaderpath
635 TCLINCFN=$tclheaderfn
636 break 2
637 fi
638 done
639 done
640 # FreeBSD hack ...
641 if test "x${TCLINCFN}" = "x"
642 then
643 for tcllibfns in $tcllibnames
644 do
645 for tclheaderpath in $tclheaderpaths
646 do
647 for tclheaderfn in $tclheadernames
648 do
649 if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
650 then
651 AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
652 TCLINC=$tclheaderpath/$tcllibfns
653 TCLINCFN=$tclheaderfn
654 break 3
655 fi
656 done
657 done
658 done
659 fi
660 fi
661
662 # show if $TCLINCFN wasn't found
663 if test "x${TCLINCFN}" = "x"
664 then
665 AC_MSG_RESULT(not found)
666 fi
667
668 # done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail
669 if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
670 then
671
672 # find Tcl's version
673 TCL_PATCH_LEVEL=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
674 if test ! "x${TCL_PATCH_LEVEL}" = "x"
675 then
676 TCL_VERSION=$TCL_PATCH_LEVEL
677 else
678 TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
679 fi
680 fi
681
682 # check if we found Tcl's version
683 AC_MSG_CHECKING(for Tcl version)
684 if test ! "x${TCL_VERSION}" = "x"
685 then
686 AC_MSG_RESULT($TCL_VERSION)
687 TCL_FOUND=1
688 else
689 AC_MSG_RESULT(not found)
690 TCL_FOUND=0
691 fi
692
693 if test $TCL_FOUND = 0
694 then
695 cat << 'EOF' >&2
696 configure: error:
697
698 I can't find Tcl on this system.
699
700 Eggdrop now requires Tcl to compile. If you already have Tcl
701 installed on this system, and I just wasn't looking in the right
702 place for it, set the environment variables TCLLIB and TCLINC so
703 I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'
704 (respectively). Then run 'configure' again.
705
706 Read the README file if you don't know what Tcl is or how to get
707 it and install it.
708
709 EOF
710 exit 1
711 fi
712
713 # is this Tcl version too old for us to use ?
714 TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
715 if test "$TCL_VER_PRE70" = "xyes"
716 then
717 cat << EOF >&2
718 configure: error:
719
720 Your Tcl version is much too old for eggdrop to use.
721 I suggest you download and complie a more recent version.
722 The most reliable current version is $tclrecommendver
723
724 EOF
725 exit 1
726 fi
727
728 # are we using a pre 7.5 Tcl version ?
729 changequote(,)dnl
730 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"}'`
731 changequote([, ])dnl
732 if test "x${TCL_VER_PRE75}" = "xyes"
733 then
734 AC_DEFINE(HAVE_OLD_TCL)
735 fi
736
737 # check for Tcl threads
738 AC_MSG_CHECKING(for Tcl threads)
739 changequote(,)dnl
740 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"}'`
741 changequote([, ])dnl
742 if test "x${TCL_VER_POST81}" = "xyes"
743 then
744
745 # check for TclpFinalizeThreadData()
746 if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
747 then
748 echo $ac_n "(cached) $ac_c" 1>&6
749 else
750 ac_save_LIBS="$LIBS"
751 if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
752 then
753 LIBS="-lpthread $LIBS"
754 fi
755 if test ! "x${TCLLIBEXT}" = "x.a"
756 then
757 LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
758 else
759 if test ! "x${tcllibname}" = "x"
760 then
761 LIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
762 else
763 LIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
764 fi
765 fi
766 cat > conftest.$ac_ext << EOF
767 #include "confdefs.h"
768 char TclpFinalizeThreadData();
769
770 int main() {
771 TclpFinalizeThreadData();
772 return 0;
773 }
774 EOF
775 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
776 then
777 rm -rf conftest*
778 eval "ac_cv_var_tcl_threads=yes"
779 else
780 echo "configure: failed program was:" >&5
781 cat conftest.$ac_ext >&5
782 rm -rf conftest*
783 eval "ac_cv_var_tcl_threads=no"
784 fi
785 rm -f conftest*
786 LIBS="$ac_save_LIBS"
787 fi
788 fi
789
790 if test "x${ac_cv_var_tcl_threads}" = "xyes"
791 then
792 AC_MSG_RESULT(yes)
793 cat << 'EOF' >&2
794 configure: warning:
795
796 Your Tcl library is compiled with threads.
797 There are known problems, but we will attempt to work around them.
798
799 EOF
800 AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
801
802 # add -lpthread to $LIBS if we have it
803 if test "x${ac_cv_lib_pthread_pthread_create}" = "xyes"
804 then
805 LIBS="-lpthread $LIBS"
806 fi
807 else
808 AC_MSG_RESULT(no)
809 fi
810
811 if test ! "x${TCLLIBEXT}" = "x.a"
812 then
813 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
814 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
815 else
816
817 # set default make as static for unshared Tcl library
818 if test ! "$DEFAULT_MAKE" = "static"
819 then
820 cat << 'EOF' >&2
821 configure: warning:
822
823 Your Tcl library is not a shared lib.
824 configure will now set default make type to static...
825
826 EOF
827 DEFAULT_MAKE=static
828 fi
829
830 # are we using a pre 7.4 Tcl version ?
831 changequote(,)dnl
832 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"}'`
833 changequote([, ])dnl
834 if test "x${TCL_VER_PRE74}" = "xno"
835 then
836
837 # was the --with-tcllib option given ?
838 if test ! "x${tcllibname}" = "x"
839 then
840 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
841 TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
842 else
843 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
844 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
845 fi
846 else
847 cat << EOF >&2
848 configure: warning:
849
850 Your Tcl version ($TCL_VERSION) is older then 7.4.
851 There are known problems, but we will attempt to work around them.
852
853 EOF
854 TCL_REQS="libtcle.a"
855 TCL_LIBS="-L. -ltcle -lm"
856 fi
857 fi
858
859 AC_SUBST(TCLLIB)
860 AC_SUBST(TCLLIBFN)
861 AC_SUBST(TCLINC)
862 AC_SUBST(TCLINCFN)
863 AC_SUBST(TCL_REQS)
864 AC_SUBST(TCL_LIBS)
865
866 # ---------- end of robey's tcl thingies
867
868 if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
869 then
870 if test "$LINUX" = "yes"
871 then
872 cat << 'EOF' >&2
873 configure: warning:
874
875 Since you are on a Linux system, this has a known problem,
876 I know a kludge for it,
877 EOF
878
879 if test -r "/lib/libdl.so.1"
880 then
881 cat << 'EOF' >&2
882 and you seem to have it, so we'll do that...
883
884 EOF
885 AC_DEFINE(HAVE_DLOPEN)
886 LIBS="/lib/libdl.so.1 $LIBS"
887 else
888 cat << 'EOF' >&2
889 which you DONT seem to have... doh!
890 perhaps you may still have the stuff lying around somewhere
891 if you work out where it is, add it to your XLIBS= lines
892 and #define HAVE_DLOPEN in config.h
893
894 we'll proceed on anyway, but you probably won't be able
895 to 'make eggdrop' but you might be able to make the
896 static bot (I'll default your make to this version).
897
898 EOF
899 DEFAULT_MAKE=static
900 fi
901 else
902 cat << 'EOF' >&2
903 configure: warning:
904
905 You don't seem to have libdl anywhere I can find it, this will
906 prevent you from doing dynamic modules, I'll set your default
907 make to static linking.
908
909 EOF
910 DEFAULT_MAKE=static
911 fi
912 fi
913
914 EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
915
916 if test "x$DEST" = "x"
917 then
918 DEST=\${prefix}
919 fi
920
921 AC_SUBST(DEST)
922 AC_SUBST(CC)
923 AC_SUBST(MOD_LD)
924 AC_SUBST(MOD_CC)
925 AC_SUBST(MOD_STRIP)
926 AC_SUBST(SHLIB_LD)
927 AC_SUBST(SHLIB_CC)
928 AC_SUBST(SHLIB_STRIP)
929 AC_SUBST(DEFAULT_MAKE)
930 AC_SUBST(EGGEXEC)
931 AC_SUBST(EGGVERSION)
932 AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
933
934 AC_MSG_RESULT()
935 AC_MSG_RESULT(Configure is done.)
936 AC_MSG_RESULT()
937 if test -f "./$EGGEXEC"
938 then
939 AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
940 else
941 AC_MSG_RESULT(Type 'make' to create the bot.)
942 fi
943 AC_MSG_RESULT()

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23