/[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.28 - (show annotations) (download)
Sun Oct 17 00:13:07 1999 UTC (20 years, 9 months ago) by guppy
Branch: MAIN
Changes since 1.27: +5 -1 lines
Tothwolf's latest patches, more-make-fixes and va-fixes.diff

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 DLOPEN_1=1
112 DEFAULT_MAKE=eggdrop
113 AC_MSG_CHECKING(your OS)
114 SYSTEM=`${UNAME}`
115 case "$SYSTEM" in
116 BSD/OS)
117 if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
118 then
119 AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)
120 NEED_DL=0
121 DEFAULT_MAKE=static
122 else
123 AC_MSG_RESULT(BSD/OS 3+! ok I spose)
124 MOD_CC=shlicc
125 MOD_LD=shlicc
126 MOD_STRIP="${STRIP} -d"
127 SHLIB_LD="shlicc -r"
128 SHLIB_STRIP=touch
129 AC_DEFINE(MODULES_OK)
130 fi
131 ;;
132 CYGWIN*)
133 AC_MSG_RESULT(Cygwin)
134 NEED_DL=0
135 DEFAULT_MAKE=static
136 ;;
137 HP-UX)
138 AC_MSG_RESULT([HP-UX, just shoot yourself now])
139 HPUX=yes
140 MOD_LD="gcc -Wl,-E"
141 SHLIB_CC="gcc -fPIC"
142 SHLIB_LD="ld -b"
143 NEED_DL=0
144 AC_DEFINE(MODULES_OK)
145 AC_DEFINE(HPUX_HACKS)
146 if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
147 then
148 AC_DEFINE(HPUX10_HACKS)
149 fi
150 ;;
151 IRIX)
152 AC_MSG_RESULT(you are cursed with IRIX)
153 IRIX=yes
154 SHLIB_STRIP=touch
155 NEED_DL=0
156 DEFAULT_MAKE=static
157 ;;
158 IRIX64)
159 AC_MSG_RESULT(IRIX64)
160 SHLIB_STRIP=touch
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 DLOPEN_1=""
171 DEFAULT_MAKE=debugmem
172 AC_DEFINE(MODULES_OK)
173 ;;
174 Lynx)
175 SHLIB_STRIP=touch
176 AC_MSG_RESULT(Lynx OS)
177 ;;
178 OSF1)
179 AC_MSG_RESULT(OSF...)
180 case `${UNAME} -r | cut -d . -f 1` in
181 V*)
182 AC_MSG_RESULT([ Digital OSF])
183 if test "x$AWK" = "xgawk"
184 then
185 AWK="awk"
186 fi
187 if test "x$INSTALL" = "x./install-sh"
188 then
189 INSTALL="installbsd"
190 fi
191 MOD_CC="cc"
192 MOD_LD="cc"
193 SHLIB_CC="cc"
194 SHLIB_LD="ld -shared -expect_unresolved '*'"
195 SHLIB_STRIP="touch"
196 AC_DEFINE(MODULES_OK)
197 ;;
198 1.0|1.1|1.2)
199 AC_MSG_RESULT([ pre 1.3])
200 SHLIB_LD="ld -R -export $@:"
201 AC_DEFINE(MODULES_OK)
202 AC_DEFINE(OSF1_HACKS)
203 ;;
204 1.*)
205 AC_MSG_RESULT([ 1.3+])
206 SHLIB_CC="${CC} -fpic"
207 SHLIB_LD="ld -shared"
208 AC_DEFINE(MODULES_OK)
209 AC_DEFINE(OSF1_HACKS)
210 ;;
211 *)
212 AC_MSG_RESULT([ Some other weird OSF! No modules for you...])
213 NEED_DL=0
214 DEFAULT_MAKE=static
215 ;;
216 esac
217 AC_DEFINE(STOP_UAC)
218 ;;
219 SunOS)
220 if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
221 then
222 AC_MSG_RESULT(Solaris -- yay)
223 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
224 else
225 AC_MSG_RESULT(SunOS -- sigh)
226 SUNOS=yes
227 SHLIB_LD=ld
228 SHLIB_STRIP=touch
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 DLOPEN_1=""
239 AC_DEFINE(MODULES_OK)
240 ;;
241 *)
242 if test -r "/mach"
243 then
244 AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
245 AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])
246 AC_MSG_RESULT(Hiya DK :P)
247 AC_DEFINE(BORGCUBES)
248 else
249 AC_MSG_RESULT(Something unknown!!)
250 AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
251 fi
252 NEED_DL=0
253 DEFAULT_MAKE=static
254 ;;
255 esac
256
257 dnl Checks for system libraries.
258 if test "$IRIX" = "yes"
259 then
260 AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
261 else
262 AC_CHECK_LIB(socket,socket)
263 AC_CHECK_LIB(nsl,connect)
264 AC_CHECK_LIB(dns,gethostbyname)
265 AC_CHECK_LIB(dl,dlopen)
266 if test "$SUNOS" = "yes"
267 then
268 dnl for suns without yp or something like that
269 AC_CHECK_LIB(dl,main)
270 else
271 if test "$HPUX" = "yes"
272 then
273 AC_CHECK_LIB(dld,shl_load)
274 fi
275 fi
276 fi
277
278 dnl Checks for header files.
279 AC_HEADER_DIRENT
280 AC_HEADER_SYS_WAIT
281 AC_CHECK_HEADERS(sys/time.h)
282 AC_HEADER_TIME
283 AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
284
285 dnl Checks for typedefs, structures, and compiler characteristics.
286 AC_TYPE_PID_T
287 AC_C_BIGENDIAN
288 AC_C_INLINE
289 AC_CHECK_SIZEOF(long,0)
290 AC_CHECK_SIZEOF(int,0)
291
292 dnl Checks for library functions.
293 AC_CHECK_FUNCS(rename getrusage getdtablesize srandom random sigaction)
294 AC_CHECK_FUNCS(sigemptyset vsprintf strcasecmp setpgid clock dlopen)
295 AC_CHECK_FUNCS(dprintf bzero uname vsnprintf)
296
297 if test "x${ac_cv_func_vsprintf}" = "xno"
298 then
299 cat << 'EOF' >&2
300 configure: error:
301
302 Your system does not have the sprintf/vsprintf libraries.
303 These are required to compile almost anything. Sorry.
304
305 EOF
306 exit 1
307 fi
308
309 if test "x${ac_cv_header_stdc}" = "xno"
310 then
311 cat << 'EOF' >&2
312 configure: error:
313
314 Your system must support ANSI C Header files.
315 These are required for the language support. Sorry.
316
317 EOF
318 exit 1
319 fi
320
321 AC_CYGWIN
322 if test ! "x${CYGWIN}" = "x"
323 then
324 AC_DEFINE(CYGWIN_HACKS)
325 fi
326
327 AC_EXEEXT
328 if test ! "x${EXEEXT}" = "x"
329 then
330 EGGEXEC=eggdrop${EXEEXT}
331 fi
332
333 dnl check how much space is left in filedb (informational purposes)
334 AC_MSG_CHECKING(space left in file database struct)
335
336 cat > abacab.c << 'EOF'
337 #include <stdio.h>
338 #include <sys/time.h>
339 #include "src/mod/filesys.mod/files.h"
340 main() {
341 fprintf(stdout, "%d/%d\n", 512 - sizeof(struct filler), sizeof(filedb));
342 }
343 EOF
344
345 ${CC} -o abacab${EXEEXT} abacab.c
346 FILEDB_SPACE=`./abacab${EXEEXT}`
347 AC_MSG_RESULT($FILEDB_SPACE bytes)
348 rm -f abacab${EXEEXT} abacab.o abacab.c
349 AC_MSG_RESULT([ (standard is currently 48/512 bytes)])
350
351 dnl where is tcl? is it here?
352 # ---------- begin robey's tcl thingies
353 # (well, what used to be robey's tcl thingies...)
354
355 tclrecommendver="8.2.1"
356
357 tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
358 tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
359 tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
360
361 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
362
363 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
364 /usr/lib /lib /usr/i486-linuxaout/lib \
365 $HOME/lib $HOME/tcl/lib $HOME"
366
367 tclheadernames="tcl.h"
368
369 tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
370 /usr/include $HOME/include $HOME/tcl/include $HOME"
371
372 tclconfigfile="tclConfig.sh"
373
374 dnl oohh new configure --variables for those with multiple tcl libs
375 AC_ARG_WITH(tcllib, [ --with-tcllib=PATH full path to tcl library], tcllibname=$withval)
376 AC_ARG_WITH(tclinc, [ --with-tclinc=PATH full path to tcl header], tclincname=$withval)
377
378 # make sure either both or neither $tcllibname and $tclincname are set
379 if test ! "x${tcllibname}" = "x"
380 then
381 if test "x${tclincname}" = "x"
382 then
383 cat << 'EOF' >&2
384 configure: warning:
385
386 You must specify both --with-tcllib and --with-tclinc for them to work.
387 configure will now attempt to autodetect both the Tcl library and header...
388
389 EOF
390 tcllibname=""
391 TCLLIB=""
392 TCLINC=""
393 fi
394 else
395 if test ! "x${tclincname}" = "x"
396 then
397 cat << 'EOF' >&2
398 configure: warning:
399
400 You must specify both --with-tcllib and --with-tclinc for them to work.
401 configure will now attempt to autodetect both the Tcl library and header...
402
403 EOF
404 tclincname=""
405 TCLLIB=""
406 TCLINC=""
407 fi
408 fi
409
410 # make sure either both or neither $TCLLIB and $TCLINC are set
411 if test ! "x${TCLLIB}" = "x"
412 then
413 if test "x${TCLINC}" = "x"
414 then
415 cat << 'EOF' >&2
416 configure: warning:
417
418 Environment variable TCLLIB was set, but I did not detect TCLINC.
419 Please set both TCLLIB and TCLINC correctly if you wish to use them.
420 configure will now attempt to autodetect both the Tcl library and header...
421
422 EOF
423 TCLLIB=""
424 fi
425 else
426 if test ! "x${TCLINC}" = "x"
427 then
428 cat << 'EOF' >&2
429 configure: warning:
430
431 Environment variable TCLINC was set, but I did not detect TCLLIB.
432 Please set both TCLLIB and TCLINC correctly if you wish to use them.
433 configure will now attempt to autodetect both the Tcl library and header...
434
435 EOF
436 TCLINC=""
437 fi
438 fi
439
440 # look for Tcl library: if $tcllibname is set, check there first
441 if test ! "x${tcllibname}" = "x"
442 then
443 if test -f "$tcllibname" && test -r "$tcllibname"
444 then
445 TCLLIB=`$DIRNAME $tcllibname`
446 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
447 changequote(,)dnl
448 TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
449 changequote([, ])dnl
450 TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
451 else
452 cat << EOF >&2
453 configure: warning:
454
455 The file '$tcllibname' given to option --with-tcllib is not valid.
456 configure will now attempt to autodetect both the Tcl library and header...
457
458 EOF
459 tcllibname=""
460 tclincname=""
461 TCLLIB=""
462 TCLLIBFN=""
463 TCLINC=""
464 TCLINCFN=""
465 fi
466 fi
467
468 # look for Tcl header: if $tclincname is set, check there first
469 if test ! "x${tclincname}" = "x"
470 then
471 if test -f "$tclincname" && test -r "$tclincname"
472 then
473 TCLINC=`$DIRNAME $tclincname`
474 TCLINCFN=`$BASENAME $tclincname`
475 else
476 cat << EOF >&2
477 configure: warning:
478
479 The file '$tclincname' given to option --with-tclinc is not valid.
480 configure will now attempt to autodetect both the Tcl library and header...
481
482 EOF
483 tcllibname=""
484 tclincname=""
485 TCLLIB=""
486 TCLLIBFN=""
487 TCLINC=""
488 TCLINCFN=""
489 fi
490 fi
491
492 # look for Tcl library: if $TCLLIB is set, check there first
493 if test "x${TCLLIBFN}" = "x"
494 then
495 if test ! "x${TCLLIB}" = "x"
496 then
497 if test -d "${TCLLIB}"
498 then
499 for tcllibfns in $tcllibnames
500 do
501 for tcllibext in $tcllibextensions
502 do
503 if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
504 then
505 TCLLIBFN=$tcllibfns$tcllibext
506 TCLLIBEXT=$tcllibext
507 TCLLIBFNS=$tcllibfns
508 break 2
509 fi
510 done
511 done
512 fi
513 if test "x${TCLLIBFN}" = "x"
514 then
515 cat << 'EOF' >&2
516 configure: warning:
517
518 Environment variable TCLLIB was set, but incorrect.
519 Please set both TCLLIB and TCLINC correctly if you wish to use them.
520 configure will now attempt to autodetect both the Tcl library and header...
521
522 EOF
523 TCLLIB=""
524 TCLLIBFN=""
525 TCLINC=""
526 TCLINCFN=""
527 fi
528 fi
529 fi
530
531 # look for Tcl header: if $TCLINC is set, check there first
532 if test "x${TCLINCFN}" = "x"
533 then
534 if test ! "x${TCLINC}" = "x"
535 then
536 if test -d "${TCLINC}"
537 then
538 for tclheaderfn in $tclheadernames
539 do
540 if test -r "$TCLINC/$tclheaderfn"
541 then
542 TCLINCFN=$tclheaderfn
543 fi
544 done
545 fi
546 if test "x${TCLINCFN}" = "x"
547 then
548 cat << 'EOF' >&2
549 configure: warning:
550
551 Environment variable TCLINC was set, but incorrect.
552 Please set both TCLLIB and TCLINC correctly if you wish to use them.
553 configure will now attempt to autodetect both the Tcl library and header...
554
555 EOF
556 TCLLIB=""
557 TCLLIBFN=""
558 TCLINC=""
559 TCLINCFN=""
560 fi
561 fi
562 fi
563
564 AC_MSG_CHECKING(for Tcl library)
565
566 # attempt autodetect for $TCLLIBFN if it's not set
567 if test ! "x${TCLLIBFN}" = "x"
568 then
569 AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
570 else
571 for tcllibfns in $tcllibnames
572 do
573 for tcllibext in $tcllibextensions
574 do
575 for tcllibpath in $tcllibpaths
576 do
577 if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
578 then
579 AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
580 TCLLIB=$tcllibpath
581 TCLLIBFN=$tcllibfns$tcllibext
582 TCLLIBEXT=$tcllibext
583 TCLLIBFNS=$tcllibfns
584 break 3
585 fi
586 done
587 done
588 done
589 fi
590
591 # show if $TCLLIBFN wasn't found
592 if test "x${TCLLIBFN}" = "x"
593 then
594 AC_MSG_RESULT(not found)
595 fi
596
597 AC_MSG_CHECKING(for Tcl header)
598
599 # attempt autodetect for $TCLINCFN if it's not set
600 if test ! "x${TCLINCFN}" = "x"
601 then
602 AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
603 else
604 for tclheaderpath in $tclheaderpaths
605 do
606 for tclheaderfn in $tclheadernames
607 do
608 if test -r "$tclheaderpath/$tclheaderfn"
609 then
610 AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
611 TCLINC=$tclheaderpath
612 TCLINCFN=$tclheaderfn
613 break 2
614 fi
615 done
616 done
617 # FreeBSD hack ...
618 if test "x${TCLINCFN}" = "x"
619 then
620 for tcllibfns in $tcllibnames
621 do
622 for tclheaderpath in $tclheaderpaths
623 do
624 for tclheaderfn in $tclheadernames
625 do
626 if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
627 then
628 AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
629 TCLINC=$tclheaderpath/$tcllibfns
630 TCLINCFN=$tclheaderfn
631 break 3
632 fi
633 done
634 done
635 done
636 fi
637 fi
638
639 # show if $TCLINCFN wasn't found
640 if test "x${TCLINCFN}" = "x"
641 then
642 AC_MSG_RESULT(not found)
643 fi
644
645 # done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail
646 if test "x${TCLLIBFN}" = "x" || test "x${TCLINCFN}" = "x"
647 then
648 cat << 'EOF' >&2
649 configure: error:
650
651 I can't find Tcl on this system.
652
653 Eggdrop now requires Tcl to compile. If you already have Tcl
654 installed on this system, and I just wasn't looking in the right
655 place for it, set the environment variables TCLLIB and TCLINC so
656 I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'
657 (respectively). Then run 'configure' again.
658
659 Read the README file if you don't know what Tcl is or how to get
660 it and install it.
661
662 EOF
663 exit 1
664 else # TCLLIBFN || TCLINCFN
665
666 # is this really Tcl ?
667 TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | wc -l`
668 if test $TCLFOUND = 1
669 then
670
671 # check Tcl version
672 AC_MSG_CHECKING(for Tcl version)
673 TCLVER=`grep TCL_VERSION $TCLINC/$TCLINCFN | $AWK '{gsub(/\"/, "", $3); print $3}' | head -1`
674 if test ! "x${TCLVER}" = "x"
675 then
676 AC_MSG_RESULT($TCLVER)
677 else
678 AC_MSG_RESULT(hmm... unknown version)
679 fi
680
681 # are we using a pre 7.5 Tcl version ?
682 changequote(,)dnl
683 OLD_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
684 changequote([, ])dnl
685 if test "x${OLD_TCL}" = "xyes"
686 then
687 AC_DEFINE(HAVE_OLD_TCL)
688 else
689 # detect buggy Tcl 8.1 compiled with threads
690 changequote(,)dnl
691 BUGGY_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
692 changequote([, ])dnl
693 if test "x${BUGGY_TCL}" = "xyes"
694 then
695 AC_MSG_CHECKING(for buggy Tcl 8.1 threads)
696 if test -f "$TCLLIB/$tclconfigfile"
697 then
698 HASTHREADS=`grep 'TCL_DEFS' $TCLLIB/$tclconfigfile | grep 'TCL_THREADS=1' | wc -l`
699 if test $HASTHREADS = 1
700 then
701 AC_MSG_RESULT(yes...using a workaround...)
702 AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
703 else
704 AC_MSG_RESULT(no)
705 fi
706 else
707 AC_MSG_RESULT(${tclconfigfile} is missing...better safe then sorry...)
708 AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
709 fi
710 fi # BUGGYTCL
711 fi # OLDTCL
712
713 if test ! "x${TCLLIBEXT}" = "x.a"
714 then
715 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
716 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
717 else
718
719 # set default make as static for unshared Tcl library
720 if test ! "$DEFAULT_MAKE" = "static"
721 then
722 cat << 'EOF' >&2
723 configure: warning:
724
725 Your libtcl is not a shared library.
726 configure will set default make type to static...
727
728 EOF
729 DEFAULT_MAKE=static
730 fi
731
732 # are we using a pre 7.4 Tcl version ?
733 changequote(,)dnl
734 VERYOLDTCL=`echo $TCLVER | $AWK '{split($1, i, "."); print ((i[1] <= 7) && (i[2] <= 3)) ? "yes" : "no"}'`
735 changequote([, ])dnl
736 if test "x${VERYOLDTCL}" = "xno"
737 then
738 # was the --with-tcllib option given ?
739 if test ! "x${tcllibname}" = "x"
740 then
741 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
742 TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
743 else
744 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
745 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
746 fi
747 else
748 cat << EOF >&2
749 configure: warning:
750
751 Your Tcl version ($TCLVER) is older then 7.4.
752 There is a known problem, but we will use a workaround.
753
754 EOF
755 TCL_REQS="libtcle.a"
756 TCL_LIBS="-L. -ltcle -lm"
757 fi
758 fi
759
760 else # TCLFOUND
761 cat << EOF >&2
762 configure: error:
763
764 Your Tcl version is much too old for eggdrop to use.
765 I suggest you download and complie a more recent version.
766 The most reliable current version is $tclrecommendver
767
768 EOF
769 exit 1
770 fi # TCLFOUND
771
772 fi # TCLLIBFN || TCLINCFN
773
774 AC_SUBST(TCLLIB)
775 AC_SUBST(TCLLIBFN)
776 AC_SUBST(TCLINC)
777 AC_SUBST(TCLINCFN)
778 AC_SUBST(TCL_REQS)
779 AC_SUBST(TCL_LIBS)
780
781 # ---------- end of robey's tcl thingies
782
783 if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
784 then
785 if test "$LINUX" = "yes"
786 then
787 cat << 'EOF' >&2
788 configure: warning:
789
790 Since you are on a Linux system, this has a known problem,
791 I know a kludge for it,
792 EOF
793
794 if test -r "/lib/libdl.so.1"
795 then
796 cat << 'EOF' >&2
797 and you seem to have it, so we'll do that...
798
799 EOF
800 AC_DEFINE(HAVE_DLOPEN)
801 LIBS="/lib/libdl.so.1 $LIBS"
802 else
803 cat << 'EOF' >&2
804 which you DONT seem to have... doh!
805 perhaps you may still have the stuff lying around somewhere
806 if you work out where it is, add it to your XLIBS= lines
807 and #define HAVE_DLOPEN in config.h
808
809 we'll proceed on anyway, but you probably won't be able
810 to 'make eggdrop' but you might be able to make the
811 static bot (I'll default your make to this version).
812
813 EOF
814 DEFAULT_MAKE=static
815 fi
816 else
817 cat << 'EOF' >&2
818 configure: warning:
819
820 You don't seem to have libdl anywhere I can find it, this will
821 prevent you from doing dynamic modules, I'll set your default
822 make to static linking.
823
824 EOF
825 DEFAULT_MAKE=static
826 fi
827 fi
828
829 EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
830
831 if test "x$DEST" = "x"
832 then
833 DEST=\${prefix}
834 fi
835
836 AC_SUBST(DEST)
837 AC_SUBST(CC)
838 AC_SUBST(MOD_LD)
839 AC_SUBST(MOD_CC)
840 AC_SUBST(MOD_STRIP)
841 AC_SUBST(SHLIB_LD)
842 AC_SUBST(SHLIB_CC)
843 AC_SUBST(SHLIB_STRIP)
844 AC_SUBST(DEFAULT_MAKE)
845 AC_SUBST(EGGEXEC)
846 AC_SUBST(EGGVERSION)
847 AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
848
849 AC_MSG_RESULT()
850 AC_MSG_RESULT(Configure is done.)
851 AC_MSG_RESULT()
852 if test -f "./$EGGEXEC"
853 then
854 AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
855 else
856 AC_MSG_RESULT(Type 'make' to create the bot.)
857 fi
858 AC_MSG_RESULT()

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23