/[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.31 - (hide annotations) (download)
Thu Dec 21 20:20:02 2000 UTC (18 years, 6 months ago) by guppy
Branch: MAIN
Changes since 1.30: +16 -1 lines
ITE's configure path fix patch

1 fabian 1.4 dnl aclocal.m4
2     dnl macros autoconf uses when building configure from configure.in
3     dnl
4 guppy 1.31 dnl $Id: aclocal.m4,v 1.30 2000/11/29 02:46:16 guppy Exp $
5 fabian 1.13 dnl
6    
7    
8     dnl EGG_MSG_CONFIGURE_START()
9 fabian 1.4 dnl
10 fabian 1.1 AC_DEFUN(EGG_MSG_CONFIGURE_START, [dnl
11     AC_MSG_RESULT()
12     AC_MSG_RESULT(This is eggdrop's GNU configure script.)
13     AC_MSG_RESULT(It's going to run a bunch of strange tests to hopefully)
14     AC_MSG_RESULT(make your compile work without much twiddling.)
15     AC_MSG_RESULT()
16     ])dnl
17 fabian 1.13
18    
19     dnl EGG_MSG_CONFIGURE_END()
20 fabian 1.4 dnl
21 fabian 1.1 AC_DEFUN(EGG_MSG_CONFIGURE_END, [dnl
22     AC_MSG_RESULT()
23     AC_MSG_RESULT(Configure is done.)
24     AC_MSG_RESULT()
25 fabian 1.10 AC_MSG_RESULT(Type 'make config' to configure the modules. Or 'make iconfig' to)
26     AC_MSG_RESULT(interactively choose which modules to compile.)
27     AC_MSG_RESULT()
28 fabian 1.1 if test -f "./$EGGEXEC"
29     then
30 fabian 1.10 AC_MSG_RESULT([After that, type 'make clean' and then 'make' to create the bot.])
31 fabian 1.1 else
32 fabian 1.10 AC_MSG_RESULT([After that, type 'make' to create the bot.])
33 fabian 1.1 fi
34     AC_MSG_RESULT()
35     ])dnl
36 fabian 1.13
37    
38     dnl EGG_CHECK_CC()
39 fabian 1.4 dnl
40 fabian 1.13 dnl FIXME: make a better test
41 fabian 1.1 AC_DEFUN(EGG_CHECK_CC, [dnl
42     if test "x${cross_compiling}" = "x"
43     then
44     cat << 'EOF' >&2
45     configure: error:
46    
47     This system does not appear to have a working C compiler.
48     A working C compiler is required to compile eggdrop.
49    
50     EOF
51     exit 1
52     fi
53     ])dnl
54 fabian 1.13
55    
56 fabian 1.28 dnl EGG_CHECK_CCPIPE()
57 fabian 1.27 dnl
58 fabian 1.28 dnl Checks whether the compiler supports the `-pipe' flag, which
59     dnl speeds up the compilation.
60     AC_DEFUN(EGG_CHECK_CCPIPE, [dnl
61 fabian 1.27 if test -z "$no_pipe"
62     then
63     if test -n "$GCC"
64     then
65 fabian 1.28 AC_CACHE_CHECK(whether the compiler understands -pipe, egg_cv_var_ccpipe,
66     [dnl
67 fabian 1.27 ac_old_CC="$CC"
68     CC="$CC -pipe"
69     AC_TRY_COMPILE(,, egg_cv_var_ccpipe="yes", egg_cv_var_ccpipe="no")
70     CC="$ac_old_CC"
71     ])
72     if test "x$egg_cv_var_ccpipe" = "xyes"; then
73     CC="$CC -pipe"
74     fi
75     fi
76     fi
77     ])dnl
78    
79    
80 fabian 1.13 dnl EGG_PROG_STRIP()
81 fabian 1.4 dnl
82 fabian 1.2 AC_DEFUN(EGG_PROG_STRIP, [dnl
83     AC_CHECK_PROG(STRIP,strip,strip)
84 fabian 1.1 if test "x${STRIP}" = "x"
85     then
86     STRIP=touch
87     fi
88     ])dnl
89 fabian 1.13
90    
91     dnl EGG_PROG_AWK()
92 fabian 1.4 dnl
93 fabian 1.1 AC_DEFUN(EGG_PROG_AWK, [dnl
94     # awk is needed for Tcl library and header checks, and eggdrop version subst
95     AC_PROG_AWK
96     if test "x${AWK}" = "x"
97     then
98     cat << 'EOF' >&2
99     configure: error:
100    
101     This system seems to lack a working 'awk' command.
102     A working 'awk' command is required to compile eggdrop.
103    
104     EOF
105     exit 1
106     fi
107     ])dnl
108 fabian 1.13
109    
110     dnl EGG_PROG_BASENAME()
111 fabian 1.4 dnl
112 fabian 1.1 AC_DEFUN(EGG_PROG_BASENAME, [dnl
113     # basename is needed for Tcl library and header checks
114     AC_CHECK_PROG(BASENAME, basename, basename)
115     if test "x${BASENAME}" = "x"
116     then
117     cat << 'EOF' >&2
118     configure: error:
119    
120     This system seems to lack a working 'basename' command.
121     A working 'basename' command is required to compile eggdrop.
122    
123     EOF
124     exit 1
125     fi
126     ])dnl
127 fabian 1.13
128    
129     dnl EGG_CHECK_OS()
130 fabian 1.4 dnl
131 fabian 1.1 AC_DEFUN(EGG_CHECK_OS, [dnl
132     LINUX=no
133     IRIX=no
134     SUNOS=no
135     HPUX=no
136     MOD_CC="${CC}"
137     MOD_LD="${CC}"
138     MOD_STRIP="${STRIP}"
139     SHLIB_CC="${CC}"
140     SHLIB_LD="${CC}"
141     SHLIB_STRIP="${STRIP}"
142     NEED_DL=1
143     DEFAULT_MAKE=debug
144 fabian 1.20 MOD_EXT=so
145 fabian 1.1
146 fabian 1.25 AC_MSG_CHECKING(your os)
147     AC_CACHE_VAL(egg_cv_var_system, [egg_cv_var_system=`${UNAME}`])
148 fabian 1.1
149     case "$egg_cv_var_system" in
150     BSD/OS)
151 fabian 1.14 bsd_version=`${UNAME} -r | cut -d . -f 1`
152     case "$bsd_version" in
153     2)
154 fabian 1.24 AC_MSG_RESULT(BSD/OS 2)
155 fabian 1.14 NEED_DL=0
156     DEFAULT_MAKE=static
157     ;;
158     3)
159 fabian 1.24 AC_MSG_RESULT(BSD/OS 3)
160 fabian 1.14 MOD_CC=shlicc
161     MOD_LD=shlicc
162     MOD_STRIP="${STRIP} -d"
163     SHLIB_LD="shlicc -r"
164     SHLIB_STRIP=touch
165     AC_DEFINE(MODULES_OK)dnl
166     ;;
167     *)
168 fabian 1.24 AC_MSG_RESULT(BSD/OS 4+)
169 fabian 1.14 CFLAGS="$CFLAGS -Wall"
170     MOD_LD="${CC} "
171     MOD_STRIP="${STRIP} -d"
172 fabian 1.27 SHLIB_CC="${CC} -export-dynamic -fPIC"
173 fabian 1.14 SHLIB_LD="${CC} -shared -nostartfiles"
174     AC_DEFINE(MODULES_OK)dnl
175     ;;
176     esac
177 fabian 1.1 ;;
178     CYGWIN*)
179 fabian 1.20 cygwin_version=`${UNAME} -r | cut -c 1-3`
180     case "$cygwin_version" in
181     1.*)
182     AC_MSG_RESULT(Cygwin 1.x)
183     NEED_DL=0
184     MOD_LD="${CC}"
185     SHLIB_LD="${CC} -shared"
186     MOD_EXT=dll
187     AC_DEFINE(MODULES_OK)dnl
188     ;;
189     *)
190     AC_MSG_RESULT(Cygwin pre 1.0 or unknown)
191     NEED_DL=0
192     DEFAULT_MAKE=static
193     ;;
194     esac
195 fabian 1.1 ;;
196     HP-UX)
197 fabian 1.28 AC_MSG_RESULT(HP-UX)
198 fabian 1.1 HPUX=yes
199 fabian 1.28 MOD_LD="${CC} -fPIC -shared"
200     SHLIB_CC="${CC} -fPIC"
201 fabian 1.1 SHLIB_LD="ld -b"
202     NEED_DL=0
203     AC_DEFINE(MODULES_OK)dnl
204     AC_DEFINE(HPUX_HACKS)dnl
205     if test "x`${UNAME} -r | cut -d . -f 2`" = "x10"
206     then
207     AC_DEFINE(HPUX10_HACKS)dnl
208     fi
209     ;;
210 fabian 1.17 dell)
211     AC_MSG_RESULT(Dell SVR4)
212     SHLIB_STRIP=touch
213     NEED_DL=0
214 fabian 1.28 MOD_LD="${CC} -lelf -lucb"
215 fabian 1.17 ;;
216 fabian 1.28 IRIX-4.*)
217     AC_MSG_RESULT(IRIX4.+!)
218 fabian 1.1 IRIX=yes
219     SHLIB_STRIP=touch
220     NEED_DL=0
221     DEFAULT_MAKE=static
222     ;;
223 fabian 1.24 IRIX-5.*|IRIX-6.*)
224     AC_MSG_RESULT(IRIX 5 OR 6)
225 fabian 1.28 SHLIB_LD="ld -n32 -shared -rdata_shared"
226 fabian 1.1 IRIX=yes
227 fabian 1.28 SHLIB_STRIP=touch
228 fabian 1.1 NEED_DL=0
229     DEFAULT_MAKE=static
230 fabian 1.11 ;;
231 fabian 1.28 IRIX-6.3)
232 fabian 1.24 AC_MSG_RESULT(IRIX6.3)
233 fabian 1.28 IRIX=yes
234     SHLIB_STRIP=touch
235     NEED_DL=0
236     DEFAULT_MAKE=static
237     SHLIB_LD="ld -n32 -D_OLD_TERMIOS"
238     ;;
239 fabian 1.24 IRIX64*)
240     AC_MSG_RESULT(64-BIT IRIX)
241     IRIX=yes
242 fabian 1.28 SHLIB_STRIP=strip
243 fabian 1.24 NEED_DL=0
244     DEFAULT_MAKE=static
245     SHLIB_LD="ld -32 -shared -rdata_shared"
246     ;;
247 fabian 1.11 Ultrix)
248     AC_MSG_RESULT(Ultrix)
249     NEED_DL=0
250     SHLIB_STRIP=touch
251 fabian 1.28 DEFAULT_MAKE=static
252 fabian 1.21 SHELL=/bin/sh5
253 fabian 1.11 ;;
254 fabian 1.23 SINIX*)
255 fabian 1.28 AC_MSG_RESULT(SINIX)
256 fabian 1.23 NEED_DL=0
257     SHLIB_STRIP=touch
258 fabian 1.28 DEFAULT_MAKE=static
259 fabian 1.23 SHLIB_CC="cc -G"
260     ;;
261 fabian 1.11 BeOS)
262     AC_MSG_RESULT(BeOS)
263     NEED_DL=0
264     SHLIB_STRIP=strip
265 fabian 1.28 DEFAULT_MAKE=static
266 fabian 1.1 ;;
267     Linux)
268 fabian 1.28 AC_MSG_RESULT(Linux)
269 fabian 1.1 LINUX=yes
270     CFLAGS="$CFLAGS -Wall"
271     MOD_LD="${CC}"
272 fabian 1.27 SHLIB_CC="${CC} -fPIC"
273 fabian 1.1 SHLIB_LD="${CC} -shared -nostartfiles"
274     AC_DEFINE(MODULES_OK)dnl
275     ;;
276     Lynx)
277     AC_MSG_RESULT(Lynx OS)
278 fabian 1.28 NEED_DL=0
279     DEFAULT_MAKE=static
280     SHLIB_STRIP=strip
281 fabian 1.1 ;;
282     OSF1)
283 fabian 1.28 AC_MSG_RESULT(OSF)
284 fabian 1.1 case `${UNAME} -r | cut -d . -f 1` in
285     V*)
286     AC_MSG_RESULT([ Digital OSF])
287     if test "x$AWK" = "xgawk"
288     then
289     AWK=awk
290     fi
291     MOD_CC=cc
292     MOD_LD=cc
293     SHLIB_CC=cc
294 fabian 1.19 SHLIB_LD="ld -shared -expect_unresolved \"'*'\""
295 fabian 1.1 SHLIB_STRIP=touch
296     AC_DEFINE(MODULES_OK)dnl
297     ;;
298     1.0|1.1|1.2)
299     AC_MSG_RESULT([ pre 1.3])
300     SHLIB_LD="ld -R -export $@:"
301     AC_DEFINE(MODULES_OK)dnl
302     AC_DEFINE(OSF1_HACKS)dnl
303     ;;
304     1.*)
305     AC_MSG_RESULT([ 1.3+])
306     SHLIB_CC="${CC} -fpic"
307     SHLIB_LD="ld -shared"
308     AC_DEFINE(MODULES_OK)dnl
309     AC_DEFINE(OSF1_HACKS)dnl
310     ;;
311     *)
312     AC_MSG_RESULT([ Some other weird OSF! No modules for you...])
313     NEED_DL=0
314     DEFAULT_MAKE=static
315     ;;
316     esac
317     AC_DEFINE(STOP_UAC)dnl
318     ;;
319     SunOS)
320     if test "x`${UNAME} -r | cut -d . -f 1`" = "x5"
321     then
322 fabian 1.28 AC_MSG_RESULT(Solaris)
323     SHLIB_CC="${CC} -KPIC"
324 fabian 1.1 SHLIB_LD="/usr/ccs/bin/ld -G -z text"
325     else
326 fabian 1.28 AC_MSG_RESULT(SunOS)
327 fabian 1.1 SUNOS=yes
328     SHLIB_LD=ld
329 fabian 1.29 SHLIB_CC="${CC} -PIC"
330 fabian 1.1 AC_DEFINE(DLOPEN_1)dnl
331     fi
332     AC_DEFINE(MODULES_OK)dnl
333     ;;
334     *BSD)
335     AC_MSG_RESULT(FreeBSD/NetBSD/OpenBSD - choose your poison)
336 fabian 1.27 SHLIB_CC="${CC} -fPIC"
337 fabian 1.1 SHLIB_LD="ld -Bshareable -x"
338     AC_DEFINE(MODULES_OK)dnl
339     ;;
340     *)
341     if test -r "/mach"
342     then
343 fabian 1.29 AC_MSG_RESULT(Something Mach based)
344 fabian 1.1 NEED_DL=0
345     DEFAULT_MAKE=static
346     AC_DEFINE(BORGCUBES)dnl
347     else
348     if test -r "/cmds"
349     then
350     AC_MSG_RESULT(QNX)
351     SHLIB_STRIP=touch
352     NEED_DL=0
353     DEFAULT_MAKE=static
354     else
355     AC_MSG_RESULT(Something unknown!)
356     AC_MSG_RESULT([If you get dynamic modules to work, be sure to let the devel team know HOW :)])
357     NEED_DL=0
358     DEFAULT_MAKE=static
359     fi
360     fi
361     ;;
362     esac
363     AC_SUBST(MOD_LD)dnl
364     AC_SUBST(MOD_CC)dnl
365     AC_SUBST(MOD_STRIP)dnl
366     AC_SUBST(SHLIB_LD)dnl
367     AC_SUBST(SHLIB_CC)dnl
368     AC_SUBST(SHLIB_STRIP)dnl
369     AC_SUBST(DEFAULT_MAKE)dnl
370 fabian 1.20 AC_SUBST(MOD_EXT)dnl
371     AC_DEFINE_UNQUOTED(EGG_MOD_EXT, "${MOD_EXT}")dnl
372 fabian 1.1 ])dnl
373 fabian 1.13
374    
375     dnl EGG_CHECK_LIBS()
376 fabian 1.4 dnl
377 fabian 1.1 AC_DEFUN(EGG_CHECK_LIBS, [dnl
378     if test "$IRIX" = "yes"
379     then
380     AC_MSG_WARN(Skipping library tests because they CONFUSE Irix.)
381     else
382     AC_CHECK_LIB(socket, socket)
383     AC_CHECK_LIB(nsl, connect)
384     AC_CHECK_LIB(dns, gethostbyname)
385     AC_CHECK_LIB(dl, dlopen)
386 fabian 1.22 AC_CHECK_LIB(m, tan, EGG_MATH_LIB="-lm")
387 fabian 1.1 # This is needed for Tcl libraries compiled with thread support
388 fabian 1.28 AC_CHECK_LIB(pthread, pthread_mutex_init,
389 fabian 1.1 ac_cv_lib_pthread_pthread_mutex_init=yes,
390     ac_cv_lib_pthread_pthread_mutex_init=no)
391     if test "$SUNOS" = "yes"
392     then
393     # For suns without yp or something like that
394     AC_CHECK_LIB(dl, main)
395     else
396     if test "$HPUX" = "yes"
397     then
398     AC_CHECK_LIB(dld, shl_load)
399     fi
400     fi
401     fi
402     ])dnl
403 fabian 1.13
404    
405     dnl EGG_CHECK_FUNC_VSPRINTF()
406 fabian 1.4 dnl
407 fabian 1.1 AC_DEFUN(EGG_CHECK_FUNC_VSPRINTF, [dnl
408     AC_CHECK_FUNCS(vsprintf)
409     if test "x${ac_cv_func_vsprintf}" = "xno"
410     then
411     cat << 'EOF' >&2
412     configure: error:
413    
414     Your system does not have the sprintf/vsprintf libraries.
415     These are required to compile almost anything. Sorry.
416    
417     EOF
418     exit 1
419     fi
420     ])dnl
421 fabian 1.13
422    
423     dnl EGG_HEADER_STDC()
424 fabian 1.4 dnl
425 fabian 1.1 AC_DEFUN(EGG_HEADER_STDC, [dnl
426     if test "x${ac_cv_header_stdc}" = "xno"
427     then
428     cat << 'EOF' >&2
429     configure: error:
430    
431     Your system must support ANSI C Header files.
432     These are required for the language support. Sorry.
433    
434     EOF
435     exit 1
436     fi
437     ])dnl
438 fabian 1.13
439    
440     dnl EGG_CYGWIN()
441 fabian 1.4 dnl
442 fabian 1.28 dnl Check for Cygwin support.
443 fabian 1.1 AC_DEFUN(EGG_CYGWIN, [dnl
444     AC_CYGWIN
445     if test ! "x${CYGWIN}" = "x"
446     then
447     AC_DEFINE(CYGWIN_HACKS)dnl
448     fi
449     ])dnl
450 fabian 1.13
451    
452     dnl EGG_EXEEXT()
453 fabian 1.4 dnl
454 fabian 1.28 dnl Test for executable suffix and define eggdrop's executable name
455     dnl accordingly.
456 fabian 1.1 AC_DEFUN(EGG_EXEEXT, [dnl
457     EGGEXEC=eggdrop
458     AC_EXEEXT
459     if test ! "x${EXEEXT}" = "x"
460     then
461     EGGEXEC=eggdrop${EXEEXT}
462     fi
463     AC_SUBST(EGGEXEC)dnl
464     ])dnl
465 fabian 1.13
466    
467     dnl EGG_TCL_ARG_WITH()
468 fabian 1.4 dnl
469 fabian 1.1 AC_DEFUN(EGG_TCL_ARG_WITH, [dnl
470     # oohh new configure --variables for those with multiple tcl libs
471     AC_ARG_WITH(tcllib, [ --with-tcllib=PATH full path to tcl library], tcllibname=$withval)
472     AC_ARG_WITH(tclinc, [ --with-tclinc=PATH full path to tcl header], tclincname=$withval)
473    
474 fabian 1.3 WARN=0
475 fabian 1.1 # Make sure either both or neither $tcllibname and $tclincname are set
476     if test ! "x${tcllibname}" = "x"
477     then
478     if test "x${tclincname}" = "x"
479     then
480 fabian 1.3 WARN=1
481 fabian 1.1 tcllibname=""
482     TCLLIB=""
483     TCLINC=""
484     fi
485     else
486     if test ! "x${tclincname}" = "x"
487     then
488 fabian 1.3 WARN=1
489     tclincname=""
490     TCLLIB=""
491     TCLINC=""
492     fi
493     fi
494     if test ${WARN} = 1
495     then
496     cat << 'EOF' >&2
497 fabian 1.1 configure: warning:
498    
499     You must specify both --with-tcllib and --with-tclinc for them to work.
500     configure will now attempt to autodetect both the Tcl library and header...
501    
502     EOF
503     fi
504     ])dnl
505 fabian 1.13
506    
507     dnl EGG_TCL_ENV()
508 fabian 1.4 dnl
509 fabian 1.1 AC_DEFUN(EGG_TCL_ENV, [dnl
510 fabian 1.3 WARN=0
511 fabian 1.1 # Make sure either both or neither $TCLLIB and $TCLINC are set
512     if test ! "x${TCLLIB}" = "x"
513     then
514     if test "x${TCLINC}" = "x"
515     then
516 fabian 1.3 WARN=1
517     WVAR1=TCLLIB
518     WVAR2=TCLINC
519 fabian 1.1 TCLLIB=""
520     fi
521     else
522     if test ! "x${TCLINC}" = "x"
523     then
524 fabian 1.3 WARN=1
525     WVAR1=TCLINC
526     WVAR2=TCLLIB
527     TCLINC=""
528     fi
529     fi
530     if test ${WARN} = 1
531     then
532 fabian 1.5 cat << EOF >&2
533 fabian 1.1 configure: warning:
534    
535 fabian 1.3 Environment variable ${WVAR1} was set, but I did not detect ${WVAR2}.
536 fabian 1.1 Please set both TCLLIB and TCLINC correctly if you wish to use them.
537     configure will now attempt to autodetect both the Tcl library and header...
538    
539     EOF
540     fi
541     ])dnl
542 fabian 1.13
543    
544     dnl EGG_TCL_WITH_TCLLIB()
545 fabian 1.4 dnl
546 fabian 1.1 AC_DEFUN(EGG_TCL_WITH_TCLLIB, [dnl
547     # Look for Tcl library: if $tcllibname is set, check there first
548     if test ! "x${tcllibname}" = "x"
549     then
550     if test -f "$tcllibname" && test -r "$tcllibname"
551     then
552 fabian 1.3 TCLLIB=`echo $tcllibname | sed 's%/[[^/]][[^/]]*$%%'`
553 fabian 1.1 TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
554     TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split([$]1, i, "."); print i[[j]]}'`"
555     TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
556     else
557     cat << EOF >&2
558     configure: warning:
559    
560     The file '$tcllibname' given to option --with-tcllib is not valid.
561     configure will now attempt to autodetect both the Tcl library and header...
562    
563     EOF
564     tcllibname=""
565     tclincname=""
566     TCLLIB=""
567     TCLLIBFN=""
568     TCLINC=""
569     TCLINCFN=""
570     fi
571     fi
572     ])dnl
573 fabian 1.13
574    
575     dnl EGG_TCL_WITH_TCLINC()
576 fabian 1.4 dnl
577 fabian 1.1 AC_DEFUN(EGG_TCL_WITH_TCLINC, [dnl
578     # Look for Tcl header: if $tclincname is set, check there first
579     if test ! "x${tclincname}" = "x"
580     then
581     if test -f "$tclincname" && test -r "$tclincname"
582     then
583 fabian 1.3 TCLINC=`echo $tclincname | sed 's%/[[^/]][[^/]]*$%%'`
584 fabian 1.1 TCLINCFN=`$BASENAME $tclincname`
585     else
586     cat << EOF >&2
587     configure: warning:
588    
589     The file '$tclincname' given to option --with-tclinc is not valid.
590     configure will now attempt to autodetect both the Tcl library and header...
591    
592     EOF
593     tcllibname=""
594     tclincname=""
595     TCLLIB=""
596     TCLLIBFN=""
597     TCLINC=""
598     TCLINCFN=""
599     fi
600     fi
601     ])dnl
602 fabian 1.13
603    
604     dnl EGG_TCL_FIND_LIBRARY()
605 fabian 1.4 dnl
606 fabian 1.1 AC_DEFUN(EGG_TCL_FIND_LIBRARY, [dnl
607     # Look for Tcl library: if $TCLLIB is set, check there first
608     if test "x${TCLLIBFN}" = "x"
609     then
610     if test ! "x${TCLLIB}" = "x"
611     then
612     if test -d "${TCLLIB}"
613     then
614     for tcllibfns in $tcllibnames
615     do
616     for tcllibext in $tcllibextensions
617     do
618     if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
619     then
620     TCLLIBFN=$tcllibfns$tcllibext
621     TCLLIBEXT=$tcllibext
622     TCLLIBFNS=$tcllibfns
623     break 2
624     fi
625     done
626     done
627     fi
628     if test "x${TCLLIBFN}" = "x"
629     then
630     cat << 'EOF' >&2
631     configure: warning:
632    
633     Environment variable TCLLIB was set, but incorrect.
634     Please set both TCLLIB and TCLINC correctly if you wish to use them.
635     configure will now attempt to autodetect both the Tcl library and header...
636    
637     EOF
638     TCLLIB=""
639     TCLLIBFN=""
640     TCLINC=""
641     TCLINCFN=""
642     fi
643     fi
644     fi
645     ])dnl
646 fabian 1.13
647    
648     dnl EGG_TCL_FIND_HEADER()
649 fabian 1.4 dnl
650 fabian 1.1 AC_DEFUN(EGG_TCL_FIND_HEADER, [dnl
651     # Look for Tcl header: if $TCLINC is set, check there first
652     if test "x${TCLINCFN}" = "x"
653     then
654     if test ! "x${TCLINC}" = "x"
655     then
656     if test -d "${TCLINC}"
657     then
658     for tclheaderfn in $tclheadernames
659     do
660     if test -r "$TCLINC/$tclheaderfn"
661     then
662     TCLINCFN=$tclheaderfn
663 fabian 1.3 break
664 fabian 1.1 fi
665     done
666     fi
667     if test "x${TCLINCFN}" = "x"
668     then
669     cat << 'EOF' >&2
670     configure: warning:
671    
672     Environment variable TCLINC was set, but incorrect.
673     Please set both TCLLIB and TCLINC correctly if you wish to use them.
674     configure will now attempt to autodetect both the Tcl library and header...
675    
676     EOF
677     TCLLIB=""
678     TCLLIBFN=""
679     TCLINC=""
680     TCLINCFN=""
681     fi
682     fi
683     fi
684     ])dnl
685 fabian 1.13
686    
687     dnl EGG_TCL_CHECK_LIBRARY()
688 fabian 1.4 dnl
689 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_LIBRARY, [dnl
690     AC_MSG_CHECKING(for Tcl library)
691    
692     # Attempt autodetect for $TCLLIBFN if it's not set
693     if test ! "x${TCLLIBFN}" = "x"
694     then
695     AC_MSG_RESULT(using $TCLLIB/lib$TCLLIBFN)
696     else
697     for tcllibfns in $tcllibnames
698     do
699     for tcllibext in $tcllibextensions
700     do
701     for tcllibpath in $tcllibpaths
702     do
703     if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
704     then
705     AC_MSG_RESULT(found $tcllibpath/lib$tcllibfns$tcllibext)
706     TCLLIB=$tcllibpath
707     TCLLIBFN=$tcllibfns$tcllibext
708     TCLLIBEXT=$tcllibext
709     TCLLIBFNS=$tcllibfns
710     break 3
711     fi
712     done
713     done
714     done
715     fi
716    
717     # Show if $TCLLIBFN wasn't found
718     if test "x${TCLLIBFN}" = "x"
719     then
720     AC_MSG_RESULT(not found)
721     fi
722     AC_SUBST(TCLLIB)dnl
723     AC_SUBST(TCLLIBFN)dnl
724     ])dnl
725 fabian 1.13
726    
727     dnl EGG_TCL_CHECK_HEADER()
728 fabian 1.4 dnl
729 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_HEADER, [dnl
730     AC_MSG_CHECKING(for Tcl header)
731    
732     # Attempt autodetect for $TCLINCFN if it's not set
733     if test ! "x${TCLINCFN}" = "x"
734     then
735     AC_MSG_RESULT(using $TCLINC/$TCLINCFN)
736     else
737     for tclheaderpath in $tclheaderpaths
738     do
739     for tclheaderfn in $tclheadernames
740     do
741     if test -r "$tclheaderpath/$tclheaderfn"
742     then
743     AC_MSG_RESULT(found $tclheaderpath/$tclheaderfn)
744     TCLINC=$tclheaderpath
745     TCLINCFN=$tclheaderfn
746     break 2
747     fi
748     done
749     done
750     # FreeBSD hack ...
751     if test "x${TCLINCFN}" = "x"
752     then
753     for tcllibfns in $tcllibnames
754     do
755     for tclheaderpath in $tclheaderpaths
756     do
757     for tclheaderfn in $tclheadernames
758     do
759     if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
760     then
761     AC_MSG_RESULT(found $tclheaderpath/$tcllibfns/$tclheaderfn)
762     TCLINC=$tclheaderpath/$tcllibfns
763     TCLINCFN=$tclheaderfn
764     break 3
765     fi
766     done
767     done
768     done
769     fi
770     fi
771    
772     # Show if $TCLINCFN wasn't found
773     if test "x${TCLINCFN}" = "x"
774     then
775     AC_MSG_RESULT(not found)
776     fi
777     AC_SUBST(TCLINC)dnl
778     AC_SUBST(TCLINCFN)dnl
779     ])dnl
780 fabian 1.13
781    
782 fabian 1.28 dnl EGG_CACHE_UNSET(CACHE-ID)
783     dnl
784     dnl Unsets a certain cache item. Typically called before using
785     dnl the AC_CACHE_*() macros.
786     AC_DEFUN(EGG_CACHE_UNSET, [dnl
787     unset $1
788     ])
789    
790    
791     dnl EGG_TCL_DETECT_CHANGE()
792     dnl
793     dnl Detect whether the tcl system has changed since our last
794     dnl configure run. Set egg_tcl_changed accordingly.
795     dnl
796     dnl Tcl related feature and version checks should re-run their
797     dnl checks as soon as egg_tcl_changed is set to "yes".
798     AC_DEFUN(EGG_TCL_DETECT_CHANGE, [dnl
799     AC_MSG_CHECKING(whether the tcl system has changed)
800     egg_tcl_changed=yes
801     egg_tcl_id="${TCLLIB}:${TCLLIBFN}:${TCLINC}:${TCLINCFN}"
802     if test "${egg_tcl_id}" != ":::"; then
803     egg_tcl_cached=yes
804     AC_CACHE_VAL(egg_cv_var_tcl_id, [dnl
805     egg_cv_var_tcl_id="$egg_tcl_id"
806     egg_tcl_cached=no
807     ])
808     if test "${egg_tcl_cached}" = "yes"; then
809     if test "x${egg_cv_var_tcl_id}" = "x${egg_tcl_id}"; then
810     egg_tcl_changed=no
811     else
812     egg_cv_var_tcl_id="$egg_tcl_id"
813     fi
814     fi
815     fi
816     if test "$egg_tcl_changed" = "yes"; then
817     AC_MSG_RESULT(yes)
818     else
819     AC_MSG_RESULT(no)
820     fi
821     ])
822    
823    
824 fabian 1.13 dnl EGG_TCL_CHECK_VERSION()
825 fabian 1.4 dnl
826 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_VERSION, [dnl
827     # Both TCLLIBFN & TCLINCFN must be set, or we bail
828 fabian 1.12 TCL_FOUND=0
829 fabian 1.28 if test "x${TCLLIBFN}" != "x" && test "x${TCLINCFN}" != "x"
830 fabian 1.1 then
831     TCL_FOUND=1
832    
833     # Check Tcl's version
834 fabian 1.28 if test "$egg_tcl_changed" = "yes"; then
835     EGG_CACHE_UNSET(egg_cv_var_tcl_version)
836     fi
837 fabian 1.1 AC_MSG_CHECKING(for Tcl version)
838 fabian 1.25 AC_CACHE_VAL(egg_cv_var_tcl_version, [
839     egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`
840     ])
841 fabian 1.1
842     if test ! "x${egg_cv_var_tcl_version}" = "x"
843     then
844     AC_MSG_RESULT($egg_cv_var_tcl_version)
845     else
846     AC_MSG_RESULT(not found)
847     TCL_FOUND=0
848     fi
849    
850     # Check Tcl's patch level (if avaliable)
851 fabian 1.28 if test "$egg_tcl_changed" = "yes"; then
852     EGG_CACHE_UNSET(egg_cv_var_tcl_patch_level)
853     fi
854 fabian 1.1 AC_MSG_CHECKING(for Tcl patch level)
855 fabian 1.25 AC_CACHE_VAL(egg_cv_var_tcl_patch_level, [
856 fabian 1.1 eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", [$]3); print [$]3}'`"
857 fabian 1.25 ])
858 fabian 1.1
859     if test ! "x${egg_cv_var_tcl_patch_level}" = "x"
860     then
861     AC_MSG_RESULT($egg_cv_var_tcl_patch_level)
862     else
863     egg_cv_var_tcl_patch_level="unknown"
864     AC_MSG_RESULT(unknown)
865     fi
866     fi
867    
868     # Check if we found Tcl's version
869     if test $TCL_FOUND = 0
870     then
871     cat << 'EOF' >&2
872     configure: error:
873    
874     I can't find Tcl on this system.
875    
876 fabian 1.28 Eggdrop requires Tcl to compile. If you already have Tcl installed
877     on this system, and I just wasn't looking in the right place for it,
878     set the environment variables TCLLIB and TCLINC so I will know where
879     to find 'libtcl.a' (or 'libtcl.so') and 'tcl.h' (respectively). Then
880     run 'configure' again.
881 fabian 1.1
882 fabian 1.28 Read the README file if you don't know what Tcl is or how to get it
883     and install it.
884 fabian 1.1
885     EOF
886     exit 1
887     fi
888     ])dnl
889 fabian 1.13
890    
891     dnl EGG_TCL_CHECK_PRE70()
892 fabian 1.4 dnl
893 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_PRE70, [dnl
894     # Is this version of Tcl too old for us to use ?
895     TCL_VER_PRE70=`echo $egg_cv_var_tcl_version | $AWK '{split([$]1, i, "."); if (i[[1]] < 7) print "yes"; else print "no"}'`
896 fabian 1.12 if test "x$TCL_VER_PRE70" = "xyes"
897 fabian 1.1 then
898     cat << EOF >&2
899     configure: error:
900    
901     Your Tcl version is much too old for eggdrop to use.
902     I suggest you download and complie a more recent version.
903     The most reliable current version is $tclrecommendver and
904     can be downloaded from $tclrecommendsite
905    
906     EOF
907     exit 1
908     fi
909     ])dnl
910 fabian 1.13
911    
912     dnl EGG_TCL_CHECK_PRE75()
913 fabian 1.4 dnl
914 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_PRE75, [dnl
915     # Are we using a pre 7.5 Tcl version ?
916     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"}'`
917     if test "x${TCL_VER_PRE75}" = "xyes"
918     then
919     AC_DEFINE(HAVE_PRE7_5_TCL)dnl
920     fi
921     ])dnl
922 fabian 1.13
923    
924     dnl EGG_TCL_TESTLIBS()
925 fabian 1.4 dnl
926 fabian 1.1 AC_DEFUN(EGG_TCL_TESTLIBS, [dnl
927     # Setup TCL_TESTLIBS for Tcl library tests
928     if test ! "x${TCLLIBEXT}" = "x.a"
929     then
930 fabian 1.22 TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB $LIBS"
931 fabian 1.1 else
932     if test ! "x${tcllibname}" = "x"
933     then
934 fabian 1.22 TCL_TESTLIBS="$TCLLIB/lib$TCLLIBFN $EGG_MATH_LIB $LIBS"
935 fabian 1.1 else
936 fabian 1.22 TCL_TESTLIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB $LIBS"
937 fabian 1.1 fi
938     fi
939     if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
940     then
941     TCL_TESTLIBS="-lpthread $TCL_TESTLIBS"
942     fi
943     ])dnl
944 fabian 1.13
945    
946     dnl EGG_TCL_CHECK_FREE()
947 fabian 1.4 dnl
948 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_FREE, [dnl
949     # Check for Tcl_Free()
950 fabian 1.28 if test "$egg_tcl_changed" = "yes"; then
951     EGG_CACHE_UNSET(egg_cv_var_tcl_free)
952     fi
953     AC_CACHE_CHECK(if Tcl library has Tcl_Free, [egg_cv_var_tcl_free], [
954 fabian 1.1 ac_save_LIBS="$LIBS"
955     LIBS="$TCL_TESTLIBS"
956     cat > conftest.$ac_ext << EOF
957     #include "confdefs.h"
958     char Tcl_Free();
959    
960     int main() {
961     Tcl_Free();
962     return 0;
963     }
964     EOF
965     if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
966     then
967     rm -rf conftest*
968 fabian 1.25 egg_cv_var_tcl_free=yes
969 fabian 1.1 else
970     echo "configure: failed program was:" >&5
971     cat conftest.$ac_ext >&5
972     rm -rf conftest*
973 fabian 1.25 egg_cv_var_tcl_free=no
974 fabian 1.1 fi
975     rm -f conftest*
976     LIBS="$ac_save_LIBS"
977 fabian 1.25 ])
978 fabian 1.1
979     if test "x${egg_cv_var_tcl_free}" = "xyes"
980     then
981     AC_DEFINE(HAVE_TCL_FREE)dnl
982     fi
983     ])dnl
984 fabian 1.13
985    
986 guppy 1.30 dnl EGG_TCL_ENABLE_THREADS()
987     dnl
988     AC_DEFUN(EGG_TCL_ENABLE_THREADS, [dnl
989     AC_ARG_ENABLE(tcl-threads,
990     [ --disable-tcl-threads Disable threaded tcl support if detected. (Ignore this
991     option unless you know what you are doing)],
992     enable_tcl_threads=$enableval,
993     enable_tcl_threads=yes)
994     ])dnl
995    
996    
997 fabian 1.13 dnl EGG_TCL_CHECK_THREADS()
998 fabian 1.4 dnl
999 fabian 1.1 AC_DEFUN(EGG_TCL_CHECK_THREADS, [dnl
1000     # Check for TclpFinalizeThreadData()
1001 fabian 1.28 if test "$egg_tcl_changed" = "yes"; then
1002 guppy 1.30 EGG_CACHE_UNSET(egg_cv_var_tcl_threaded)
1003 fabian 1.28 fi
1004 guppy 1.30 AC_CACHE_CHECK(if Tcl library is threaded, egg_cv_var_tcl_threaded, [
1005 fabian 1.1 ac_save_LIBS="$LIBS"
1006     LIBS="$TCL_TESTLIBS"
1007     cat > conftest.$ac_ext << EOF
1008     #include "confdefs.h"
1009     char TclpFinalizeThreadData();
1010    
1011     int main() {
1012     TclpFinalizeThreadData();
1013     return 0;
1014     }
1015     EOF
1016     if { (eval echo configure: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}
1017     then
1018     rm -rf conftest*
1019 guppy 1.30 egg_cv_var_tcl_threaded=yes
1020 fabian 1.1 else
1021     echo "configure: failed program was:" >&5
1022     cat conftest.$ac_ext >&5
1023     rm -rf conftest*
1024 guppy 1.30 egg_cv_var_tcl_threaded=no
1025 fabian 1.1 fi
1026     rm -f conftest*
1027     LIBS="$ac_save_LIBS"
1028 fabian 1.25 ])
1029 fabian 1.1
1030 guppy 1.30 if test "x${egg_cv_var_tcl_threaded}" = "xyes"
1031 fabian 1.1 then
1032 guppy 1.30 if test "x$enable_tcl_threads" = "xno"
1033     then
1034    
1035     cat << 'EOF' >&2
1036     configure: warning:
1037    
1038     You have disabled threads support on a system with a threaded Tcl library.
1039     Tcl features that rely on scheduled events may not function properly.
1040    
1041     EOF
1042     else
1043     AC_DEFINE(HAVE_TCL_THREADS)dnl
1044     fi
1045 fabian 1.1
1046     # Add -lpthread to $LIBS if we have it
1047     if test "x${ac_cv_lib_pthread_pthread_mutex_init}" = "xyes"
1048     then
1049     LIBS="-lpthread $LIBS"
1050     fi
1051     fi
1052     ])dnl
1053 fabian 1.13
1054    
1055     dnl EGG_TCL_LIB_REQS()
1056 fabian 1.4 dnl
1057 fabian 1.1 AC_DEFUN(EGG_TCL_LIB_REQS, [dnl
1058     if test ! "x${TCLLIBEXT}" = "x.a"
1059     then
1060     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
1061 fabian 1.22 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB"
1062 fabian 1.1 else
1063    
1064     # Set default make as static for unshared Tcl library
1065     if test ! "$DEFAULT_MAKE" = "static"
1066     then
1067     cat << 'EOF' >&2
1068     configure: warning:
1069    
1070     Your Tcl library is not a shared lib.
1071     configure will now set default make type to static...
1072    
1073     EOF
1074     DEFAULT_MAKE=static
1075     AC_SUBST(DEFAULT_MAKE)dnl
1076     fi
1077    
1078     # Are we using a pre 7.4 Tcl version ?
1079     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"}'`
1080     if test "x${TCL_VER_PRE74}" = "xno"
1081     then
1082    
1083     # Was the --with-tcllib option given ?
1084     if test ! "x${tcllibname}" = "x"
1085     then
1086     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
1087 fabian 1.22 TCL_LIBS="$TCLLIB/lib$TCLLIBFN $EGG_MATH_LIB"
1088 fabian 1.1 else
1089     TCL_REQS="$TCLLIB/lib$TCLLIBFN"
1090 fabian 1.22 TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB"
1091 fabian 1.1 fi
1092     else
1093     cat << EOF >&2
1094     configure: warning:
1095    
1096     Your Tcl version ($egg_cv_var_tcl_version) is older then 7.4.
1097     There are known problems, but we will attempt to work around them.
1098    
1099     EOF
1100     TCL_REQS="libtcle.a"
1101 fabian 1.25 TCL_LIBS="-L`pwd` -ltcle $EGG_MATH_LIB"
1102 fabian 1.1 fi
1103     fi
1104     AC_SUBST(TCL_REQS)dnl
1105     AC_SUBST(TCL_LIBS)dnl
1106     ])dnl
1107 fabian 1.13
1108    
1109     dnl EGG_FUNC_DLOPEN()
1110 fabian 1.4 dnl
1111 fabian 1.1 AC_DEFUN(EGG_FUNC_DLOPEN, [dnl
1112     if test $NEED_DL = 1 && test "x${ac_cv_func_dlopen}" = "xno"
1113     then
1114     if test "$LINUX" = "yes"
1115     then
1116     cat << 'EOF' >&2
1117     configure: warning:
1118    
1119     Since you are on a Linux system, this has a known problem...
1120     I know a kludge for it,
1121     EOF
1122    
1123     if test -r "/lib/libdl.so.1"
1124     then
1125     cat << 'EOF' >&2
1126     and you seem to have it, so we'll do that...
1127    
1128     EOF
1129     AC_DEFINE(HAVE_DLOPEN)dnl
1130     LIBS="/lib/libdl.so.1 $LIBS"
1131     else
1132     cat << 'EOF' >&2
1133     which you DON'T seem to have... doh!
1134     perhaps you may still have the stuff lying around somewhere
1135     if you work out where it is, add it to your XLIBS= lines
1136     and #define HAVE_DLOPEN in config.h
1137    
1138     we'll proceed on anyway, but you probably won't be able
1139     to 'make eggdrop' but you might be able to make the
1140     static bot (I'll default your make to this version).
1141    
1142     EOF
1143     DEFAULT_MAKE=static
1144     fi
1145     else
1146     cat << 'EOF' >&2
1147     configure: warning:
1148    
1149     You don't seem to have libdl anywhere I can find it, this will
1150     prevent you from doing dynamic modules, I'll set your default
1151     make to static linking.
1152    
1153     EOF
1154     DEFAULT_MAKE=static
1155     fi
1156     fi
1157     ])dnl
1158 fabian 1.13
1159    
1160     dnl EGG_SUBST_EGGVERSION()
1161 fabian 1.4 dnl
1162 fabian 1.1 AC_DEFUN(EGG_SUBST_EGGVERSION, [dnl
1163 fabian 1.10 EGGVERSION=`grep 'char.egg_version' ${srcdir}/src/main.c | $AWK '{gsub(/(\"|\;)/, "", [$]4); print [$]4}'`
1164 fabian 1.6 egg_version_num=`echo ${EGGVERSION} | $AWK 'BEGIN { FS = "."; } { printf("%d%02d%02d", [$]1, [$]2, [$]3); }'`
1165 fabian 1.1 AC_SUBST(EGGVERSION)dnl
1166 fabian 1.6 AC_DEFINE_UNQUOTED(EGG_VERSION, $egg_version_num)dnl
1167 fabian 1.1 ])dnl
1168 fabian 1.13
1169    
1170     dnl EGG_SUBST_DEST()
1171 fabian 1.4 dnl
1172 fabian 1.1 AC_DEFUN(EGG_SUBST_DEST, [dnl
1173     if test "x$DEST" = "x"
1174     then
1175     DEST=\${prefix}
1176     fi
1177     AC_SUBST(DEST)dnl
1178 fabian 1.13 ])dnl
1179    
1180 guppy 1.31
1181     dnl EGG_SUBST_MOD_UPDIR()
1182     dnl
1183     dnl Since module's Makefiles aren't generated by configure, some
1184     dnl paths in src/mod/Makefile.in take care of them. For correct
1185     dnl path "calculation", we need to keep absolute paths in mind
1186     dnl (which don't need a "../" pre-pended).
1187     AC_DEFUN(EGG_SUBST_MOD_UPDIR, [dnl
1188     case "$srcdir" in
1189     [[\\/]]* | ?:[[\\/]]* ) MOD_UPDIR="" ;;
1190     * ) MOD_UPDIR="../" ;;
1191     esac
1192     AC_SUBST(MOD_UPDIR)dnl
1193     ])dnl
1194    
1195 fabian 1.13
1196     dnl EGG_REPLACE_IF_CHANGED(FILE-NAME, CONTENTS-CMDS, INIT-CMDS)
1197     dnl
1198     dnl Replace FILE-NAME if the newly created contents differs from the existing
1199     dnl file contents. Otherwise leave the file allone. This avoids needless
1200     dnl recompiles.
1201     dnl
1202     define(EGG_REPLACE_IF_CHANGED, [dnl
1203     AC_OUTPUT_COMMANDS([
1204 fabian 1.15 egg_replace_file=$1
1205 fabian 1.13 echo "creating $1"
1206     $2
1207     if test -f ${egg_replace_file} && cmp -s conftest.out ${egg_replace_file}
1208     then
1209     echo "$1 is unchanged"
1210     else
1211     mv conftest.out ${egg_replace_file}
1212     fi
1213     rm -f conftest.out], [$3])dnl
1214     ])dnl
1215    
1216    
1217     dnl EGG_TCL_LUSH()
1218     dnl
1219     AC_DEFUN(EGG_TCL_LUSH, [dnl
1220     EGG_REPLACE_IF_CHANGED(lush.h, [
1221     cat > conftest.out <<EGGEOF
1222     /* Ignore me but do not erase me. I am a kludge. */
1223    
1224     #include "${egg_tclinc}/${egg_tclincfn}"
1225     EGGEOF], [egg_tclinc=${TCLINC}; egg_tclincfn=${TCLINCFN}])dnl
1226     ])dnl
1227    
1228    
1229     dnl EGG_CATCH_MAKEFILE_REBUILD()
1230     dnl
1231     AC_DEFUN(EGG_CATCH_MAKEFILE_REBUILD, [dnl
1232     AC_OUTPUT_COMMANDS([
1233 fabian 1.15 if test -f .modules; then
1234 fabian 1.13 ${ac_given_srcdir}/misc/modconfig --top_srcdir=${ac_given_srcdir} Makefile
1235     fi])
1236 fabian 1.15 ])dnl
1237    
1238     dnl EGG_SAVE_PARAMETERS()
1239     dnl
1240     AC_DEFUN(EGG_SAVE_PARAMETERS, [dnl
1241     dnl Normally, we shouldn't use this level as it's not intended for this
1242     dnl type of code, but there's no other way to run it before the main
1243     dnl parameter loop in configure.
1244     AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
1245     egg_ac_parameters="[$]*"
1246     AC_DIVERT_POP()dnl to NORMAL
1247     AC_SUBST(egg_ac_parameters)dnl
1248 fabian 1.1 ])dnl

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23