/[cvs]/eggdrop1.9/aclocal.m4
ViewVC logotype

Annotation of /eggdrop1.9/aclocal.m4

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


Revision 1.12 - (hide annotations) (download)
Sun Mar 5 23:22:48 2000 UTC (21 years, 7 months ago) by fabian
Branch: MAIN
Changes since 1.11: +3 -2 lines
configure_fix patch

1 fabian 1.4 dnl aclocal.m4
2     dnl macros autoconf uses when building configure from configure.in
3     dnl
4 fabian 1.12 dnl $Id: aclocal.m4,v 1.11 2000/02/29 20:29:29 fabian Exp $
5 fabian 1.4 dnl
6 fabian 1.1 AC_DEFUN(EGG_MSG_CONFIGURE_START, [dnl
7     AC_MSG_RESULT()
8     AC_MSG_RESULT(This is eggdrop's GNU configure script.)
9     AC_MSG_RESULT(It's going to run a bunch of strange tests to hopefully)
10     AC_MSG_RESULT(make your compile work without much twiddling.)
11     AC_MSG_RESULT()
12     ])dnl
13 fabian 1.4 dnl
14     dnl
15 fabian 1.1 AC_DEFUN(EGG_MSG_CONFIGURE_END, [dnl
16     AC_MSG_RESULT()
17     AC_MSG_RESULT(Configure is done.)
18     AC_MSG_RESULT()
19 fabian 1.10 AC_MSG_RESULT(Type 'make config' to configure the modules. Or 'make iconfig' to)
20     AC_MSG_RESULT(interactively choose which modules to compile.)
21     AC_MSG_RESULT()
22 fabian 1.1 if test -f "./$EGGEXEC"
23     then
24 fabian 1.10 AC_MSG_RESULT([After that, type 'make clean' and then 'make' to create the bot.])
25 fabian 1.1 else
26 fabian 1.10 AC_MSG_RESULT([After that, type 'make' to create the bot.])
27 fabian 1.1 fi
28     AC_MSG_RESULT()
29     ])dnl
30 fabian 1.4 dnl
31     dnl
32     dnl FIXME: make a better test
33 fabian 1.1 AC_DEFUN(EGG_CHECK_CC, [dnl
34     if test "x${cross_compiling}" = "x"
35     then
36     cat << 'EOF' >&2
37     configure: error:
38    
39     This system does not appear to have a working C compiler.
40     A working C compiler is required to compile eggdrop.
41    
42     EOF
43     exit 1
44     fi
45     ])dnl
46 fabian 1.4 dnl
47     dnl
48 fabian 1.2 AC_DEFUN(EGG_PROG_STRIP, [dnl
49     AC_CHECK_PROG(STRIP,strip,strip)
50 fabian 1.1 if test "x${STRIP}" = "x"
51     then
52     STRIP=touch
53     fi
54     ])dnl
55 fabian 1.4 dnl
56     dnl
57 fabian 1.1 AC_DEFUN(EGG_PROG_AWK, [dnl
58     # awk is needed for Tcl library and header checks, and eggdrop version subst
59     AC_PROG_AWK
60     if test "x${AWK}" = "x"
61     then
62     cat << 'EOF' >&2
63     configure: error:
64    
65     This system seems to lack a working 'awk' command.
66     A working 'awk' command is required to compile eggdrop.
67    
68     EOF
69     exit 1
70     fi
71     ])dnl
72 fabian 1.4 dnl
73     dnl
74 fabian 1.1 AC_DEFUN(EGG_PROG_BASENAME, [dnl
75     # basename is needed for Tcl library and header checks
76     AC_CHECK_PROG(BASENAME, basename, basename)
77     if test "x${BASENAME}" = "x"
78     then
79     cat << 'EOF' >&2
80     configure: error:
81    
82     This system seems to lack a working 'basename' command.
83     A working 'basename' command is required to compile eggdrop.
84    
85     EOF
86     exit 1
87     fi
88     ])dnl
89 fabian 1.4 dnl
90     dnl
91 fabian 1.1 AC_DEFUN(EGG_CHECK_OS, [dnl
92     LINUX=no
93     IRIX=no
94     SUNOS=no
95     HPUX=no
96     MOD_CC="${CC}"
97     MOD_LD="${CC}"
98     MOD_STRIP="${STRIP}"
99     SHLIB_CC="${CC}"
100     SHLIB_LD="${CC}"
101     SHLIB_STRIP="${STRIP}"
102     NEED_DL=1
103     DEFAULT_MAKE=debug
104    
105     AC_MSG_CHECKING(your OS)
106     if eval "test \"`echo '$''{'egg_cv_var_system'+set}'`\" = set"
107     then
108     echo $ac_n "(cached) $ac_c" 1>&6
109     else
110     eval "egg_cv_var_system=`${UNAME}`"
111     fi
112    
113     case "$egg_cv_var_system" in
114     BSD/OS)
115     if test "x`${UNAME} -r | cut -d . -f 1`" = "x2"
116     then
117     AC_MSG_RESULT(BSD/OS 2! statically linked modules are the only choice)
118     NEED_DL=0
119     DEFAULT_MAKE=static
120     else
121     AC_MSG_RESULT(BSD/OS 3+! ok I spose)
122     MOD_CC=shlicc
123     MOD_LD=shlicc
124     MOD_STRIP="${STRIP} -d"
125     SHLIB_LD="shlicc -r"
126     SHLIB_STRIP=touch
127     AC_DEFINE(MODULES_OK)dnl
128     fi
129     ;;
130     CYGWIN*)
131     AC_MSG_RESULT(Cygwin)
132     NEED_DL=0
133     DEFAULT_MAKE=static
134     ;;
135     HP-UX)
136     AC_MSG_RESULT([HP-UX, just shoot yourself now])
137     HPUX=yes
138     MOD_LD="gcc -Wl,-E"
139     SHLIB_CC="gcc -fPIC"
140     SHLIB_LD="ld -b"
141     NEED_DL=0
142     AC_DEFINE(MODULES_OK)dnl
143     AC_DEFINE(HPUX_HACKS)dnl
144     if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
145     then
146     AC_DEFINE(HPUX10_HACKS)dnl
147     fi
148     ;;
149     IRIX)
150     AC_MSG_RESULT(you are cursed with IRIX)
151     IRIX=yes
152     SHLIB_STRIP=touch
153     NEED_DL=0
154     DEFAULT_MAKE=static
155     ;;
156     IRIX64)
157     AC_MSG_RESULT(IRIX64)
158     IRIX=yes
159     SHLIB_STRIP=strip
160     NEED_DL=0
161     DEFAULT_MAKE=static
162 fabian 1.11 ;;
163     Ultrix)
164     AC_MSG_RESULT(Ultrix)
165     NEED_DL=0
166     SHLIB_STRIP=touch
167     DEFUALT_MAKE=static
168     ;;
169     BeOS)
170     AC_MSG_RESULT(BeOS)
171     NEED_DL=0
172     SHLIB_STRIP=strip
173     DEFUALT_MAKE=static
174 fabian 1.1 ;;
175     Linux)
176     AC_MSG_RESULT(Linux! The choice of the GNU generation)
177     LINUX=yes
178     CFLAGS="$CFLAGS -Wall"
179     MOD_LD="${CC}"
180     SHLIB_LD="${CC} -shared -nostartfiles"
181     AC_DEFINE(MODULES_OK)dnl
182     ;;
183     Lynx)
184     SHLIB_STRIP=touch
185     AC_MSG_RESULT(Lynx OS)
186     ;;
187     OSF1)
188     AC_MSG_RESULT(OSF...)
189     case `${UNAME} -r | cut -d . -f 1` in
190     V*)
191     AC_MSG_RESULT([ Digital OSF])
192     if test "x$AWK" = "xgawk"
193     then
194     AWK=awk
195     fi
196     MOD_CC=cc
197     MOD_LD=cc
198     SHLIB_CC=cc
199     SHLIB_LD="ld -shared -expect_unresolved '*'"
200     SHLIB_STRIP=touch
201     AC_DEFINE(MODULES_OK)dnl
202     ;;
203     1.0|1.1|1.2)
204     AC_MSG_RESULT([ pre 1.3])
205     SHLIB_LD="ld -R -export $@:"
206     AC_DEFINE(MODULES_OK)dnl
207     AC_DEFINE(OSF1_HACKS)dnl
208     ;;
209     1.*)
210     AC_MSG_RESULT([ 1.3+])
211     SHLIB_CC="${CC} -fpic"
212     SHLIB_LD="ld -shared"
213     AC_DEFINE(MODULES_OK)dnl
214     AC_DEFINE(OSF1_HACKS)dnl
215     ;;
216     *)
217     AC_MSG_RESULT([ Some other weird OSF! No modules for you...])
218     NEED_DL=0
219     DEFAULT_MAKE=static
220     ;;
221     esac
222     AC_DEFINE(STOP_UAC)dnl
223     ;;
224     SunOS)
225     if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
226     then
227     AC_MSG_RESULT(Solaris -- yay)
228     SHLIB_LD="/usr/ccs/bin/ld -G -z text"
229     else
230     AC_MSG_RESULT(SunOS -- sigh)
231     SUNOS=yes
232     SHLIB_LD=ld
233     SHLIB_STRIP=touch
234     AC_DEFINE(DLOPEN_1)dnl
235     fi
236     MOD_CC="${CC} -fPIC"
237     SHLIB_CC="${CC} -fPIC"
238     AC_DEFINE(MODULES_OK)dnl
239     ;;
240     *BSD)
241     AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
242     SHLIB_CC="${CC} -fpic"
243     SHLIB_LD="ld -Bshareable -x"
244     AC_DEFINE(MODULES_OK)dnl
245     ;;
246     *)
247     if test -r "/mach"
248     then
249     AC_MSG_RESULT([NeXT...We are borg, you will be assimilated])
250     AC_MSG_RESULT([break out the static modules, it's all you'll ever get :P])
251     AC_MSG_RESULT(Hiya DK :P)
252     NEED_DL=0
253     DEFAULT_MAKE=static
254     AC_DEFINE(BORGCUBES)dnl
255     else
256     if test -r "/cmds"
257     then
258     AC_MSG_RESULT(QNX)
259     SHLIB_STRIP=touch
260     NEED_DL=0
261     DEFAULT_MAKE=static
262     else
263     AC_MSG_RESULT(Something unknown!)
264     AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
265     NEED_DL=0
266     DEFAULT_MAKE=static
267     fi
268     fi
269     ;;
270     esac
271     AC_SUBST(MOD_LD)dnl
272     AC_SUBST(MOD_CC)dnl
273     AC_SUBST(MOD_STRIP)dnl
274     AC_SUBST(SHLIB_LD)dnl
275     AC_SUBST(SHLIB_CC)dnl
276     AC_SUBST(SHLIB_STRIP)dnl
277     AC_SUBST(DEFAULT_MAKE)dnl
278     ])dnl
279 fabian 1.4 dnl
280     dnl
281 fabian 1.1 AC_DEFUN(EGG_CHECK_LIBS, [dnl
282     if test "$IRIX" = "yes"
283     then
284     AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
285     else
286     AC_CHECK_LIB(socket, socket)
287     AC_CHECK_LIB(nsl, connect)
288     AC_CHECK_LIB(dns, gethostbyname)
289     AC_CHECK_LIB(dl, dlopen)
290     # This is needed for Tcl libraries compiled with thread support
291     AC_CHECK_LIB(pthread,pthread_mutex_init,
292     ac_cv_lib_pthread_pthread_mutex_init=yes,
293     ac_cv_lib_pthread_pthread_mutex_init=no)
294     if test "$SUNOS" = "yes"
295     then
296     # For suns without yp or something like that
297     AC_CHECK_LIB(dl, main)
298     else
299     if test "$HPUX" = "yes"
300     then
301     AC_CHECK_LIB(dld, shl_load)
302     fi
303     fi
304     fi
305     ])dnl
306 fabian 1.4 dnl
307     dnl
308 fabian 1.1 AC_DEFUN(EGG_CHECK_FUNC_VSPRINTF, [dnl
309     AC_CHECK_FUNCS(vsprintf)
310     if test "x${ac_cv_func_vsprintf}" = "xno"
311     then
312     cat << 'EOF' >&2
313     configure: error:
314    
315     Your system does not have the sprintf/vsprintf libraries.
316     These are required to compile almost anything. Sorry.
317    
318     EOF
319     exit 1
320     fi
321     ])dnl
322 fabian 1.4 dnl
323     dnl
324 fabian 1.1 AC_DEFUN(EGG_HEADER_STDC, [dnl
325     if test "x${ac_cv_header_stdc}" = "xno"
326     then
327     cat << 'EOF' >&2
328     configure: error:
329    
330     Your system must support ANSI C Header files.
331     These are required for the language support. Sorry.
332    
333     EOF
334     exit 1
335     fi
336     ])dnl
337 fabian 1.4 dnl
338     dnl
339 fabian 1.1 AC_DEFUN(EGG_CYGWIN, [dnl
340     AC_CYGWIN
341     if test ! "x${CYGWIN}" = "x"
342     then
343     AC_DEFINE(CYGWIN_HACKS)dnl
344     fi
345     ])dnl
346 fabian 1.4 dnl
347     dnl
348 fabian 1.1 AC_DEFUN(EGG_EXEEXT, [dnl
349     EGGEXEC=eggdrop
350     AC_EXEEXT
351     if test ! "x${EXEEXT}" = "x"
352     then
353     EGGEXEC=eggdrop${EXEEXT}
354     fi
355     AC_SUBST(EGGEXEC)dnl
356     ])dnl
357 fabian 1.4 dnl
358     dnl
359 fabian 1.1 AC_DEFUN(EGG_TCL_ARG_WITH, [dnl
360     # oohh new configure --variables for those with multiple tcl libs
361     AC_ARG_WITH(tcllib, [ --with-tcllib=PATH full path to tcl library], tcllibname=$withval)
362     AC_ARG_WITH(tclinc, [ --with-tclinc=PATH full path to tcl header], tclincname=$withval)
363    
364 fabian 1.3 WARN=0
365 fabian 1.1 # Make sure either both or neither $tcllibname and $tclincname are set
366     if test ! "x${tcllibname}" = "x"
367     then
368     if test "x${tclincname}" = "x"
369     then
370 fabian 1.3 WARN=1
371 fabian 1.1 tcllibname=""
372     TCLLIB=""
373     TCLINC=""
374     fi
375     else
376     if test ! "x${tclincname}" = "x"
377     then
378 fabian 1.3 WARN=1
379     tclincname=""
380     TCLLIB=""
381     TCLINC=""
382     fi
383     fi
384     if test ${WARN} = 1
385     then
386     cat << 'EOF' >&2
387 fabian 1.1 configure: warning:
388    
389     You must specify both --with-tcllib and --with-tclinc for them to work.
390     configure will now attempt to autodetect both the Tcl library and header...
391    
392     EOF
393     fi
394     ])dnl
395 fabian 1.4 dnl
396     dnl
397 fabian 1.1 AC_DEFUN(EGG_TCL_ENV, [dnl
398 fabian 1.3 WARN=0
399 fabian 1.1 # Make sure either both or neither $TCLLIB and $TCLINC are set
400     if test ! "x${TCLLIB}" = "x"
401     then
402     if test "x${TCLINC}" = "x"
403     then
404 fabian 1.3 WARN=1
405     WVAR1=TCLLIB
406     WVAR2=TCLINC
407 fabian 1.1 TCLLIB=""
408     fi
409     else
410     if test ! "x${TCLINC}" = "x"
411     then
412 fabian 1.3 WARN=1
413     WVAR1=TCLINC
414     WVAR2=TCLLIB
415     TCLINC=""
416     fi
417     fi
418     if test ${WARN} = 1
419     then
420 fabian 1.5 cat << EOF >&2
421 fabian 1.1 configure: warning:
422    
423 fabian 1.3 Environment variable ${WVAR1} was set, but I did not detect ${WVAR2}.
424 fabian 1.1 Please set both TCLLIB and TCLINC correctly if you wish to use them.
425     configure will now attempt to autodetect both the Tcl library and header...
426    
427     EOF
428     fi
429     ])dnl
430 fabian 1.4 dnl
431     dnl
432 fabian 1.1 AC_DEFUN(EGG_TCL_WITH_TCLLIB, [dnl
433     # Look for Tcl library: if $tcllibname is set, check there first
434     if test ! "x${tcllibname}" = "x"
435     then
436     if test -f "$tcllibname" && test -r "$tcllibname"
437     then
438 fabian 1.3 TCLLIB=`echo $tcllibname | sed 's%/[[^/]][[^/]]*$%%'`
439 fabian 1.1 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
440     TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split([$]1, i, "."); print i[[j]]}'`"
441     TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
442     else
443     cat << EOF >&2
444     configure: warning:
445    
446     The file '$tcllibname' given to option --with-tcllib is not valid.
447     configure will now attempt to autodetect both the Tcl library and header...
448    
449     EOF
450     tcllibname=""
451     tclincname=""
452     TCLLIB=""
453     TCLLIBFN=""
454     TCLINC=""
455     TCLINCFN=""
456     fi
457     fi
458     ])dnl
459 fabian 1.4 dnl
460     dnl
461 fabian 1.1 AC_DEFUN(EGG_TCL_WITH_TCLINC, [dnl
462     # Look for Tcl header: if $tclincname is set, check there first
463     if test ! "x${tclincname}" = "x"
464     then
465     if test -f "$tclincname" && test -r "$tclincname"
466     then
467 fabian 1.3 TCLINC=`echo $tclincname | sed 's%/[[^/]][[^/]]*$%%'`
468 fabian 1.1 TCLINCFN=`$BASENAME $tclincname`
469     else
470     cat << EOF >&2
471     configure: warning:
472    
473     The file '$tclincname' given to option --with-tclinc is not valid.
474     configure will now attempt to autodetect both the Tcl library and header...
475    
476     EOF
477     tcllibname=""
478     tclincname=""
479     TCLLIB=""
480     TCLLIBFN=""
481     TCLINC=""
482     TCLINCFN=""
483     fi
484     fi
485     ])dnl
486 fabian 1.4 dnl
487     dnl
488 fabian 1.1 AC_DEFUN(EGG_TCL_FIND_LIBRARY, [dnl
489     # Look for Tcl library: if $TCLLIB is set, check there first
490     if test "x${TCLLIBFN}" = "x"
491     then
492     if test ! "x${TCLLIB}" = "x"
493     then
494     if test -d "${TCLLIB}"
495     then
496     for tcllibfns in $tcllibnames
497     do
498     for tcllibext in $tcllibextensions
499     do
500     if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
501     then
502     TCLLIBFN=$tcllibfns$tcllibext
503     TCLLIBEXT=$tcllibext
504     TCLLIBFNS=$tcllibfns
505     break 2
506     fi
507     done
508     done
509     fi
510     if test "x${TCLLIBFN}" = "x"
511     then
512     cat << 'EOF' >&2
513     configure: warning:
514    
515     Environment variable TCLLIB was set, but incorrect.
516     Please set both TCLLIB and TCLINC correctly if you wish to use them.
517     configure will now attempt to autodetect both the Tcl library and header...
518    
519     EOF
520     TCLLIB=""
521     TCLLIBFN=""
522     TCLINC=""
523     TCLINCFN=""
524     fi
525     fi
526     fi
527     ])dnl
528 fabian 1.4 dnl
529     dnl
530 fabian 1.1 AC_DEFUN(EGG_TCL_FIND_HEADER, [dnl
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 fabian 1.3 break
544 fabian 1.1 fi
545     done
546     fi
547     if test "x${TCLINCFN}" = "x"
548     then
549     cat << 'EOF' >&2
550     configure: warning:
551    
552     Environment variable TCLINC was set, but incorrect.
553     Please set both TCLLIB and TCLINC correctly if you wish to use them.
554     configure will now attempt to autodetect both the Tcl library and header...
555    
556     EOF
557     TCLLIB=""
558     TCLLIBFN=""
559     TCLINC=""
560     TCLINCFN=""
561     fi
562     fi
563     fi
564     ])dnl
565 fabian 1.4 dnl
566     dnl
567 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_LIBRARY, [dnl
568     AC_MSG_CHECKING(for Tcl library)
569    
570     # Attempt autodetect for $TCLLIBFN if it's not set
571     if test ! "x${TCLLIBFN}" = "x"
572     then
573     AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
574     else
575     for tcllibfns in $tcllibnames
576     do
577     for tcllibext in $tcllibextensions
578     do
579     for tcllibpath in $tcllibpaths
580     do
581     if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
582     then
583     AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
584     TCLLIB=$tcllibpath
585     TCLLIBFN=$tcllibfns$tcllibext
586     TCLLIBEXT=$tcllibext
587     TCLLIBFNS=$tcllibfns
588     break 3
589     fi
590     done
591     done
592     done
593     fi
594    
595     # Show if $TCLLIBFN wasn't found
596     if test "x${TCLLIBFN}" = "x"
597     then
598     AC_MSG_RESULT(not found)
599     fi
600     AC_SUBST(TCLLIB)dnl
601     AC_SUBST(TCLLIBFN)dnl
602     ])dnl
603 fabian 1.4 dnl
604     dnl
605 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_HEADER, [dnl
606     AC_MSG_CHECKING(for Tcl header)
607    
608     # Attempt autodetect for $TCLINCFN if it's not set
609     if test ! "x${TCLINCFN}" = "x"
610     then
611     AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
612     else
613     for tclheaderpath in $tclheaderpaths
614     do
615     for tclheaderfn in $tclheadernames
616     do
617     if test -r "$tclheaderpath/$tclheaderfn"
618     then
619     AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
620     TCLINC=$tclheaderpath
621     TCLINCFN=$tclheaderfn
622     break 2
623     fi
624     done
625     done
626     # FreeBSD hack ...
627     if test "x${TCLINCFN}" = "x"
628     then
629     for tcllibfns in $tcllibnames
630     do
631     for tclheaderpath in $tclheaderpaths
632     do
633     for tclheaderfn in $tclheadernames
634     do
635     if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
636     then
637     AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
638     TCLINC=$tclheaderpath/$tcllibfns
639     TCLINCFN=$tclheaderfn
640     break 3
641     fi
642     done
643     done
644     done
645     fi
646     fi
647    
648     # Show if $TCLINCFN wasn't found
649     if test "x${TCLINCFN}" = "x"
650     then
651     AC_MSG_RESULT(not found)
652     fi
653     AC_SUBST(TCLINC)dnl
654     AC_SUBST(TCLINCFN)dnl
655     ])dnl
656 fabian 1.4 dnl
657     dnl
658 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_VERSION, [dnl
659     # Both TCLLIBFN & TCLINCFN must be set, or we bail
660 fabian 1.12 TCL_FOUND=0
661 fabian 1.1 if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
662     then
663     TCL_FOUND=1
664    
665     # Check Tcl's version
666     AC_MSG_CHECKING(for Tcl version)
667     if eval "test \"`echo '$''{'egg_cv_var_tcl_version'+set}'`\" = set"
668     then
669     echo $ac_n "(cached) $ac_c" 1>&6
670     else
671     eval "egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`"
672     fi
673    
674     if test ! "x${egg_cv_var_tcl_version}" = "x"
675     then
676     AC_MSG_RESULT($egg_cv_var_tcl_version)
677     else
678     AC_MSG_RESULT(not found)
679     TCL_FOUND=0
680     fi
681    
682     # Check Tcl's patch level (if avaliable)
683     AC_MSG_CHECKING(for Tcl patch level)
684     if eval "test \"`echo '$''{'egg_cv_var_tcl_patch_level'+set}'`\" = set"
685     then
686     echo $ac_n "(cached) $ac_c" 1>&6
687     else
688     eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`"
689     fi
690    
691     if test ! "x${egg_cv_var_tcl_patch_level}" = "x"
692     then
693     AC_MSG_RESULT($egg_cv_var_tcl_patch_level)
694     else
695     egg_cv_var_tcl_patch_level="unknown"
696     AC_MSG_RESULT(unknown)
697     fi
698     fi
699    
700     # Check if we found Tcl's version
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     ])dnl
721 fabian 1.4 dnl
722     dnl
723 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_PRE70, [dnl
724     # Is this version of Tcl too old for us to use ?
725     TCL_VER_PRE70=`echo $egg_cv_var_tcl_version | $AWK '{split([$]1, i, "."); if (i[[1]] < 7) print "yes"; else print "no"}'`
726 fabian 1.12 if test "x$TCL_VER_PRE70" = "xyes"
727 fabian 1.1 then
728     cat << EOF >&2
729     configure: error:
730    
731     Your Tcl version is much too old for eggdrop to use.
732     I suggest you download and complie a more recent version.
733     The most reliable current version is $tclrecommendver and
734     can be downloaded from $tclrecommendsite
735    
736     EOF
737     exit 1
738     fi
739     ])dnl
740 fabian 1.4 dnl
741     dnl
742 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_PRE75, [dnl
743     # Are we using a pre 7.5 Tcl version ?
744     TCL_VER_PRE75=`echo $egg_cv_var_tcl_version | $AWK '{split([$]1, i, "."); if (((i[[1]] == 7) && (i[[2]] < 5)) || (i[[1]] < 7)) print "yes"; else print "no"}'`
745     if test "x${TCL_VER_PRE75}" = "xyes"
746     then
747     AC_DEFINE(HAVE_PRE7_5_TCL)dnl
748     fi
749     ])dnl
750 fabian 1.4 dnl
751     dnl
752 fabian 1.1 AC_DEFUN(EGG_TCL_TESTLIBS, [dnl
753     # Setup TCL_TESTLIBS for Tcl library tests
754     if test ! "x${TCLLIBEXT}" = "x.a"
755     then
756     TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
757     else
758     if test ! "x${tcllibname}" = "x"
759     then
760     TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN -lm $LIBS"
761     else
762     TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS -lm $LIBS"
763     fi
764     fi
765     if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
766     then
767     TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
768     fi
769     ])dnl
770 fabian 1.4 dnl
771     dnl
772 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_FREE, [dnl
773     # Check for Tcl_Free()
774     AC_MSG_CHECKING(if Tcl library has Tcl_Free)
775     if eval "test \"`echo '$''{'egg_cv_var_tcl_free'+set}'`\" = set"
776     then
777     echo $ac_n "(cached) $ac_c" 1>&6
778     else
779     ac_save_LIBS="$LIBS"
780     LIBS="$TCL_TESTLIBS"
781     cat > conftest.$ac_ext << EOF
782     #include "confdefs.h"
783     char Tcl_Free();
784    
785     int main() {
786     Tcl_Free();
787     return 0;
788     }
789     EOF
790     if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
791     then
792     rm -rf conftest*
793     eval "egg_cv_var_tcl_free=yes"
794     else
795     echo "configure: failed program was:" >&5
796     cat conftest.$ac_ext >&5
797     rm -rf conftest*
798     eval "egg_cv_var_tcl_free=no"
799     fi
800     rm -f conftest*
801     LIBS="$ac_save_LIBS"
802     fi
803    
804     if test "x${egg_cv_var_tcl_free}" = "xyes"
805     then
806     AC_MSG_RESULT(yes)
807     AC_DEFINE(HAVE_TCL_FREE)dnl
808     else
809     AC_MSG_RESULT(no)
810     fi
811     ])dnl
812 fabian 1.4 dnl
813     dnl
814 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_THREADS, [dnl
815     # Check for TclpFinalizeThreadData()
816     AC_MSG_CHECKING(if Tcl library is multithreaded)
817     if eval "test \"`echo '$''{'egg_cv_var_tcl_multithreaded'+set}'`\" = set"
818     then
819     echo $ac_n "(cached) $ac_c" 1>&6
820     else
821     ac_save_LIBS="$LIBS"
822     LIBS="$TCL_TESTLIBS"
823     cat > conftest.$ac_ext << EOF
824     #include "confdefs.h"
825     char TclpFinalizeThreadData();
826    
827     int main() {
828     TclpFinalizeThreadData();
829     return 0;
830     }
831     EOF
832     if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
833     then
834     rm -rf conftest*
835     eval "egg_cv_var_tcl_multithreaded=yes"
836     else
837     echo "configure: failed program was:" >&5
838     cat conftest.$ac_ext >&5
839     rm -rf conftest*
840     eval "egg_cv_var_tcl_multithreaded=no"
841     fi
842     rm -f conftest*
843     LIBS="$ac_save_LIBS"
844     fi
845    
846     if test "x${egg_cv_var_tcl_multithreaded}" = "xyes"
847     then
848     AC_MSG_RESULT(yes)
849     cat << 'EOF' >&2
850     configure: warning:
851    
852     Your Tcl library is compiled with threads support.
853     There are known problems, but we will attempt to work around them.
854    
855     EOF
856     AC_DEFINE(HAVE_TCL_THREADS)dnl
857    
858     # Add -lpthread to $LIBS if we have it
859     if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
860     then
861     LIBS="-lpthread $LIBS"
862     fi
863     else
864     AC_MSG_RESULT(no)
865     fi
866     ])dnl
867 fabian 1.4 dnl
868     dnl
869 fabian 1.1 AC_DEFUN(EGG_TCL_LIB_REQS, [dnl
870     if test ! "x${TCLLIBEXT}" = "x.a"
871     then
872     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
873     TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
874     else
875    
876     # Set default make as static for unshared Tcl library
877     if test ! "$DEFAULT_MAKE" = "static"
878     then
879     cat << 'EOF' >&2
880     configure: warning:
881    
882     Your Tcl library is not a shared lib.
883     configure will now set default make type to static...
884    
885     EOF
886     DEFAULT_MAKE=static
887     AC_SUBST(DEFAULT_MAKE)dnl
888     fi
889    
890     # Are we using a pre 7.4 Tcl version ?
891     TCL_VER_PRE74=`echo $egg_cv_var_tcl_version | $AWK '{split([$]1, i, "."); if (((i[[1]] == 7) && (i[[2]] < 4)) || (i[[1]] < 7)) print "yes"; else print "no"}'`
892     if test "x${TCL_VER_PRE74}" = "xno"
893     then
894    
895     # Was the --with-tcllib option given ?
896     if test ! "x${tcllibname}" = "x"
897     then
898     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
899     TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
900     else
901     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
902     TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
903     fi
904     else
905     cat << EOF >&2
906     configure: warning:
907    
908     Your Tcl version ($egg_cv_var_tcl_version) is older then 7.4.
909     There are known problems, but we will attempt to work around them.
910    
911     EOF
912     TCL_REQS="libtcle.a"
913     TCL_LIBS="-L. -ltcle -lm"
914     fi
915     fi
916     AC_SUBST(TCL_REQS)dnl
917     AC_SUBST(TCL_LIBS)dnl
918     ])dnl
919 fabian 1.4 dnl
920     dnl
921 fabian 1.1 AC_DEFUN(EGG_FUNC_DLOPEN, [dnl
922     if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
923     then
924     if test "$LINUX" = "yes"
925     then
926     cat << 'EOF' >&2
927     configure: warning:
928    
929     Since you are on a Linux system, this has a known problem...
930     I know a kludge for it,
931     EOF
932    
933     if test -r "/lib/libdl.so.1"
934     then
935     cat << 'EOF' >&2
936     and you seem to have it, so we'll do that...
937    
938     EOF
939     AC_DEFINE(HAVE_DLOPEN)dnl
940     LIBS="/lib/libdl.so.1 $LIBS"
941     else
942     cat << 'EOF' >&2
943     which you DON'T seem to have... doh!
944     perhaps you may still have the stuff lying around somewhere
945     if you work out where it is, add it to your XLIBS= lines
946     and #define HAVE_DLOPEN in config.h
947    
948     we'll proceed on anyway, but you probably won't be able
949     to 'make eggdrop' but you might be able to make the
950     static bot (I'll default your make to this version).
951    
952     EOF
953     DEFAULT_MAKE=static
954     fi
955     else
956     cat << 'EOF' >&2
957     configure: warning:
958    
959     You don't seem to have libdl anywhere I can find it, this will
960     prevent you from doing dynamic modules, I'll set your default
961     make to static linking.
962    
963     EOF
964     DEFAULT_MAKE=static
965     fi
966     fi
967     ])dnl
968 fabian 1.4 dnl
969     dnl
970 fabian 1.1 AC_DEFUN(EGG_SUBST_EGGVERSION, [dnl
971 fabian 1.10 EGGVERSION=`grep 'char.egg_version' ${srcdir}/src/main.c | $AWK '{gsub(/(\"|\;)/, "", [$]4); print [$]4}'`
972 fabian 1.6 egg_version_num=`echo ${EGGVERSION} | $AWK 'BEGIN { FS = "."; } { printf("%d%02d%02d", [$]1, [$]2, [$]3); }'`
973 fabian 1.1 AC_SUBST(EGGVERSION)dnl
974 fabian 1.6 AC_DEFINE_UNQUOTED(EGG_VERSION, $egg_version_num)dnl
975 fabian 1.1 ])dnl
976 fabian 1.4 dnl
977     dnl
978 fabian 1.1 AC_DEFUN(EGG_SUBST_DEST, [dnl
979     if test "x$DEST" = "x"
980     then
981     DEST=\${prefix}
982     fi
983     AC_SUBST(DEST)dnl
984     ])dnl

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23