/[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.10 - (show annotations) (download)
Thu Nov 11 17:45:04 1999 UTC (19 years, 11 months ago) by segfault
Branch: MAIN
Changes since 1.9: +1 -1 lines
Configure did not have default make = make debug

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23