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

Comparing ermyth/configure.ac (file contents):
Revision 1.5 by pippijn, Sat Jul 21 15:05:40 2007 UTC vs.
Revision 1.12 by pippijn, Sat Sep 22 14:27:25 2007 UTC

1dnl configure.ac: Process this file with autoconf to produce a configure script.
2dnl
1dnl Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team 3dnl Copyright © 2007 Pippijn van Steenhoven / The Ermyth Team
2dnl Copyright © 2005 Atheme Development Group 4dnl Rights to this code are as documented in COPYING.
5dnl
6dnl
7dnl Portions of this file were derived from sources bearing the following license:
8dnl Copyright © 2003-2004 E. Will et al.
3dnl Rights to this code are documented in doc/pod/license.pod. 9dnl Rights to this code are documented in doc/pod/license.pod.
4dnl 10dnl
5dnl $Id: configure.ac,v 1.5 2007/07/21 15:05:40 pippijn Exp $ 11dnl $Id: configure.ac,v 1.12 2007/09/22 14:27:25 pippijn Exp $
6 12dnl
7dnl Process this file with autoconf to produce a configure script.
8 13
9AC_PREREQ(2.59) 14AC_PREREQ(2.59)
10AC_INIT([ermyth], [2.3], [ermyth@one09.net]) 15AC_INIT([ermyth], [2.3], [ermyth@one09.net])
11AC_CONFIG_HEADER(include/sysconf.h) 16AC_CONFIG_HEADER(include/sysconf.h)
12AC_CONFIG_AUX_DIR(autoconf) 17AC_CONFIG_AUX_DIR(autoconf)
13 18
14AC_COPYRIGHT([$Id: configure.ac,v 1.5 2007/07/21 15:05:40 pippijn Exp $]) 19AC_COPYRIGHT([$Id: configure.ac,v 1.12 2007/09/22 14:27:25 pippijn Exp $])
15 20
16AC_PREFIX_DEFAULT(~/PACKAGE) 21AC_PREFIX_DEFAULT(~/PACKAGE)
17 22
18dnl Automake compatibility. 23dnl Automake compatibility.
19AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME]) 24AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])
34AC_PATH_PROG(AR, ar) 39AC_PATH_PROG(AR, ar)
35AC_PATH_PROG(RANLIB, ranlib) 40AC_PATH_PROG(RANLIB, ranlib)
36 41
37AC_PATH_PROG(PKG_CONFIG, pkg-config, no) 42AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
38 43
39#--------------------------------------------------
40# AC_MSG_CHECKING(glib >= 2.10) 44AC_MSG_CHECKING(glib >= 2.10)
41# if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then 45if $PKG_CONFIG glib-2.0 --atleast-version 2.10; then
42# CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`" 46 CXXFLAGS="$CXXFLAGS `$PKG_CONFIG glib-2.0 --cflags`"
43# LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`" 47 LIBS="$LIBS `$PKG_CONFIG glib-2.0 --libs`"
44# AC_MSG_RESULT(ok) 48 AC_MSG_RESULT(ok)
45# else 49else
46# AC_MSG_ERROR(no) 50 AC_MSG_ERROR(no)
47# fi 51fi
48#--------------------------------------------------
49 52
50AC_PATH_PROG(PERL, perl5.8) 53AC_PATH_PROG(PERL, perl5.8)
51if test -z "$PERL"; then 54if test -z "$PERL"; then
52 AC_PATH_PROG(PERL, perl5) 55 AC_PATH_PROG(PERL, perl5)
53 if test -z "$PERL"; then 56 if test -z "$PERL"; then
60 63
61dnl 64dnl
62dnl Source generation 65dnl Source generation
63dnl 66dnl
64 67
65CALLBACKS=`$PERL $srcdir/include/common/gencallbacks.pl 7` 68dnl CALLBACKS=`$PERL $srcdir/include/common/gencallbacks.pl 7`
66AC_SUBST(CALLBACKS) 69dnl AC_SUBST(CALLBACKS)
67 70
68dnl 71dnl
69dnl GNU gettext 72dnl GNU gettext
70dnl 73dnl
71 74
107 110
108dnl 111dnl
109dnl Checks for header files. 112dnl Checks for header files.
110dnl 113dnl
111 114
112dnl AC_CHECK_HEADERS(getopt.h link.h valgrind/memcheck.h) 115AC_CHECK_HEADERS(valgrind/memcheck.h)
113dnl AC_CHECK_HEADER(tr1/unordered_map, [], [AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])]) 116AC_CHECK_HEADER(tr1/unordered_map, [], [AC_MSG_ERROR([Your compiler must support the Library Technical Report 1 extensions.])])
114 117
115AC_DEFINE(_REENTRANT, [1], [Define this]) 118AC_DEFINE(_REENTRANT, [1], [Define this])
116 119
117#-------------------------------------------------- 120#--------------------------------------------------
118# AC_ARG_WITH(boost, 121# AC_ARG_WITH(boost,
203AC_CHECK_LIB(crypt, crypt, [ 206AC_CHECK_LIB(crypt, crypt, [
204 POSIX_CRYPTC="posix.C" 207 POSIX_CRYPTC="posix.C"
205 LIBS="$LIBS -lcrypt" 208 LIBS="$LIBS -lcrypt"
206]) 209])
207 210
211AC_MSG_CHECKING(for libresolv)
212AC_TRY_LINK([
213#include <netinet/in.h>
214#include <arpa/nameser.h>
215#include <resolv.h>
216],[
217 res_init ();
218],[resolv_link=yes],[resolv_link=no])
219if test x$resolv_link = xyes; then
220 AC_MSG_RESULT(ok)
221 AC_DEFINE(HAVE_LIBRESOLV, 1, Define if you have libresolv)
222 LIBS="$LIBS -lresolv"
223else
224 AC_MSG_RESULT([no, unable to link])
225fi
226
208AC_MSG_CHECKING(for $PERL suitability) 227AC_MSG_CHECKING(for $PERL suitability)
209if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then 228if $PERL -MExtUtils::Embed -e "use v5.8" >/dev/null 2>&1; then
210 save_CXXFLAGS="$CXXFLAGS" 229 save_CXXFLAGS="$CXXFLAGS"
211 save_LIBS="$LIBS" 230 save_LIBS="$LIBS"
212 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`" 231 xPERLFLAGS="`$PERL -MExtUtils::Embed -e ccopts`"
297 srcdir="`cd \"$srcdir\";pwd`" 316 srcdir="`cd \"$srcdir\";pwd`"
298 ;; 317 ;;
299 esac 318 esac
300fi 319fi
301SRCDIR="$srcdir" 320SRCDIR="$srcdir"
321BUILDROOT=`pwd`
302 322
303AC_SUBST(ABSPATHS) 323AC_SUBST(ABSPATHS)
304AC_SUBST(SRCDIR) 324AC_SUBST(SRCDIR)
325AC_SUBST(BUILDROOT)
305 326
306dnl 327dnl
307dnl Filesystem Hierarchy Standard 328dnl Filesystem Hierarchy Standard
308dnl 329dnl
309 330
448AC_CHECK_HEADER([openssl/ssl.h],, 469AC_CHECK_HEADER([openssl/ssl.h],,
449[ 470[
450 OPENSSL_FOUND=no 471 OPENSSL_FOUND=no
451],[]) 472],[])
452 473
453if test x$OPENSSL_FOUND != xno; then
454 LIBS="$LIBS -lssl -lcrypto"
455fi
456
457AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno) 474AM_CONDITIONAL(HAVE_OPENSSL,test x$OPENSSL_FOUND != xno)
458 475
459echo 476echo
460echo "Module support" 477echo "Module support"
461echo 478echo
462 479
463dynamic_loading="yes" 480dynamic_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 481
482if test "$dynamic_loading" = yes; then 482if test "$dynamic_loading" = yes; then
483 # The GNU linker requires the -export-dynamic option to make 483 # The GNU linker requires the -export-dynamic option to make
484 # all symbols visible in the dynamic symbol table. 484 # all symbols visible in the dynamic symbol table.
485 hold_ldflags=$LDFLAGS 485 hold_ldflags=$LDFLAGS
563AC_SUBST(PICFLAGS) 563AC_SUBST(PICFLAGS)
564 564
565AC_ARG_ENABLE(warnings, 565AC_ARG_ENABLE(warnings,
566AC_HELP_STRING([--enable-warnings],[ Enable compiler warnings]), 566AC_HELP_STRING([--enable-warnings],[ Enable compiler warnings]),
567[ 567[
568echo 568
569echo " "
569echo "Compiler warnings" 570echo "Compiler warnings"
570echo 571echo " "
571 572
572dnl See what warnings we can get away with 573dnl See what warnings we can get away with
573ERMYTH_C_GCC_TRY_FLAGS([-Wall], ermyth_cv_c_gcc_w_all) 574ERMYTH_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) 575ERMYTH_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) 576ERMYTH_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) 577ERMYTH_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) 578ERMYTH_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) 579ERMYTH_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) 580ERMYTH_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) 581ERMYTH_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) 582dnl ERMYTH_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) 583ERMYTH_C_GCC_TRY_FLAGS([-Wundef], ermyth_cv_c_gcc_w_undef)
585ERMYTH_C_GCC_TRY_FLAGS([-Wpacked], ermyth_cv_c_gcc_w_packed) 584ERMYTH_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) 585ERMYTH_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) 586ERMYTH_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) 587ERMYTH_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) 588ERMYTH_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) 589ERMYTH_C_GCC_TRY_FLAGS([-Wdisabled-optimization], ermyth_cv_c_gcc_w_format)
593ERMYTH_C_GCC_TRY_FLAGS([-pedantic], ermyth_cv_c_gcc_pedantic) 590ERMYTH_C_GCC_TRY_FLAGS([-pedantic], ermyth_cv_c_gcc_pedantic)
594ERMYTH_C_GCC_TRY_FLAGS([-std=c89], ermyth_cv_c_gcc_c89) 591ERMYTH_C_GCC_TRY_FLAGS([-std=c++98], ermyth_cv_c_gcc_cpp98)
595 592
596dnl Too unreliable to be useful at this time. 593dnl Too unreliable to be useful at this time.
597dnl ERMYTH_C_GCC_TRY_FLAGS([-Wunreachable-code], ermyth_cv_c_gcc_w_unreachable_code) 594dnl ERMYTH_C_GCC_TRY_FLAGS([-Wunreachable-code], ermyth_cv_c_gcc_w_unreachable_code)
598 595
599dnl Maintainer flags. 596dnl Maintainer flags.
600dnl ERMYTH_C_GCC_TRY_FLAGS([-Wconversion], ermyth_cv_c_gcc_w_conversion) 597ERMYTH_C_GCC_TRY_FLAGS([-Wconversion], ermyth_cv_c_gcc_w_conversion)
601ERMYTH_C_GCC_TRY_FLAGS([-Wwrite-strings], ermyth_cv_c_gcc_w_strings) 598ERMYTH_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) 599dnl ERMYTH_C_GCC_TRY_FLAGS([-Werror], ermyth_cv_c_gcc_w_error)
603]) 600])
604 601
605AC_ARG_ENABLE(propolice, 602AC_ARG_ENABLE(propolice,
675 672
676echo 673echo
677echo "Makefile generation" 674echo "Makefile generation"
678echo 675echo
679 676
677dnl include/common/callback.h
680AC_OUTPUT([ 678AC_OUTPUT([
681 Makefile 679 Makefile
682 doc/Makefile 680 doc/Makefile
683 include/common/callback.h 681 libermyth/Makefile
682 libermyth/Makefile.common
683 libermyth/Makefile.defs
684 libermyth/util/Makefile
684 modules/Makefile 685 modules/Makefile
685 modules/Makefile.common 686 modules/Makefile.common
686 modules/Makefile.defs 687 modules/Makefile.defs
687 modules/backend/Makefile 688 modules/backend/Makefile
688 modules/chanserv/Makefile 689 modules/chanserv/Makefile

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines