/[cvs]/eggdrop1.9/acconfig/acinclude.m4
ViewVC logotype

Contents of /eggdrop1.9/acconfig/acinclude.m4

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


Revision 1.39 - (show annotations) (download)
Mon Jun 21 10:34:07 2004 UTC (14 years, 11 months ago) by wingman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.38: +5 -2 lines
* I guess automake 1.6 compiles fine now. I've tested it on my local box,
  but i'm not really sure since i have 1.6 and 1.8 installed, so someone
  with a "clean" 1.6 install should try to boostrap it

1 dnl acinclude.m4: macros autoconf uses when building configure from
2 dnl configure.ac
3 dnl
4 dnl Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eggheads Development Team
5 dnl
6 dnl This program is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU General Public License
8 dnl as published by the Free Software Foundation; either version 2
9 dnl of the License, or (at your option) any later version.
10 dnl
11 dnl This program is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 dnl GNU General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU General Public License
17 dnl along with this program; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 dnl
20 dnl $Id: acinclude.m4,v 1.38 2004/06/16 06:33:44 wcc Exp $
21 dnl
22
23
24 dnl EGG_MSG_CONFIGURE_START()
25 dnl
26 AC_DEFUN([EGG_MSG_CONFIGURE_START],
27 [
28 AC_MSG_RESULT()
29 AC_MSG_RESULT([This is Eggdrop's GNU configure script.])
30 AC_MSG_RESULT([It's going to run a bunch of strange tests to hopefully])
31 AC_MSG_RESULT([make your compile work without much twiddling.])
32 AC_MSG_RESULT()
33 ])
34
35
36 dnl EGG_MSG_CONFIGURE_END()
37 dnl
38 AC_DEFUN([EGG_MSG_CONFIGURE_END],
39 [
40 AC_MSG_RESULT([
41 ------------------------------------------------------------------------
42 Configuration:
43
44 Source code location : $srcdir
45 Compiler : $CC
46 Compiler flags : $CFLAGS
47 Host System Type : $host
48 Install path : $prefix
49 Enabled Modules : $EGG_MODULES_ENABLED
50 Disabled Modules : $EGG_MODULES_DISABLED
51
52 See config.h for further configuration information.
53 ------------------------------------------------------------------------
54
55 Configure is done.
56
57 Type 'make' to create the bot.
58 ])
59 ])
60
61
62 dnl EGG_CHECK_CC()
63 dnl
64 AC_DEFUN([EGG_CHECK_CC],
65 [
66 if test "${cross_compiling-x}" = "x"; then
67 cat << 'EOF' >&2
68 configure: error:
69
70 This system does not appear to have a working C compiler.
71 A working C compiler is required to compile Eggdrop.
72
73 EOF
74 exit 1
75 fi
76 ])
77
78
79 dnl EGG_CHECK_CCPIPE()
80 dnl
81 dnl This function checks whether or not the compiler supports the `-pipe' flag,
82 dnl which speeds up the compilation.
83 dnl
84 AC_DEFUN([EGG_CHECK_CCPIPE],
85 [
86 if test -z "$no_pipe"; then
87 if test -n "$GCC"; then
88 AC_CACHE_CHECK([whether the compiler understands -pipe], egg_cv_var_ccpipe, [
89 ac_old_CC="$CC"
90 CC="$CC -pipe"
91 AC_COMPILE_IFELSE([[
92 int main ()
93 {
94 return(0);
95 }
96 ]], [
97 egg_cv_var_ccpipe="yes"
98 ], [
99 egg_cv_var_ccpipe="no"
100 ])
101 CC="$ac_old_CC"
102 ])
103
104 if test "$egg_cv_var_ccpipe" = "yes"; then
105 CC="$CC -pipe"
106 fi
107 fi
108 fi
109 ])
110
111
112 dnl EGG_CHECK_CFLAGS_WALL()
113 dnl
114 dnl Checks whether the compiler supports the `-WAll' flag.
115 dnl
116 AC_DEFUN([EGG_CHECK_CFLAGS_WALL],
117 [
118 if test -z "$no_wall"; then
119 if test -n "$GCC"; then
120 AC_CACHE_CHECK([whether the compiler understands -Wall], egg_cv_var_ccwall, [
121 ac_old_CFLAGS="$CFLAGS"
122 CFLAGS="$CFLAGS -Wall"
123 AC_COMPILE_IFELSE([[
124 int main ()
125 {
126 return(0);
127 }
128 ]], [
129 egg_cv_var_ccwall="yes"
130 ], [
131 egg_cv_var_ccwall="no"
132 ])
133 CFLAGS="$ac_old_CFLAGS"
134 ])
135
136 if test "$egg_cv_var_ccwall" = "yes"; then
137 CFLAGS="$CFLAGS -Wall"
138 fi
139 fi
140 fi
141 ])
142
143
144 dnl EGG_PROG_AWK()
145 dnl
146 AC_DEFUN([EGG_PROG_AWK],
147 [
148 AC_PROG_AWK
149 if test "${AWK-x}" = "x"; then
150 cat << 'EOF' >&2
151 configure: error:
152
153 This system seems to lack a working 'awk' command.
154 A working 'awk' command is required to compile Eggdrop.
155
156 EOF
157 exit 1
158 fi
159 ])
160
161
162 dnl EGG_PROG_BASENAME()
163 dnl
164 AC_DEFUN([EGG_PROG_BASENAME],
165 [
166 AC_CHECK_PROG(BASENAME, basename, basename)
167 if test "${BASENAME-x}" = "x"; then
168 cat << 'EOF' >&2
169 configure: error:
170
171 This system seems to lack a working 'basename' command.
172 A working 'basename' command is required to compile Eggdrop.
173
174 EOF
175 exit 1
176 fi
177 ])
178
179
180 dnl EGG_CHECK_OS()
181 dnl
182 dnl FIXME/NOTICE:
183 dnl This function is obsolete. Any NEW code/checks should be written as
184 dnl individual tests that will be checked on ALL operating systems.
185 dnl
186 AC_DEFUN([EGG_CHECK_OS],
187 [
188 AC_REQUIRE([AC_CANONICAL_HOST])
189
190 IRIX="no"
191 EGG_CYGWIN="no"
192
193 AC_CACHE_CHECK([system type],
194 egg_cv_var_system_type,
195 [egg_cv_var_system_type=`$EGG_UNAME -s`])
196 AC_CACHE_CHECK([system release],
197 egg_cv_var_system_release,
198 [egg_cv_var_system_release=`$EGG_UNAME -r`])
199
200 case $host_os in
201 cygwin)
202 EGG_CYGWIN="yes"
203 AC_DEFINE(CYGWIN_HACKS, 1, [Define if running under Cygwin.])
204 case "`echo $egg_cv_var_system_release | cut -c 1-3`" in
205 1.*)
206 AC_PROG_CC_WIN32
207 CC="$CC $WIN32FLAGS"
208 AC_MSG_CHECKING([for /usr/lib/libbinmode.a])
209 if test -r /usr/lib/libbinmode.a; then
210 AC_MSG_RESULT([yes])
211 LIBS="$LIBS /usr/lib/libbinmode.a"
212 else
213 AC_MSG_RESULT([no])
214 AC_MSG_WARN([Make sure the directory Eggdrop is installed into is mounted in binary mode.])
215 fi
216 ;;
217 *)
218 AC_MSG_WARN([Make sure the directory Eggdrop is installed into is mounted in binary mode.])
219 ;;
220 esac
221 ;;
222 hpux*)
223 AC_DEFINE(HPUX_HACKS, 1, [Define if running on HPUX that supports dynamic linking.])
224 case $host_os in
225 hpux10) AC_DEFINE(HPUX10_HACKS, 1, [Define if running on HPUX 10.x.]) ;;
226 esac
227 ;;
228 irix*)
229 IRIX="yes"
230 ;;
231 osf*)
232 AC_DEFINE(STOP_UAC, 1, [Define if running on OSF/1 platform.])
233 ;;
234 next*)
235 AC_DEFINE(BORGCUBES, 1, [Define if running on NeXT Step.])
236 ;;
237 esac
238 ])
239
240
241 dnl EGG_CHECK_LIBS()
242 dnl
243 AC_DEFUN([EGG_CHECK_LIBS],
244 [
245 # XXX: this needs to be fixed so that it works on IRIX
246 if test "$IRIX" = "yes"; then
247 AC_MSG_WARN([Skipping library tests because they CONFUSE IRIX.])
248 else
249 AC_CHECK_LIB(socket, socket)
250 AC_CHECK_LIB(nsl, connect)
251 AC_CHECK_LIB(dns, gethostbyname)
252 AC_CHECK_LIB(m, tan, EGG_MATH_LIB="-lm")
253
254 # This is needed for Tcl libraries compiled with thread support
255 AC_CHECK_LIB(pthread, pthread_mutex_init, [
256 ac_cv_lib_pthread_pthread_mutex_init="yes"
257 ac_cv_lib_pthread="-lpthread"
258 ], [
259 AC_CHECK_LIB(pthread, __pthread_mutex_init, [
260 ac_cv_lib_pthread_pthread_mutex_init="yes"
261 ac_cv_lib_pthread="-lpthread"
262 ], [
263 AC_CHECK_LIB(pthreads, pthread_mutex_init, [
264 ac_cv_lib_pthread_pthread_mutex_init="yes"
265 ac_cv_lib_pthread="-lpthreads"
266 ], [
267 AC_CHECK_FUNC(pthread_mutex_init, [
268 ac_cv_lib_pthread_pthread_mutex_init="yes"
269 ac_cv_lib_pthread=""
270 ], [
271 ac_cv_lib_pthread_pthread_mutex_init="no"
272 ]
273 )]
274 )]
275 )])
276 fi
277 ])
278
279
280 dnl EGG_C_LONG_LONG()
281 dnl
282 dnl Check for working 'long long' type.
283 dnl
284 AC_DEFUN([EGG_C_LONG_LONG],
285 [
286 AC_CACHE_CHECK([for long long], egg_cv_have_long_long, [
287 AC_RUN_IFELSE([[
288 #include <stdio.h>
289
290 int main()
291 {
292 long long x = 1000000;
293
294 x *= x;
295 exit(((x / 1000000) == 1000000) ? 0: 1);
296 }
297 ]], [
298 egg_cv_have_long_long="yes"
299 ], [
300 egg_cv_have_long_long="no"
301 ], [
302 egg_cv_have_long_long="cross"
303 ])
304 ])
305
306 if test "$egg_cv_have_long_long" = "yes"; then
307 AC_DEFINE(HAVE_LONG_LONG, 1, [Define if system supports long long.])
308 fi
309 ])
310
311
312 dnl EGG_FUNC_C99_VSNPRINTF
313 dnl
314 AC_DEFUN([EGG_FUNC_C99_VSNPRINTF],
315 [
316 AC_CACHE_CHECK([for C99 vsnprintf], egg_cv_have_c99_vsnprintf, [
317 AC_RUN_IFELSE([[
318 #include <sys/types.h>
319 #include <stdarg.h>
320
321 void foo(const char *format, ...)
322 {
323 va_list ap;
324 int len;
325 char buf[5];
326
327 va_start(ap, format);
328 len = vsnprintf(0, 0, format, ap);
329 va_end(ap);
330
331 if (len != 5) exit(1);
332 if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
333 exit(0);
334 }
335 int main()
336 {
337 foo("hello");
338 }
339 ]], [
340 egg_cv_have_c99_vsnprintf="yes"
341 ], [
342 egg_cv_have_c99_vsnprintf="no"
343 ], [
344 egg_cv_have_c99_vsnprintf="cross"
345 ])
346 ])
347
348 if test "$egg_cv_have_c99_vsnprintf" = "yes"; then
349 AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [Define if vsnprintf is C99 compliant.])
350 else
351 egg_replace_snprintf="yes"
352 fi
353 ])
354
355
356 dnl EGG_FUNC_GETOPT_LONG
357 dnl
358 AC_DEFUN([EGG_FUNC_GETOPT_LONG],
359 [
360 AC_CHECK_FUNC(getopt_long, [], [
361 AC_LIBOBJ(getopt)
362 AC_LIBOBJ(getopt1)
363 ])
364 ])
365
366
367 dnl EGG_REPLACE_SNPRINTF
368 dnl
369 AC_DEFUN([EGG_REPLACE_SNPRINTF],
370 [
371 if test "$egg_replace_snprintf" = "yes"; then
372 AC_LIBOBJ(snprintf)
373 SNPRINTF_LIBS="-lm"
374 fi
375 AC_SUBST(SNPRINTF_LIBS)
376 ])
377
378
379 dnl EGG_TYPE_32BIT()
380 dnl
381 AC_DEFUN([EGG_TYPE_32BIT],
382 [
383 AC_CHECK_SIZEOF(unsigned int, 4)
384 if test "$ac_cv_sizeof_unsigned_int" = 4; then
385 AC_DEFINE(UNSIGNED_INT32, 1, [Define this if an unsigned int is 32 bits.])
386 else
387 AC_CHECK_SIZEOF(unsigned long, 4)
388 if test "$ac_cv_sizeof_unsigned_long" = 4; then
389 AC_DEFINE(UNSIGNED_LONG32, 1, [Define this if an unsigned long is 32 bits.])
390 fi
391 fi
392 ])
393
394
395 dnl EGG_VAR_SYS_ERRLIST()
396 dnl
397 AC_DEFUN([EGG_VAR_SYS_ERRLIST],
398 [
399 AC_CACHE_CHECK([for sys_errlist], egg_cv_var_sys_errlist, [
400 AC_LINK_IFELSE([
401 AC_LANG_SOURCE([[int *p;]], [[extern int sys_errlist; p = &sys_errlist;]])
402 ], [
403 egg_cv_var_sys_errlist="yes"
404 ], [
405 egg_cv_var_sys_errlist="no"
406 ])
407 ])
408
409 if test "$egg_cv_var_sys_errlist" = "yes"; then
410 AC_DEFINE([HAVE_SYS_ERRLIST], 1, [Define if your system libraries have a sys_errlist variable.])
411 fi
412 ])
413
414
415 dnl EGG_CACHE_UNSET(CACHE-ID)
416 dnl
417 dnl Unsets a certain cache item. Typically called before using the
418 dnl AC_CACHE_*() macros.
419 dnl
420 AC_DEFUN([EGG_CACHE_UNSET], [unset $1])
421
422
423 dnl EGG_REPLACE_IF_CHANGED(FILE-NAME, CONTENTS-CMDS, INIT-CMDS)
424 dnl
425 dnl Replace FILE-NAME if the newly created contents differs from the existing
426 dnl file contents. Otherwise, leave the file allone. This avoids needless
427 dnl recompiles.
428 dnl
429 m4_define(EGG_REPLACE_IF_CHANGED,
430 [
431 AC_CONFIG_COMMANDS([replace-if-changed], [[
432 egg_replace_file="$1"
433 $2
434 if test -f "$egg_replace_file" && cmp -s conftest.out $egg_replace_file; then
435 echo "$1 is unchanged"
436 else
437 echo "creating $1"
438 mv conftest.out $egg_replace_file
439 fi
440 rm -f conftest.out
441 ]],
442 [[$3]])
443 ])
444
445
446 dnl AC_PROG_CC_WIN32()
447 dnl
448 AC_DEFUN([AC_PROG_CC_WIN32],
449 [
450 AC_MSG_CHECKING([how to access the Win32 API])
451 WIN32FLAGS=
452 AC_COMPILE_IFELSE([[
453 #ifndef WIN32
454 # ifndef _WIN32
455 # error WIN32 or _WIN32 not defined
456 # endif
457 #endif
458 ]], [
459 AC_MSG_RESULT([present by default])
460 ], [
461 ac_compile_save="$ac_compile"
462 save_CC="$CC"
463 ac_compile="$ac_compile -mwin32"
464 CC="$CC -mwin32"
465 AC_COMPILE_IFELSE([[
466 #ifndef WIN32
467 # ifndef _WIN32
468 # error WIN32 or _WIN32 not defined
469 # endif
470 #endif
471 ]], [
472 AC_MSG_RESULT([found via -mwin32])
473 ac_compile="$ac_compile_save"
474 CC="$save_CC"
475 WIN32FLAGS="-mwin32"
476 ], [
477 ac_compile="$ac_compile_save"
478 CC="$save_CC"
479 AC_MSG_RESULT([not found])
480 ])
481 ])
482 ])
483
484
485 dnl EGG_IPV6_OPTIONS()
486 dnl
487 AC_DEFUN([EGG_IPV6_OPTIONS],
488 [
489 AC_MSG_CHECKING([whether you enabled IPv6 support])
490 dnl dummy option for help string, next option is the real one
491 AC_ARG_ENABLE([ipv6], AC_HELP_STRING([--enable-ipv6], [enable IPV6 support]), [], [])
492 AC_ARG_ENABLE([ipv6], AC_HELP_STRING([--disable-ipv6], [disable IPV6 support]), [
493 ac_cv_ipv6="$enableval"
494 AC_MSG_RESULT([$ac_cv_ipv6])
495 ], [
496 if test "$egg_cv_ipv6_supported" = "yes"; then
497 ac_cv_ipv6="yes"
498 else
499 ac_cv_ipv6="no"
500 fi
501 AC_MSG_RESULT([(default) $ac_cv_ipv6])
502 ])
503
504 if test "$ac_cv_ipv6" = "yes"; then
505 AC_DEFINE(IPV6, 1, [Define if you want to enable IPv6 support.])
506 fi
507 ])
508
509
510 dnl EGG_TYPE_SOCKLEN_T
511 dnl
512 AC_DEFUN([EGG_TYPE_SOCKLEN_T],
513 [
514 AC_CACHE_CHECK([for socklen_t], egg_cv_var_socklen_t, [
515 AC_RUN_IFELSE([[
516 #include <unistd.h>
517 #include <sys/param.h>
518 #include <sys/types.h>
519 #include <sys/socket.h>
520 #include <netinet/in.h>
521 #include <arpa/inet.h>
522
523 int main()
524 {
525 socklen_t test = 55;
526
527 if (test != 55)
528 exit(1);
529
530 return(0);
531 }
532 ]], [
533 AC_MSG_RESULT([yes])
534 egg_cv_socklen_t="yes"
535 ], [
536 AC_MSG_RESULT([no])
537 egg_cv_socklen_t="no"
538 ], [
539 AC_MSG_RESULT([no])
540 egg_cv_socklen_t="cross"
541 ])
542 ])
543
544 if test "$egg_cv_var_socklen_t" = "no"; then
545 AC_DEFINE(socklen_t, int, [Define socklen_t to 'int' if it doesn't exist.])
546 fi
547 ])
548
549
550 dnl EGG_INADDR_LOOPBACK
551 dnl
552 AC_DEFUN([EGG_INADDR_LOOPBACK],
553 [
554 AC_MSG_CHECKING([for INADDR_LOOPBACK])
555 AC_CACHE_VAL(adns_cv_decl_inaddrloopback, [
556 AC_COMPILE_IFELSE([[
557 #include <sys/socket.h>
558 #include <netinet/in.h>
559 #include <arpa/inet.h>
560
561 int main()
562 {
563 unsigned long test = INADDR_LOOPBACK;
564
565 return(0);
566 }
567 ]], [
568 adns_cv_decl_inaddrloopback="yes"
569 ], [
570 adns_cv_decl_inaddrloopback="no"
571 ])
572 ])
573
574 if test "$adns_cv_decl_inaddrloopback" = "yes"; then
575 AC_MSG_RESULT([yes])
576 else
577 AC_CHECK_HEADER(rpc/types.h, [
578 AC_MSG_RESULT([rpc/types.h])
579 AC_DEFINE(HAVEUSE_RPCTYPES_H, 1, [Define if we want to include rpc/types.h. Crap BSDs put INADDR_LOOPBACK there.])
580 ], [
581 AC_MSG_ERROR([no])
582 ])
583 fi
584 ])
585
586
587 dnl EGG_IPV6_SUPPORTED
588 dnl
589 AC_DEFUN([EGG_IPV6_SUPPORTED],
590 [
591 AC_MSG_CHECKING([for kernel IPv6 support])
592 AC_CACHE_VAL(egg_cv_ipv6_supported, [
593 AC_RUN_IFELSE([[
594 #include <fcntl.h>
595 #include <sys/socket.h>
596 #include <sys/types.h>
597 #include <netinet/in.h>
598 #include <unistd.h>
599 #include <errno.h>
600 #include <stdio.h>
601
602 int main()
603 {
604 struct sockaddr_in6 sin6;
605 int s = socket(AF_INET6, SOCK_STREAM, 0);
606
607 if (s != -1)
608 close(s);
609
610 return((s == -1));
611 }
612 ]], [
613 egg_cv_ipv6_supported="yes"
614 ], [
615 egg_cv_ipv6_supported="no"
616 ], [
617 egg_cv_ipv6_supported="cross"
618 ])
619 ])
620
621 if test "$egg_cv_ipv6_supported" = "yes"; then
622 AC_MSG_RESULT([yes])
623 else
624 AC_MSG_RESULT([no])
625 fi
626 ])
627
628
629 dnl EGG_DEFINE_VERSION_NUM
630 dnl
631 AC_DEFUN([EGG_DEFINE_VERSION_NUM],
632 [
633 egg_version_num=`echo $VERSION | $AWK 'BEGIN {FS = "."} {printf("%d%02d%02d00", [$]1, [$]2, [$]3)}'`
634 AC_DEFINE_UNQUOTED(VERSION_NUM, [$egg_version_num], [Define version number.])
635 ])
636
637
638 dnl EGG_GNU_GETTEXT
639 dnl
640 AC_DEFUN([EGG_GNU_GETTEXT],
641 [
642 AC_MSG_CHECKING([for avaible translations])
643 ALL_LINGUAS=""
644 cd po
645 for LOC in `ls *.po 2> /dev/null`; do
646 ALL_LINGUAS="$ALL_LINGUAS `echo $LOC | $AWK 'BEGIN {FS = "."} {printf("%s", [$]1)}'`"
647 done
648 cd ..
649 AC_MSG_RESULT([$ALL_LINGUAS])
650 AM_GNU_GETTEXT([], need-ngettext)
651 ])
652
653
654 dnl EGG_LIBTOOL
655 dnl
656 AC_DEFUN([EGG_LIBTOOL],
657 [
658 AC_LIBTOOL_WIN32_DLL
659 AC_LIBLTDL_CONVENIENCE(libltdl)
660 AC_LIBTOOL_DLOPEN
661 AC_PROG_LIBTOOL
662 AC_SUBST(INCLTDL)
663 AC_SUBST(LIBLTDL)
664 AC_SUBST(LIBTOOL_DEPS)
665
666 if test "$enable_shared" = "no"; then
667 egg_static_build="yes"
668 else
669 egg_static_build="no"
670 fi
671
672 # HACK: This is needed for libltdl's configure script
673 egg_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
674 ac_configure_args="$ac_configure_args --with-auxdir=$egg_aux_dir"
675 ])
676
677
678 dnl EGG_WITH_EFENCE
679 dnl
680 AC_DEFUN([EGG_WITH_EFENCE],
681 [
682 AC_REQUIRE([AM_WITH_MPATROL])
683 AC_ARG_WITH([efence], AC_HELP_STRING([--with-efence], [build with the efence library]), [egg_with_efence="$withval"], [egg_with_efence="no"])
684 if test "$egg_with_efence" = "yes"; then
685 if test "$am_with_mpatrol" = 0; then
686 AC_CHECK_LIB(efence, malloc, [egg_efence_libs="-lefence"], AC_MSG_ERROR([efence library not installed correctly]))
687 LIBS="$egg_efence_libs $LIBS"
688 else
689 AC_MSG_ERROR([enabling efence and mpatrol at the same time is evil!])
690 fi
691 fi
692 ])
693
694
695 dnl EGG_DEBUG_OPTIONS
696 dnl
697 AC_DEFUN([EGG_DEBUG_OPTIONS],
698 [
699 AC_ARG_ENABLE(debug, AC_HELP_STRING([--disable-debug], [disable debug support]), [debug="$enableval"], [debug="yes"])
700 if test "$debug" = "yes"; then
701 EGG_DEBUG="-DDEBUG"
702 CFLAGS="$CFLAGS -g3"
703 fi
704
705 AC_SUBST(EGG_DEBUG)
706 AM_WITH_MPATROL(no)
707 EGG_WITH_EFENCE
708 ])
709
710
711 dnl EGG_CHECK_MODULES()
712 dnl
713 AC_DEFUN([EGG_CHECK_MODULES],
714 [
715 esyscmd(./acconfig/config.stubs ./modules/)
716 ])
717
718
719 dnl EGG_MODULE_START(NAME, HELP, ENABLED)
720 dnl
721 dnl The 'missing fi' at the end of this function is intentional. This function
722 dnl MUST be called in conjunction with EGG_MODULE_END()!
723 dnl
724 AC_DEFUN([EGG_MODULE_START],
725 [
726 EGG_MOD_NAME=$1
727 EGG_MOD_DIR=modules/$1/
728
729 AC_ARG_ENABLE([$1], AC_HELP_STRING([--disable-$1], [disable $2]), [EGG_MOD_ENABLED="$enableval"], [EGG_MOD_ENABLED="$3"])
730 AC_CONFIG_FILES([modules/$1/Makefile])
731
732 if test "$EGG_MOD_ENABLED" = "yes"; then
733 AC_MSG_NOTICE([Configuring module $EGG_MOD_NAME...])
734 ])
735
736
737 dnl EGG_MODULE_END()
738 dnl
739 AC_DEFUN([EGG_MODULE_END],
740 [
741 fi
742
743 if test "$EGG_MOD_ENABLED" = "yes"; then
744 EGG_MODULES_ENABLED="$EGG_MOD_NAME $EGG_MODULES_ENABLED"
745 else
746 EGG_MODULES_DISABLED="$EGG_MOD_NAME $EGG_MODULES_DISABLED"
747 fi
748 ])

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23