ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/ermyth/configure.ac
(Generate patch)

Comparing ermyth/configure.ac (file contents):
Revision 1.7 by pippijn, Wed Jul 25 01:05:17 2007 UTC vs.
Revision 1.8 by pippijn, Tue Aug 28 17:08:06 2007 UTC

1dnl Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team 1dnl Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
2dnl Copyright © 2005 Atheme Development Group 2dnl Copyright © 2005 Atheme Development Group
3dnl Rights to this code are documented in doc/pod/license.pod. 3dnl Rights to this code are documented in doc/pod/license.pod.
4dnl 4dnl
5dnl $Id: configure.ac,v 1.7 2007/07/25 01:05:17 pippijn Exp $ 5dnl $Id: configure.ac,v 1.8 2007/08/28 17:08:06 pippijn Exp $
6 6
7dnl Process this file with autoconf to produce a configure script. 7dnl Process this file with autoconf to produce a configure script.
8 8
9AC_PREREQ(2.59) 9AC_PREREQ(2.59)
10AC_INIT([ermyth], [2.3], [ermyth@one09.net]) 10AC_INIT([ermyth], [2.3], [ermyth@one09.net])
11AC_CONFIG_HEADER(include/sysconf.h) 11AC_CONFIG_HEADER(include/sysconf.h)
12AC_CONFIG_AUX_DIR(autoconf) 12AC_CONFIG_AUX_DIR(autoconf)
13 13
14AC_COPYRIGHT([$Id: configure.ac,v 1.7 2007/07/25 01:05:17 pippijn Exp $]) 14AC_COPYRIGHT([$Id: configure.ac,v 1.8 2007/08/28 17:08:06 pippijn Exp $])
15 15
16AC_PREFIX_DEFAULT(~/PACKAGE) 16AC_PREFIX_DEFAULT(~/PACKAGE)
17 17
18dnl Automake compatibility. 18dnl Automake compatibility.
19AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME]) 19AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
34AC_PATH_PROG(AR, ar) 34AC_PATH_PROG(AR, ar)
35AC_PATH_PROG(RANLIB, ranlib) 35AC_PATH_PROG(RANLIB, ranlib)
36 36
37AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 37AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
38 38
39#--------------------------------------------------
40# AC_MSG_CHECKING(glib >= 2.10) 39AC_MSG_CHECKING(glib >= 2.10)
41# if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then 40if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then
42# CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" 41 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`"
43# LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" 42 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`"
44# AC_MSG_RESULT(ok) 43 AC_MSG_RESULT(ok)
45# else 44else
46# AC_MSG_ERROR(no) 45 AC_MSG_ERROR(no)
47# fi 46fi
48#--------------------------------------------------
49 47
50AC_PATH_PROG(PERL, perl5.8) 48AC_PATH_PROG(PERL, perl5.8)
51if test -z "$PERL"; then 49if test -z "$PERL"; then
52 AC_PATH_PROG(PERL, perl5) 50 AC_PATH_PROG(PERL, perl5)
53 if test -z "$PERL"; then 51 if test -z "$PERL"; then
60 58
61dnl 59dnl
62dnl Source generation 60dnl Source generation
63dnl 61dnl
64 62
65CALLBACKS=`$PERL $srcdir/include/common/gencallbacks.pl 7` 63dnl CALLBACKS=`$PERL $srcdir/include/common/gencallbacks.pl 7`
66AC_SUBST(CALLBACKS) 64dnl AC_SUBST(CALLBACKS)
67 65
68dnl 66dnl
69dnl GNU gettext 67dnl GNU gettext
70dnl 68dnl
71 69
203AC_CHECK_LIB(crypt, crypt, [ 201AC_CHECK_LIB(crypt, crypt, [
204 POSIX_CRYPTC="posix.C" 202 POSIX_CRYPTC="posix.C"
205 LIBS="$LIBS -lcrypt" 203 LIBS="$LIBS -lcrypt"
206]) 204])
207 205
206AC_MSG_CHECKING(for libresolv)
207AC_TRY_LINK([
208#include <netinet/in.h>
209#include <arpa/nameser.h>
210#include <resolv.h>
211],[
212 res_init ();
213],[resolv_link=yes],[resolv_link=no])
214if test x$resolv_link = xyes; then
215 AC_MSG_RESULT(ok)
216 AC_DEFINE(HAVE_LIBRESOLV, 1, Define if you have libresolv)
217 LIBS="$LIBS -lresolv"
218else
219 AC_MSG_RESULT([no, unable to link])
220fi
221
208AC_MSG_CHECKING(for $PERL suitability) 222AC_MSG_CHECKING(for $PERL suitability)
209if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then 223if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then
210 save_CXXFLAGS="$CXXFLAGS" 224 save_CXXFLAGS="$CXXFLAGS"
211 save_LIBS="$LIBS" 225 save_LIBS="$LIBS"
212 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" 226 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
448AC_CHECK_HEADER([openssl/ssl.h],, 462AC_CHECK_HEADER([openssl/ssl.h],,
449[ 463[
450 OPENSSL_FOUND=no 464 OPENSSL_FOUND=no
451],[]) 465],[])
452 466
453if test x$OPENSSL_FOUND != xno; then
454 LIBS="$LIBS -lssl -lcrypto"
455fi
456
457AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno) 467AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno)
458 468
459echo 469echo
460echo "Module support" 470echo "Module support"
461echo 471echo
462 472
463dynamic_loading="yes" 473dynamic_loading="yes"
464
465if test "$dynamic_loading" = yes; then
466 AC_CHECK_HEADERS(dlfcn.h)
467 AC_SEARCH_LIBS(dlopen, [dl c_r],
468 [
469 AC_DEFINE(HAVE_DLOPEN, 1, [Define if the dlopen function is available.])
470 AC_CHECK_FUNC(dlsym, ,
471 [
472 AC_ERROR([dynamic loading unavailable, $PACKAGE will not work on your system])
473 ])
474 AC_CHECK_FUNCS(dlfunc)
475 AC_CHECK_FUNCS(dlinfo)
476 ],
477 [
478 AC_ERROR([dynamic loading unavailable, $PACKAGE will not work on your system])
479 ])
480fi
481 474
482if test "$dynamic_loading" = yes; then 475if test "$dynamic_loading" = yes; then
483 # The GNU linker requires the -export-dynamic option to make 476 # The GNU linker requires the -export-dynamic option to make
484 # all symbols visible in the dynamic symbol table. 477 # all symbols visible in the dynamic symbol table.
485 hold_ldflags=$LDFLAGS 478 hold_ldflags=$LDFLAGS
563AC_SUBST(PICFLAGS) 556AC_SUBST(PICFLAGS)
564 557
565AC_ARG_ENABLE(warnings, 558AC_ARG_ENABLE(warnings,
566AC_HELP_STRING([--enable-warnings],[ Enable compiler warnings]), 559AC_HELP_STRING([--enable-warnings],[ Enable compiler warnings]),
567[ 560[
568echo 561
562echo " "
569echo "Compiler warnings" 563echo "Compiler warnings"
570echo 564echo " "
571 565
572dnl See what warnings we can get away with 566dnl See what warnings we can get away with
573ERMYTH_C_GCC_TRY_FLAGS([-Wall], ermyth_cv_c_gcc_w_all) 567ERMYTH_C_GCC_TRY_FLAGS([-Wall], ermyth_cv_c_gcc_w_all)
574ERMYTH_C_GCC_TRY_FLAGS([-Wpointer-arith], ermyth_cv_c_gcc_w_pointer_arith) 568ERMYTH_C_GCC_TRY_FLAGS([-Wpointer-arith], ermyth_cv_c_gcc_w_pointer_arith)
575ERMYTH_C_GCC_TRY_FLAGS([-Wimplicit -Wnested-externs], ermyth_cv_c_gcc_w_implicit) 569ERMYTH_C_GCC_TRY_FLAGS([-Wimplicit], ermyth_cv_c_gcc_w_implicit)
576ERMYTH_C_GCC_TRY_FLAGS([-Wcast-align], ermyth_cv_c_gcc_w_cast_align) 570ERMYTH_C_GCC_TRY_FLAGS([-Wcast-align], ermyth_cv_c_gcc_w_cast_align)
577ERMYTH_C_GCC_TRY_FLAGS([-Wcast-qual], ermyth_cv_c_gcc_w_cast_qual) 571ERMYTH_C_GCC_TRY_FLAGS([-Wcast-qual], ermyth_cv_c_gcc_w_cast_qual)
578ERMYTH_C_GCC_TRY_FLAGS([-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations], ermyth_cv_c_gcc_prototypes)
579ERMYTH_C_GCC_TRY_FLAGS([-Wparenthesis], ermyth_cv_c_gcc_parenthesis)
580ERMYTH_C_GCC_TRY_FLAGS([-Wextra], ermyth_cv_c_gcc_w_extra) 572ERMYTH_C_GCC_TRY_FLAGS([-Wextra], ermyth_cv_c_gcc_w_extra)
581ERMYTH_C_GCC_TRY_FLAGS([-W -Wno-unused-parameter], ermyth_cv_c_gcc_w) 573ERMYTH_C_GCC_TRY_FLAGS([-W -Wno-unused-parameter], ermyth_cv_c_gcc_w)
582ERMYTH_C_GCC_TRY_FLAGS([-Wshadow], ermyth_cv_c_gcc_w_shadow) 574ERMYTH_C_GCC_TRY_FLAGS([-Wshadow], ermyth_cv_c_gcc_w_shadow)
583ERMYTH_C_GCC_TRY_FLAGS([-Wmissing-noreturn], ermyth_cv_c_gcc_w_missing_noreturn) 575ERMYTH_C_GCC_TRY_FLAGS([-Wmissing-noreturn], ermyth_cv_c_gcc_w_missing_noreturn)
584ERMYTH_C_GCC_TRY_FLAGS([-Wundef], ermyth_cv_c_gcc_w_undef) 576ERMYTH_C_GCC_TRY_FLAGS([-Wundef], ermyth_cv_c_gcc_w_undef)
585ERMYTH_C_GCC_TRY_FLAGS([-Wpacked], ermyth_cv_c_gcc_w_packed) 577ERMYTH_C_GCC_TRY_FLAGS([-Wpacked], ermyth_cv_c_gcc_w_packed)
586ERMYTH_C_GCC_TRY_FLAGS([-Wnested-externs], ermyth_cv_c_gcc_w_nested_externs)
587ERMYTH_C_GCC_TRY_FLAGS([-Wbad-function-cast], ermyth_cv_c_gcc_w_bad_function_cast)
588ERMYTH_C_GCC_TRY_FLAGS([-Wunused-function -Wunused-label -Wunused-value -Wunused-variable], ermyth_cv_c_gcc_w_unused) 578ERMYTH_C_GCC_TRY_FLAGS([-Wunused-function -Wunused-label -Wunused-value -Wunused-variable], ermyth_cv_c_gcc_w_unused)
589ERMYTH_C_GCC_TRY_FLAGS([-Wredundant-decls], ermyth_cv_c_gcc_w_redundant_decls) 579ERMYTH_C_GCC_TRY_FLAGS([-Wredundant-decls], ermyth_cv_c_gcc_w_redundant_decls)
590ERMYTH_C_GCC_TRY_FLAGS([-Wfloat-equal], ermyth_cv_c_gcc_w_float_equal) 580ERMYTH_C_GCC_TRY_FLAGS([-Wfloat-equal], ermyth_cv_c_gcc_w_float_equal)
591ERMYTH_C_GCC_TRY_FLAGS([-Wformat=2], ermyth_cv_c_gcc_w_format) 581ERMYTH_C_GCC_TRY_FLAGS([-Wformat=2], ermyth_cv_c_gcc_w_format)
592ERMYTH_C_GCC_TRY_FLAGS([-Wdisabled-optimization], ermyth_cv_c_gcc_w_format) 582ERMYTH_C_GCC_TRY_FLAGS([-Wdisabled-optimization], ermyth_cv_c_gcc_w_format)
593ERMYTH_C_GCC_TRY_FLAGS([-pedantic], ermyth_cv_c_gcc_pedantic) 583ERMYTH_C_GCC_TRY_FLAGS([-pedantic], ermyth_cv_c_gcc_pedantic)
594ERMYTH_C_GCC_TRY_FLAGS([-std=c89], ermyth_cv_c_gcc_c89) 584ERMYTH_C_GCC_TRY_FLAGS([-std=c++98], ermyth_cv_c_gcc_cpp98)
595 585
596dnl Too unreliable to be useful at this time. 586dnl Too unreliable to be useful at this time.
597dnl ERMYTH_C_GCC_TRY_FLAGS([-Wunreachable-code], ermyth_cv_c_gcc_w_unreachable_code) 587dnl ERMYTH_C_GCC_TRY_FLAGS([-Wunreachable-code], ermyth_cv_c_gcc_w_unreachable_code)
598 588
599dnl Maintainer flags. 589dnl Maintainer flags.
600dnl ERMYTH_C_GCC_TRY_FLAGS([-Wconversion], ermyth_cv_c_gcc_w_conversion) 590ERMYTH_C_GCC_TRY_FLAGS([-Wconversion], ermyth_cv_c_gcc_w_conversion)
601ERMYTH_C_GCC_TRY_FLAGS([-Wwrite-strings], ermyth_cv_c_gcc_w_strings) 591ERMYTH_C_GCC_TRY_FLAGS([-Wwrite-strings], ermyth_cv_c_gcc_w_strings)
602dnl ERMYTH_C_GCC_TRY_FLAGS([-Werror], ermyth_cv_c_gcc_w_error) 592dnl ERMYTH_C_GCC_TRY_FLAGS([-Werror], ermyth_cv_c_gcc_w_error)
603]) 593])
604 594
605AC_ARG_ENABLE(propolice, 595AC_ARG_ENABLE(propolice,
675 665
676echo 666echo
677echo "Makefile generation" 667echo "Makefile generation"
678echo 668echo
679 669
670dnl include/common/callback.h
680AC_OUTPUT([ 671AC_OUTPUT([
681 Makefile 672 Makefile
682 doc/Makefile 673 doc/Makefile
683 include/common/callback.h
684 modules/Makefile 674 modules/Makefile
685 modules/Makefile.common 675 modules/Makefile.common
686 modules/Makefile.defs 676 modules/Makefile.defs
687 modules/backend/Makefile 677 modules/backend/Makefile
688 modules/chanserv/Makefile 678 modules/chanserv/Makefile

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines