forked from nevali/crawl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
175 lines (148 loc) · 4.68 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
## Author: Mo McRoberts <[email protected]>
##
## Copyright 2014-2017 BBC
## Copyright 2013 Mo McRoberts.
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## http://www.apache.org/licenses/LICENSE-2.0
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the License is distributed on an "AS IS" BASIS,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the License for the specific language governing permissions and
## limitations under the License.
##
AC_INIT([anansi],m4_esyscmd([/bin/sh m4/get-version.sh]),[[email protected]],,[https://github.com/bbcarchdev/anansi])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([scripts])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AM_MAINTAINER_MODE
AC_CONFIG_HEADER([config.h])
BT_PROG_XCODE
AC_PROG_CC([clang c99 gcc cc])
AC_PROG_CC_C99
BT_PROG_CC_WARN
BT_PROG_CC_DEBUG
BT_ENABLE_POSIX_FULL
AC_SYS_LARGEFILE
LT_INIT
BT_DEFINE_PREFIX
dnl save and restore LIBS -- each set will be used explicitly where needed
BT_REQUIRE_PTHREAD
save_LIBS="$LIBS"
BT_CHECK_COMMONCRYPTO(,[
BT_REQUIRE_OPENSSL
])
BT_REQUIRE_LIBCURL
BT_REQUIRE_LIBRDF
BT_REQUIRE_LIBUUID
BT_REQUIRE_LIBXML2
BT_REQUIRE_LIBJANSSON
BT_REQUIRE_LIBMQ
dnl Always check for possibly-included libraries last to prevent link failures
dnl (due to not-yet-built libraries) breaking tests
BT_REQUIRE_LIBAWSCLIENT_INCLUDED
BT_REQUIRE_LIBURI_INCLUDED
BT_REQUIRE_LIBSQL_INCLUDED
BT_REQUIRE_LIBCLUSTER_INCLUDED
LIBS="$save_LIBS"
extra_libs="$OPENSSL_INSTALLED_LIBS $LIBCURL_INSTALLED_LIBS $LIBURI_INSTALLED_LIBS $LIBJANSSON_INSTALLED_LIBS"
BT_DEFINE_PATH([LIBCRAWL_EXTRA_LIBS],[extra_libs],[Define to the additional libraries depended upon by an installed libcrawl])
use_docbook_html5=yes
BT_BUILD_DOCS
XML2HTMLFLAGS="--param \"html.linksfile\" \"'file://\$(abs_top_srcdir)/docbook-html5/res-links.xml'\" \
--param \"html.navfile\" \"'file://\$(abs_top_srcdir)/docbook-html5/res-nav.xml'\" \
--param \"html.ie78css\" \"'//bbcarchdev.github.io/painting-by-numbers/ie78.css'\""
AC_SUBST([XML2HTMLFLAGS])
LINKS='${top_srcdir}/docbook-html5/res-links.xml'
AC_SUBST([LINKS])
NAV='${top_srcdir}/docbook-html5/res-nav.xml'
AC_SUBST([NAV])
anansihtdocdir='${docdir}'
AC_SUBST([anansihtdocdir])
BT_DEFINE_PREFIX
enable_apache_tests=yes
if test $enable_apache_tests = yes ; then
AC_MSG_CHECKING([which TCP/IP port unit tests should launch an Apache instance on])
AC_ARG_WITH([test-apache-port],
[AS_HELP_STRING([--with-test-apache-port=PORT],[specify TCP/IP port that an Apache instance should be launched on for tests])],
[test_apache_port=$withval],[test_apache_port=no])
if test $test_apache_port = no ; then
AC_MSG_RESULT([none (these tests will not be run)])
enable_apache_tests=no
else
AC_MSG_RESULT([$test_apache_port])
fi
fi
if test $enable_apache_tests = yes ; then
found=no
AC_PATH_PROGS([APACHE],[apache24 apache22 apache2 httpd],[false],[/sbin:/usr/sbin:/usr/local/sbin:$PATH])
if test x$APACHE = xfalse ; then
found=no
else
found=yes
test_apache_daemon="$APACHE"
fi
AC_MSG_CHECKING([for the Apache HTTPD binary])
if test $found = no ; then
AC_MSG_RESULT([not found (these tests will not be run)])
enable_apache_tests=no
else
AC_MSG_RESULT([$test_apache_daemon])
fi
fi
if test $enable_apache_tests = yes ; then
AC_MSG_CHECKING([for Apache modules path])
found=no
for dir in /usr/lib/apache2/modules /usr/libexec/apache2 ; do
for ext in so dylib dll ; do
if test -d $dir && test -r $dir/mod_negotiation.$ext ; then
test_apache_modules=$dir
test_apache_modext=$ext
found=yes
break
fi
done
test $found = yes && break
done
if test $found = no ; then
AC_MSG_RESULT([not found (these tests will not be run)])
enable_apache_tests=no
else
AC_MSG_RESULT([$test_apache_modules])
AC_MSG_CHECKING([for Apache module file extension])
AC_MSG_RESULT([$test_apache_modext])
fi
fi
AC_MSG_CHECKING([whether to enable Apache-based unit tests])
AC_MSG_RESULT([$enable_apache_tests])
AC_SUBST([enable_apache_tests])
AC_SUBST([test_apache_daemon])
AC_SUBST([test_apache_port])
AC_SUBST([test_apache_modules])
AC_SUBST([test_apache_modext])
AC_CONFIG_FILES([
Makefile
libsupport/Makefile
libcrawl/Makefile
libcrawl/caches/Makefile
libcrawl/utils/Makefile
libspider/Makefile
libspider/queues/Makefile
libspider/processors/Makefile
libspider/policies/Makefile
mq/Makefile
crawler/Makefile
m4/Makefile
docs/Makefile
docbook-html5/Makefile
t/Makefile
t/conf/Makefile
t/conf/apache2.conf
t/wwwroot/Makefile
])
AC_CONFIG_FILES([t/run-apache-test.sh],[chmod +x t/run-apache-test.sh])
AC_OUTPUT