/[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.12 - (show annotations) (download)
Tue Nov 16 21:06:49 1999 UTC (20 years ago) by fabian
Branch: MAIN
Changes since 1.11: +0 -30 lines
filedb_autoconf patch

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=debug
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 AC_DEFINE(MODULES_OK)
171 ;;
172 Lynx)
173 SHLIB_STRIP=touch
174 AC_MSG_RESULT(Lynx OS)
175 ;;
176 OSF1)
177 AC_MSG_RESULT(OSF...)
178 case `${UNAME} -r | cut -d . -f 1` in
179 V*)
180 AC_MSG_RESULT([ Digital OSF])
181 if test "x$AWK" = "xgawk"
182 then
183 AWK=awk
184 fi
185 if test "x$INSTALL" = "x./install-sh"
186 then
187 INSTALL=installbsd
188 fi
189 MOD_CC=cc
190 MOD_LD=cc
191 SHLIB_CC=cc
192 SHLIB_LD="ld -shared -expect_unresolved '*'"
193 SHLIB_STRIP=touch
194 AC_DEFINE(MODULES_OK)
195 ;;
196 1.0|1.1|1.2)
197 AC_MSG_RESULT([ pre 1.3])
198 SHLIB_LD="ld -R -export $@:"
199 AC_DEFINE(MODULES_OK)
200 AC_DEFINE(OSF1_HACKS)
201 ;;
202 1.*)
203 AC_MSG_RESULT([ 1.3+])
204 SHLIB_CC="${CC} -fpic"
205 SHLIB_LD="ld -shared"
206 AC_DEFINE(MODULES_OK)
207 AC_DEFINE(OSF1_HACKS)
208 ;;
209 *)
210 AC_MSG_RESULT([ Some other weird OSF! No modules for you...])
211 NEED_DL=0
212 DEFAULT_MAKE=static
213 ;;
214 esac
215 AC_DEFINE(STOP_UAC)
216 ;;
217 SunOS)
218 if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
219 then
220 AC_MSG_RESULT(Solaris -- yay)
221 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
222 else
223 AC_MSG_RESULT(SunOS -- sigh)
224 SUNOS=yes
225 SHLIB_LD=ld
226 SHLIB_STRIP=touch
227 AC_DEFINE(DLOPEN_1)
228 fi
229 MOD_CC="${CC} -fPIC"
230 SHLIB_CC="${CC} -fPIC"
231 AC_DEFINE(MODULES_OK)
232 ;;
233 *BSD)
234 AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
235 SHLIB_CC="${CC} -fpic"
236 SHLIB_LD="ld -Bshareable -x"
237 AC_DEFINE(MODULES_OK)
238 ;;
239 *)
240 if test -r "/mach"
241 then
242 AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
243 AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])
244 AC_MSG_RESULT(Hiya DK :P)
245 NEED_DL=0
246 DEFAULT_MAKE=static
247 AC_DEFINE(BORGCUBES)
248 else
249 if test -r "/cmds"
250 then
251 AC_MSG_RESULT(QNX)
252 NEED_DL=0
253 SHLIB_STRIP=touch
254 DEFAULT_MAKE=static
255 else
256 AC_MSG_RESULT(Something unknown!)
257 AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
258 NEED_DL=0
259 DEFAULT_MAKE=static
260 fi
261 fi
262 ;;
263 esac
264
265 dnl Checks for system libraries.
266 if test "$IRIX" = "yes"
267 then
268 AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
269 else
270 AC_CHECK_LIB(socket,socket)
271 AC_CHECK_LIB(nsl,connect)
272 AC_CHECK_LIB(dns,gethostbyname)
273 AC_CHECK_LIB(dl,dlopen)
274 dnl this is needed for Tcl compiled with thread support
275 AC_CHECK_LIB(pthread,pthread_mutex_init,
276 ac_cv_lib_pthread_pthread_mutex_init=yes,
277 ac_cv_lib_pthread_pthread_mutex_init=no)
278 if test "$SUNOS" = "yes"
279 then
280 dnl for suns without yp or something like that
281 AC_CHECK_LIB(dl,main)
282 else
283 if test "$HPUX" = "yes"
284 then
285 AC_CHECK_LIB(dld,shl_load)
286 fi
287 fi
288 fi
289
290 AC_CHECK_FUNC(res_init, ,
291 AC_CHECK_LIB(bind, res_init, RESLIB="-lbind",
292 AC_CHECK_LIB(resolv, res_init, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))
293
294 AC_CHECK_FUNC(res_mkquery, ,
295 AC_CHECK_LIB(bind, res_mkquery, RESLIB="-lbind",
296 AC_CHECK_LIB(resolv, res_mkquery, RESLIB="-lresolv", AC_MSG_ERROR(No resolver library found))))
297
298 dnl Checks for header files.
299 AC_HEADER_DIRENT
300 AC_HEADER_SYS_WAIT
301 AC_CHECK_HEADERS(sys/time.h)
302 AC_HEADER_TIME
303 AC_CHECK_HEADERS(sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h)
304
305 dnl Checks for typedefs, structures, and compiler characteristics.
306 AC_TYPE_PID_T
307 AC_C_BIGENDIAN
308 AC_C_INLINE
309 AC_CHECK_SIZEOF(long,0)
310 AC_CHECK_SIZEOF(int,0)
311
312 dnl Checks for library functions.
313 AC_CHECK_FUNCS(clock getrusage setpgid uname sigaction sigemptyset)
314 AC_CHECK_FUNCS(rename strcasecmp getdtablesize bzero random srandom)
315 AC_CHECK_FUNCS(dprintf snprintf vsprintf vsnprintf dlopen)
316
317 if test "x${ac_cv_func_vsprintf}" = "xno"
318 then
319 cat << 'EOF' >&2
320 configure: error:
321
322 Your system does not have the sprintf/vsprintf libraries.
323 These are required to compile almost anything. Sorry.
324
325 EOF
326 exit 1
327 fi
328
329 if test "x${ac_cv_header_stdc}" = "xno"
330 then
331 cat << 'EOF' >&2
332 configure: error:
333
334 Your system must support ANSI C Header files.
335 These are required for the language support. Sorry.
336
337 EOF
338 exit 1
339 fi
340
341 AC_CYGWIN
342 if test ! "x${CYGWIN}" = "x"
343 then
344 AC_DEFINE(CYGWIN_HACKS)
345 fi
346
347 AC_EXEEXT
348 if test ! "x${EXEEXT}" = "x"
349 then
350 EGGEXEC=eggdrop${EXEEXT}
351 fi
352
353 dnl where is tcl? is it here?
354 # ---------- begin robey's tcl thingies
355 # (well, what used to be robey's tcl thingies...)
356
357 tclrecommendver="8.2.1"
358
359 tcllibnames="tcl tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
360 tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
361 tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
362
363 tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a"
364
365 tcllibpaths="/usr/local/lib /usr/local/pkgs/tcl/lib \
366 /usr/lib /lib /usr/i486-linuxaout/lib \
367 $HOME/lib $HOME/tcl/lib $HOME"
368
369 tclheadernames="tcl.h"
370
371 tclheaderpaths="/usr/local/include /usr/local/pkgs/tcl/include \
372 /usr/include $HOME/include $HOME/tcl/include $HOME"
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
649 # find Tcl's version
650 TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
651 TCL_PATCH_LEVEL=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
652 fi
653
654 # check if we found Tcl's version
655 AC_MSG_CHECKING(for Tcl version)
656 if test ! "x${TCL_VERSION}" = "x"
657 then
658 if test ! "x${TCL_PATCH_LEVEL}" = "x"
659 then
660 AC_MSG_RESULT($TCL_PATCH_LEVEL)
661 TCL_FOUND=1
662 else
663 AC_MSG_RESULT($TCL_VERSION)
664 TCL_FOUND=1
665 fi
666 else
667 AC_MSG_RESULT(not found)
668 TCL_FOUND=0
669 fi
670
671 if test $TCL_FOUND = 0
672 then
673 cat << 'EOF' >&2
674 configure: error:
675
676 I can't find Tcl on this system.
677
678 Eggdrop now requires Tcl to compile. If you already have Tcl
679 installed on this system, and I just wasn't looking in the right
680 place for it, set the environment variables TCLLIB and TCLINC so
681 I will know where to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h'
682 (respectively). Then run 'configure' again.
683
684 Read the README file if you don't know what Tcl is or how to get
685 it and install it.
686
687 EOF
688 exit 1
689 fi
690
691 # is this Tcl version too old for us to use ?
692 TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
693 if test "$TCL_VER_PRE70" = "xyes"
694 then
695 cat << EOF >&2
696 configure: error:
697
698 Your Tcl version is much too old for eggdrop to use.
699 I suggest you download and complie a more recent version.
700 The most reliable current version is $tclrecommendver
701
702 EOF
703 exit 1
704 fi
705
706 # are we using a pre 7.5 Tcl version ?
707 changequote(,)dnl
708 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"}'`
709 changequote([, ])dnl
710 if test "x${TCL_VER_PRE75}" = "xyes"
711 then
712 AC_DEFINE(HAVE_PRE7_5_TCL)
713 fi
714
715 # set TCL_TESTLIBS for Tcl library tests
716 if test ! "x${TCLLIBEXT}" = "x.a"
717 then
718 TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
719 else
720 if test ! "x${tcllibname}" = "x"
721 then
722 TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
723 else
724 TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
725 fi
726 fi
727 if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
728 then
729 TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
730 fi
731
732 # check for Tcl_Free()
733 AC_MSG_CHECKING(if Tcl library has Tcl_Free)
734 if eval "test \"`echo '$''{'ac_cv_var_tcl_free'+set}'`\" = set"
735 then
736 echo $ac_n "(cached) $ac_c" 1>&6
737 else
738 ac_save_LIBS="$LIBS"
739 LIBS="$TCL_TESTLIBS"
740 cat > conftest.$ac_ext << EOF
741 #include "confdefs.h"
742 char Tcl_Free();
743
744 int main() {
745 Tcl_Free();
746 return 0;
747 }
748 EOF
749 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
750 then
751 rm -rf conftest*
752 eval "ac_cv_var_tcl_free=yes"
753 else
754 echo "configure: failed program was:" >&5
755 cat conftest.$ac_ext >&5
756 rm -rf conftest*
757 eval "ac_cv_var_tcl_free=no"
758 fi
759 rm -f conftest*
760 LIBS="$ac_save_LIBS"
761 fi
762
763 if test "x${ac_cv_var_tcl_free}" = "xyes"
764 then
765 AC_MSG_RESULT(yes)
766 AC_DEFINE(HAVE_TCL_FREE)
767 else
768 AC_MSG_RESULT(no)
769 fi
770
771 # check for TclpFinalizeThreadData()
772 AC_MSG_CHECKING(if Tcl library has threads)
773 if eval "test \"`echo '$''{'ac_cv_var_tcl_threads'+set}'`\" = set"
774 then
775 echo $ac_n "(cached) $ac_c" 1>&6
776 else
777 ac_save_LIBS="$LIBS"
778 LIBS="$TCL_TESTLIBS"
779 cat > conftest.$ac_ext << EOF
780 #include "confdefs.h"
781 char TclpFinalizeThreadData();
782
783 int main() {
784 TclpFinalizeThreadData();
785 return 0;
786 }
787 EOF
788 if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
789 then
790 rm -rf conftest*
791 eval "ac_cv_var_tcl_threads=yes"
792 else
793 echo "configure: failed program was:" >&5
794 cat conftest.$ac_ext >&5
795 rm -rf conftest*
796 eval "ac_cv_var_tcl_threads=no"
797 fi
798 rm -f conftest*
799 LIBS="$ac_save_LIBS"
800 fi
801
802 if test "x${ac_cv_var_tcl_threads}" = "xyes"
803 then
804 AC_MSG_RESULT(yes)
805 cat << 'EOF' >&2
806 configure: warning:
807
808 Your Tcl library is compiled with threads.
809 There are known problems, but we will attempt to work around them.
810
811 EOF
812 AC_DEFINE(HAVE_TCL_THREADS)
813
814 # add -lpthread to $LIBS if we have it
815 if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
816 then
817 LIBS="-lpthread $LIBS"
818 fi
819 else
820 AC_MSG_RESULT(no)
821 fi
822
823 if test ! "x${TCLLIBEXT}" = "x.a"
824 then
825 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
826 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
827 else
828
829 # set default make as static for unshared Tcl library
830 if test ! "$DEFAULT_MAKE" = "static"
831 then
832 cat << 'EOF' >&2
833 configure: warning:
834
835 Your Tcl library is not a shared lib.
836 configure will now set default make type to static...
837
838 EOF
839 DEFAULT_MAKE=static
840 fi
841
842 # are we using a pre 7.4 Tcl version ?
843 changequote(,)dnl
844 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"}'`
845 changequote([, ])dnl
846 if test "x${TCL_VER_PRE74}" = "xno"
847 then
848
849 # was the --with-tcllib option given ?
850 if test ! "x${tcllibname}" = "x"
851 then
852 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
853 TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
854 else
855 TCL_REQS="$TCLLIB/lib$TCLLIBFN"
856 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
857 fi
858 else
859 cat << EOF >&2
860 configure: warning:
861
862 Your Tcl version ($TCL_VERSION) is older then 7.4.
863 There are known problems, but we will attempt to work around them.
864
865 EOF
866 TCL_REQS="libtcle.a"
867 TCL_LIBS="-L. -ltcle -lm"
868 fi
869 fi
870
871 AC_SUBST(TCLLIB)
872 AC_SUBST(TCLLIBFN)
873 AC_SUBST(TCLINC)
874 AC_SUBST(TCLINCFN)
875 AC_SUBST(TCL_REQS)
876 AC_SUBST(TCL_LIBS)
877
878 # ---------- end of robey's tcl thingies
879
880 if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
881 then
882 if test "$LINUX" = "yes"
883 then
884 cat << 'EOF' >&2
885 configure: warning:
886
887 Since you are on a Linux system, this has a known problem,
888 I know a kludge for it,
889 EOF
890
891 if test -r "/lib/libdl.so.1"
892 then
893 cat << 'EOF' >&2
894 and you seem to have it, so we'll do that...
895
896 EOF
897 AC_DEFINE(HAVE_DLOPEN)
898 LIBS="/lib/libdl.so.1 $LIBS"
899 else
900 cat << 'EOF' >&2
901 which you DONT seem to have... doh!
902 perhaps you may still have the stuff lying around somewhere
903 if you work out where it is, add it to your XLIBS= lines
904 and #define HAVE_DLOPEN in config.h
905
906 we'll proceed on anyway, but you probably won't be able
907 to 'make eggdrop' but you might be able to make the
908 static bot (I'll default your make to this version).
909
910 EOF
911 DEFAULT_MAKE=static
912 fi
913 else
914 cat << 'EOF' >&2
915 configure: warning:
916
917 You don't seem to have libdl anywhere I can find it, this will
918 prevent you from doing dynamic modules, I'll set your default
919 make to static linking.
920
921 EOF
922 DEFAULT_MAKE=static
923 fi
924 fi
925
926 EGGVERSION=`grep 'char egg_version' src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
927
928 if test "x$DEST" = "x"
929 then
930 DEST=\${prefix}
931 fi
932
933 AC_SUBST(DEST)
934 AC_SUBST(CC)
935 AC_SUBST(MOD_LD)
936 AC_SUBST(MOD_CC)
937 AC_SUBST(MOD_STRIP)
938 AC_SUBST(SHLIB_LD)
939 AC_SUBST(SHLIB_CC)
940 AC_SUBST(SHLIB_STRIP)
941 AC_SUBST(RESLIB)
942 AC_SUBST(DEFAULT_MAKE)
943 AC_SUBST(EGGEXEC)
944 AC_SUBST(EGGVERSION)
945 AC_OUTPUT(Makefile doc/Makefile scripts/Makefile src/Makefile src/md5/Makefile src/mod/Makefile lush.h)
946
947 AC_MSG_RESULT()
948 AC_MSG_RESULT(Configure is done.)
949 AC_MSG_RESULT()
950 if test -f "./$EGGEXEC"
951 then
952 AC_MSG_RESULT(Type 'make clean' and then 'make' to create the bot.)
953 else
954 AC_MSG_RESULT(Type 'make' to create the bot.)
955 fi
956 AC_MSG_RESULT()

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23