/[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.8 - (show annotations) (download)
Tue Oct 26 21:38:35 1999 UTC (19 years, 8 months ago) by fabian
Branch: MAIN
Changes since 1.7: +38 -19 lines
resync 940380771-940924890

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23