summaryrefslogtreecommitdiffabout
path: root/configure.ac
Unidiff
Diffstat (limited to 'configure.ac') (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0aa1272..a66e53d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,139 +88,140 @@ AC_COMPILE_IFELSE([
88 AC_MSG_RESULT([yes]) 88 AC_MSG_RESULT([yes])
89 AC_DEFINE([HAVE_DEMANGLE],,[defined if abi::__cxa_demangle is available]) 89 AC_DEFINE([HAVE_DEMANGLE],,[defined if abi::__cxa_demangle is available])
90 ],[ 90 ],[
91 AC_MSG_RESULT([no]) 91 AC_MSG_RESULT([no])
92 ] 92 ]
93) 93)
94AC_LANG_POP([C++]) 94AC_LANG_POP([C++])
95 95
96 96
97 97
98 98
99PKG_CHECK_MODULES([OPENSSL],[openssl],,[ 99PKG_CHECK_MODULES([OPENSSL],[openssl],,[
100 AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) 100 AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/])
101]) 101])
102 102
103WANT_KONFORKA="yes" 103WANT_KONFORKA="yes"
104AC_ARG_ENABLE([konforka], 104AC_ARG_ENABLE([konforka],
105 AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), 105 AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]),
106 [ 106 [
107 test "${enableval}" = "no" && WANT_KONFORKA="no" 107 test "${enableval}" = "no" && WANT_KONFORKA="no"
108 ] 108 ]
109) 109)
110if test "${WANT_KONFORKA}" = "yes" ; then 110if test "${WANT_KONFORKA}" = "yes" ; then
111 PKG_CHECK_MODULES([KONFORKA],[konforka],[ 111 PKG_CHECK_MODULES([KONFORKA],[konforka],[
112 AC_SUBST([KONFORKA_CFLAGS]) 112 AC_SUBST([KONFORKA_CFLAGS])
113 AC_SUBST([KONFORKA_LIBS]) 113 AC_SUBST([KONFORKA_LIBS])
114 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) 114 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library])
115 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) 115 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library])
116 AC_SUBST([KONFORKA_KONFORKA],[konforka]) 116 AC_SUBST([KONFORKA_KONFORKA],[konforka])
117 ],[true]) 117 ],[true])
118fi 118fi
119 119
120WANT_DOXYGEN="yes" 120WANT_DOXYGEN="yes"
121AC_ARG_ENABLE([doxygen], 121AC_ARG_ENABLE([doxygen],
122 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), 122 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]),
123 [ 123 [
124 test "${enableval}" = "no" && WANT_DOXYGEN="no" 124 test "${enableval}" = "no" && WANT_DOXYGEN="no"
125 ] 125 ]
126) 126)
127if test "${WANT_DOXYGEN}" = "yes" ; then 127if test "${WANT_DOXYGEN}" = "yes" ; then
128 AC_WITH_DOXYGEN 128 AC_WITH_DOXYGEN
129 AC_WITH_DOT 129 AC_WITH_DOT
130else 130else
131 AM_CONDITIONAL([HAVE_DOXYGEN],[false]) 131 AM_CONDITIONAL([HAVE_DOXYGEN],[false])
132 AM_CONDITIONAL([HAVE_DOT],[false]) 132 AM_CONDITIONAL([HAVE_DOT],[false])
133fi 133fi
134 134
135LIBCURL_CHECK_CONFIG(,,,[ 135LIBCURL_CHECK_CONFIG(,,,[
136 AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) 136 AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/])
137]) 137])
138 138
139AC_CHECK_HEADER([expat.h],[ 139AC_CHECK_HEADER([expat.h],[
140 AC_CHECK_LIB([expat],[XML_ParserCreate],[ 140 AC_CHECK_LIB([expat],[XML_ParserCreate],[
141 EXPAT_LIBS=-lexpat 141 EXPAT_LIBS=-lexpat
142 EXPAT_CFLAGS= 142 EXPAT_CFLAGS=
143 AC_SUBST([EXPAT_LIBS]) 143 AC_SUBST([EXPAT_LIBS])
144 AC_SUBST([EXPAT_CFLAGS]) 144 AC_SUBST([EXPAT_CFLAGS])
145 ],[ 145 ],[
146 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 146 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
147 ]) 147 ])
148],[ 148],[
149 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 149 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
150]) 150])
151 151
152AC_CHECK_HEADER([tidy.h],[ 152AC_CHECK_HEADERS([tidy.h tidy/tidy.h],[
153 AC_CHECK_LIB([tidy],[tidyParseBuffer],[ 153 AC_CHECK_LIB([tidy],[tidyParseBuffer],[
154 TIDY_LIBS=-ltidy 154 TIDY_LIBS=-ltidy
155 TIDY_CFLAGS= 155 TIDY_CFLAGS=
156 AC_SUBST([TIDY_LIBS]) 156 AC_SUBST([TIDY_LIBS])
157 AC_SUBST([TIDY_CFLAGS]) 157 AC_SUBST([TIDY_CFLAGS])
158 ],[ 158 ],[
159 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 159 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
160 ]) 160 ])
161],[ 161],[
162 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 162 test "$ac_header" = "tidy/tidy.h" \
163 && AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
163]) 164])
164 165
165if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then 166if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then
166 AC_SUBST([PCRE_CFLAGS]) 167 AC_SUBST([PCRE_CFLAGS])
167 AC_SUBST([PCRE_LIBS]) 168 AC_SUBST([PCRE_LIBS])
168 : 169 :
169else 170else
170 PKG_CHECK_MODULES([PCRE],[libpcre],,[ 171 PKG_CHECK_MODULES([PCRE],[libpcre],,[
171 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) 172 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/])
172 ]) 173 ])
173fi 174fi
174 175
175PKG_CHECK_MODULES([SQLITE3],[sqlite3],[have_sqlite3=true],[have_sqlite3=false]) 176PKG_CHECK_MODULES([SQLITE3],[sqlite3],[have_sqlite3=true],[have_sqlite3=false])
176AM_CONDITIONAL([HAVE_SQLITE3],[$have_sqlite3]) 177AM_CONDITIONAL([HAVE_SQLITE3],[$have_sqlite3])
177PKG_CHECK_MODULES([KINGATE],[kingate-plaincgi],[have_kingate=true],[have_kingate=false]) 178PKG_CHECK_MODULES([KINGATE],[kingate-plaincgi],[have_kingate=true],[have_kingate=false])
178AM_CONDITIONAL([HAVE_KINGATE],[$have_kingate]) 179AM_CONDITIONAL([HAVE_KINGATE],[$have_kingate])
179PKG_CHECK_MODULES([UUID],[uuid],[have_uuid=true],[have_uuid=false]) 180PKG_CHECK_MODULES([UUID],[uuid],[have_uuid=true],[have_uuid=false])
180AM_CONDITIONAL([HAVE_UUID],[$have_uuid]) 181AM_CONDITIONAL([HAVE_UUID],[$have_uuid])
181if $have_uuid ; then 182if $have_uuid ; then
182 AC_DEFINE([HAVE_LIBUUID],,[defined in presence of libuuid]) 183 AC_DEFINE([HAVE_LIBUUID],,[defined in presence of libuuid])
183 AC_SUBST([UUID_UUID],[uuid]) 184 AC_SUBST([UUID_UUID],[uuid])
184fi 185fi
185 186
186curl_ssl_verify_host="true" 187curl_ssl_verify_host="true"
187AC_ARG_ENABLE([ssl-verify-host], 188AC_ARG_ENABLE([ssl-verify-host],
188 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), 189 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]),
189 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] 190 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ]
190) 191)
191${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) 192${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host])
192 193
193curl_ssl_verify_peer="true" 194curl_ssl_verify_peer="true"
194AC_ARG_ENABLE([ssl-verify-peer], 195AC_ARG_ENABLE([ssl-verify-peer],
195 AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), 196 AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]),
196 [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] 197 [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ]
197) 198)
198${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) 199${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity])
199 200
200postels_law=true 201postels_law=true
201AC_ARG_ENABLE([postels-law], 202AC_ARG_ENABLE([postels-law],
202 AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]), 203 AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]),
203 [ test "${enableval}" = "no" && postels_law=false ] 204 [ test "${enableval}" = "no" && postels_law=false ]
204) 205)
205$postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) 206$postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law])
206 207
207AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) 208AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory])
208 209
209nitpick=false 210nitpick=false
210AC_ARG_ENABLE([nitpicking], 211AC_ARG_ENABLE([nitpicking],
211 AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), 212 AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]),
212 [ test "$enableval" = "no" || nitpick=true ] 213 [ test "$enableval" = "no" || nitpick=true ]
213) 214)
214if $nitpick ; then 215if $nitpick ; then
215 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ 216 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \
216 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ 217 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \
217 -Wredundant-decls -ansi" 218 -Wredundant-decls -ansi"
218 # -Wlogical-op -Wmissing-noreturn 219 # -Wlogical-op -Wmissing-noreturn
219 C_NITPICK="$CPP_NITPICK" 220 C_NITPICK="$CPP_NITPICK"
220 CXX_NITPICK="$C_NITPICK" 221 CXX_NITPICK="$C_NITPICK"
221 222
222 CPPFLAGS="$CPPFLAGS $CPP_NITPICK" 223 CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
223 CFLAGS="$CFLAGS $C_NITPICK" 224 CFLAGS="$CFLAGS $C_NITPICK"
224 CXXFLAGS="$CXXFLAGS $CXX_NITPICK" 225 CXXFLAGS="$CXXFLAGS $CXX_NITPICK"
225fi 226fi
226 227