/[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.3 - (hide annotations) (download)
Mon Dec 6 15:56:43 1999 UTC (19 years, 11 months ago) by fabian
Branch: MAIN
Changes since 1.2: +28 -26 lines
Toth's configure-with-fixes patch

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23