diff options
Diffstat (limited to 'pathologist/configure.ac')
-rw-r--r-- | pathologist/configure.ac | 221 |
1 files changed, 221 insertions, 0 deletions
diff --git a/pathologist/configure.ac b/pathologist/configure.ac new file mode 100644 index 0000000..0f63f2e --- /dev/null +++ b/pathologist/configure.ac | |||
@@ -0,0 +1,221 @@ | |||
1 | # This file is part of GNUnet. | ||
2 | # (C) 2001-2012 Christian Grothoff (and other contributing authors) | ||
3 | # | ||
4 | # GNUnet is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License as published | ||
6 | # by the Free Software Foundation; either version 2, or (at your | ||
7 | # option) any later version. | ||
8 | # | ||
9 | # GNUnet is distributed in the hope that it will be useful, but | ||
10 | # WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | # General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with GNUnet; see the file COPYING. If not, write to the | ||
16 | # Free Software Foundation, Inc., 59 Temple Place - Suite 330, | ||
17 | # Boston, MA 02111-1307, USA. | ||
18 | # | ||
19 | # | ||
20 | # Process this file with autoconf to produce a configure script. | ||
21 | # | ||
22 | AC_PREREQ(2.61) | ||
23 | AC_INIT([monkey],[0.0.0],[bug-gnunet@gnu.org]) | ||
24 | AM_INIT_AUTOMAKE([monkey], [0.0.0]) | ||
25 | AM_CONFIG_HEADER(monkey_config.h) | ||
26 | |||
27 | AH_TOP([#define _GNU_SOURCE 1]) | ||
28 | |||
29 | AC_ISC_POSIX | ||
30 | AC_PROG_AWK | ||
31 | AC_PROG_CC | ||
32 | |||
33 | AC_PROG_MKDIR_P | ||
34 | AC_PROG_CPP | ||
35 | AC_PROG_INSTALL | ||
36 | AC_PROG_LN_S | ||
37 | AC_PROG_MAKE_SET | ||
38 | AC_LIBTOOL_WIN32_DLL | ||
39 | AC_PROG_CC | ||
40 | AM_PROG_CC_STDC | ||
41 | AC_HEADER_STDC | ||
42 | AC_CANONICAL_HOST | ||
43 | |||
44 | # dynamic libraries/plugins | ||
45 | AC_DISABLE_STATIC | ||
46 | AC_PROG_LIBTOOL | ||
47 | |||
48 | AC_SYS_LARGEFILE | ||
49 | AC_FUNC_FSEEKO | ||
50 | |||
51 | CFLAGS="-Wall $CFLAGS" | ||
52 | # use '-fno-strict-aliasing', but only if the compiler can take it | ||
53 | if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; | ||
54 | then | ||
55 | CFLAGS="-fno-strict-aliasing $CFLAGS" | ||
56 | fi | ||
57 | |||
58 | |||
59 | # Check system type | ||
60 | case "$host_os" in | ||
61 | *darwin* | *rhapsody* | *macosx*) | ||
62 | AC_DEFINE_UNQUOTED(OSX,1,[This is an OS X system]) | ||
63 | CFLAGS="-no-cpp-precomp $CFLAGS" | ||
64 | LDFLAGS="-flat_namespace -undefined suppress $LDFLAGS" | ||
65 | ;; | ||
66 | linux*) | ||
67 | AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) | ||
68 | ;; | ||
69 | freebsd*) | ||
70 | AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) | ||
71 | AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system]) | ||
72 | ;; | ||
73 | openbsd*) | ||
74 | AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) | ||
75 | AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system]) | ||
76 | ;; | ||
77 | netbsd*) | ||
78 | AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system]) | ||
79 | AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system]) | ||
80 | ;; | ||
81 | *solaris*) | ||
82 | AC_DEFINE_UNQUOTED(SOLARIS,1,[This is a Solaris system]) | ||
83 | AC_DEFINE_UNQUOTED(_REENTRANT,1,[Need with solaris or errno doesnt work]) | ||
84 | build_target="solaris" | ||
85 | ;; | ||
86 | *arm-linux*) | ||
87 | AC_DEFINE_UNQUOTED(LINUX,1,[This is a Linux system]) | ||
88 | ;; | ||
89 | *cygwin*) | ||
90 | AC_DEFINE_UNQUOTED(CYGWIN,1,[This is a Cygwin system]) | ||
91 | AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) | ||
92 | AC_CHECK_LIB(intl, gettext) | ||
93 | LDFLAGS="$LDFLAGS -no-undefined" | ||
94 | build_target="cygwin" | ||
95 | ;; | ||
96 | *mingw*) | ||
97 | AC_DEFINE_UNQUOTED(MINGW,1,[This is a MinGW system]) | ||
98 | AC_DEFINE_UNQUOTED(WINDOWS,1,[This is a Windows system]) | ||
99 | AC_DEFINE_UNQUOTED(_WIN32,1,[This is a Windows system]) | ||
100 | AC_CHECK_LIB(intl, gettext) | ||
101 | LDFLAGS="$LDFLAGS -no-undefined -Wl,--export-all-symbols -lws2_32" | ||
102 | CFLAGS="-mms-bitfields $CFLAGS" | ||
103 | build_target="mingw" | ||
104 | ;; | ||
105 | *) | ||
106 | AC_MSG_RESULT(Unrecognised OS $host_os) | ||
107 | AC_DEFINE_UNQUOTED(OTHEROS,1,[Some strange OS]) | ||
108 | ;; | ||
109 | esac | ||
110 | |||
111 | AM_CONDITIONAL(MINGW, test "$build_target" = "mingw") | ||
112 | |||
113 | AC_CHECK_HEADERS([errno.h stdio.h unistd.h locale.h sys/stat.h sys/types.h langinfo.h libintl.h unistd.h stddef.h argz.h sys/socket.h netinet/in.h stdarg.h]) | ||
114 | |||
115 | # openssl | ||
116 | openssl=0 | ||
117 | AC_MSG_CHECKING([for openssl]) | ||
118 | AC_ARG_WITH(openssl, | ||
119 | [ --with-openssl=PFX base of openssl installation], | ||
120 | [AC_MSG_RESULT([$with_openssl]) | ||
121 | case $with_openssl in | ||
122 | no) | ||
123 | ;; | ||
124 | yes) | ||
125 | AC_CHECK_HEADERS([openssl/ssl.h], | ||
126 | AC_CHECK_LIB([ssl], [SSL_new], | ||
127 | openssl=1)) | ||
128 | ;; | ||
129 | *) | ||
130 | LDFLAGS="-L$with_openssl/lib $LDFLAGS" | ||
131 | CPPFLAGS="-I$with_openssl/include $CPPFLAGS" | ||
132 | AC_CHECK_HEADERS([openssl/ssl.h], | ||
133 | AC_CHECK_LIB([ssl], [SSL_new], | ||
134 | EXT_LIB_PATH="-L$with_openssl/lib $EXT_LIB_PATH" | ||
135 | openssl=1)) | ||
136 | ;; | ||
137 | esac | ||
138 | ], | ||
139 | [AC_MSG_RESULT([--with-openssl not specified]) | ||
140 | AC_CHECK_HEADERS([openssl/ssl.h], | ||
141 | AC_CHECK_LIB([ssl], [SSL_new], | ||
142 | openssl=1))]) | ||
143 | AM_CONDITIONAL(HAVE_OPENSSL, test x$openssl = x1) | ||
144 | AC_DEFINE_UNQUOTED([HAVE_OPENSSL], $openssl, [We have openssl]) | ||
145 | |||
146 | |||
147 | |||
148 | # libesmtp | ||
149 | esmtp=0 | ||
150 | AC_MSG_CHECKING([for libesmtp]) | ||
151 | AC_ARG_WITH(esmtp, | ||
152 | [ --with-esmtp=PFX base of libesmtp installation], | ||
153 | [AC_MSG_RESULT([$with_esmtp]) | ||
154 | case $with_esmtp in | ||
155 | no) | ||
156 | ;; | ||
157 | yes) | ||
158 | AC_CHECK_HEADERS(libesmtp.h, | ||
159 | AC_CHECK_LIB([esmtp], [smtp_start_session], | ||
160 | esmtp=1)) | ||
161 | ;; | ||
162 | *) | ||
163 | LDFLAGS="-L$with_esmtp/lib $LDFLAGS" | ||
164 | CPPFLAGS="-I$with_esmtp/include $CPPFLAGS" | ||
165 | AC_CHECK_HEADERS(libesmtp.h, | ||
166 | AC_CHECK_LIB([esmtp], [smtp_start_session], | ||
167 | EXT_LIB_PATH="-L$with_esmtp/lib $EXT_LIB_PATH" | ||
168 | esmtp=1)) | ||
169 | ;; | ||
170 | esac | ||
171 | ], | ||
172 | [AC_MSG_RESULT([--with-esmtp not specified]) | ||
173 | AC_CHECK_HEADERS(libesmtp.h, | ||
174 | AC_CHECK_LIB([esmtp], [smtp_start_session], | ||
175 | esmtp=1))]) | ||
176 | AM_CONDITIONAL(HAVE_ESMTP, test x$esmtp = x1) | ||
177 | AC_DEFINE_UNQUOTED([HAVE_ESMTP], $esmtp, [We have libesmtp]) | ||
178 | # restore LIBS | ||
179 | LIBS=$SAVE_LIBS | ||
180 | |||
181 | |||
182 | # gcov compilation | ||
183 | AC_MSG_CHECKING(whether to compile with support for code coverage analysis) | ||
184 | AC_ARG_ENABLE([coverage], | ||
185 | AS_HELP_STRING([--enable-coverage], | ||
186 | [compile the library with code coverage support]), | ||
187 | [use_gcov=${enableval}], | ||
188 | [use_gcov=no]) | ||
189 | AC_MSG_RESULT($use_gcov) | ||
190 | AM_CONDITIONAL([USE_COVERAGE], [test "x$use_gcov" = "xyes"]) | ||
191 | |||
192 | |||
193 | # should 'make check' run tests? | ||
194 | AC_MSG_CHECKING(whether to run tests) | ||
195 | AC_ARG_ENABLE([testruns], | ||
196 | [AS_HELP_STRING([--disable-testruns], [disable running tests on make check (default is YES)])], | ||
197 | [enable_tests_run=${enableval}], | ||
198 | [enable_tests_run=yes]) | ||
199 | AC_MSG_RESULT($enable_test_run) | ||
200 | AM_CONDITIONAL([ENABLE_TEST_RUN], [test "x$enable_tests_run" = "xyes"]) | ||
201 | |||
202 | AC_CHECK_PROG(SSP_FOUND, seaspider, [yes], [no], [../seaspider/bin]) | ||
203 | AM_CONDITIONAL([SEASPIDER], [test "$SSP_FOUND" = yes]) | ||
204 | |||
205 | |||
206 | AC_DEFINE_DIR([PACKAGE_DATA], [datarootdir], [The directory for installing read-only architecture-independent data]) | ||
207 | |||
208 | # Set PACKAGE_SOURCE_DIR in gnunet_gtk_config.h. | ||
209 | packagesrcdir=`cd $srcdir && pwd` | ||
210 | AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [source dir]) | ||
211 | |||
212 | AC_OUTPUT([ | ||
213 | Makefile | ||
214 | src/Makefile | ||
215 | src/include/Makefile | ||
216 | src/mi/Makefile | ||
217 | src/minixml/Makefile | ||
218 | src/util/Makefile | ||
219 | src/pathologist/Makefile | ||
220 | refs/src/Makefile | ||
221 | ]) | ||