summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--configure.ac48
1 files changed, 45 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index c28141c..a49177f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,25 +1,25 @@
1AC_INIT([libopkele], [0.4], [libopkele-bugs@klever.net]) 1AC_INIT([libopkele], [1.1.99.0], [libopkele-bugs@klever.net])
2AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) 2AC_CONFIG_SRCDIR([include/opkele/opkele-config.h])
3AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) 3AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h])
4AM_INIT_AUTOMAKE([dist-bzip2]) 4AM_INIT_AUTOMAKE([dist-bzip2])
5 5
6AC_PROG_INSTALL 6AC_PROG_INSTALL
7AC_PROG_CXX 7AC_PROG_CXX
8AC_PROG_CC 8AC_PROG_CC
9AC_PROG_LIBTOOL 9AC_PROG_LIBTOOL
10PKG_PROG_PKG_CONFIG 10PKG_PROG_PKG_CONFIG
11 11
12AC_HEADER_STDC 12AC_HEADER_STDC
13 13
14AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) 14AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
15 15
16AC_MSG_CHECKING([for source tree version]) 16AC_MSG_CHECKING([for source tree version])
17if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then 17if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then
18 PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)" 18 PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)"
19 test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \ 19 test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \
20 -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}" 20 -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}"
21 ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty" 21 ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty"
22else 22else
23 PACKAGE_SRC_VERSION="$PACKAGE_VERSION" 23 PACKAGE_SRC_VERSION="$PACKAGE_VERSION"
24fi 24fi
25AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) 25AC_MSG_RESULT([$PACKAGE_SRC_VERSION])
@@ -40,48 +40,83 @@ test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std
40test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost 40test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost
41if test -z "$tr1_mem" ; then 41if test -z "$tr1_mem" ; then
42 AC_MSG_RESULT([none found]) 42 AC_MSG_RESULT([none found])
43else 43else
44 AC_MSG_RESULT([$tr1_mem]) 44 AC_MSG_RESULT([$tr1_mem])
45fi 45fi
46case "$tr1_mem" in 46case "$tr1_mem" in
47 std) 47 std)
48 $tr1_mem_std || AC_MSG_ERROR([std implementation requested, but not found]) 48 $tr1_mem_std || AC_MSG_ERROR([std implementation requested, but not found])
49 OPKELE_TR1_MEM_NS=std::tr1 49 OPKELE_TR1_MEM_NS=std::tr1
50 OPKELE_TR1_MEM_HEADER=tr1/memory 50 OPKELE_TR1_MEM_HEADER=tr1/memory
51 ;; 51 ;;
52 boost) 52 boost)
53 $tr1_mem_boost || AC_MSG_ERROR([boost implementation requested, but not found]) 53 $tr1_mem_boost || AC_MSG_ERROR([boost implementation requested, but not found])
54 OPKELE_TR1_MEM_NS=boost 54 OPKELE_TR1_MEM_NS=boost
55 OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp 55 OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp
56 ;; 56 ;;
57 *) 57 *)
58 AC_MSG_ERROR([no shared_ptr<> implementation found]) 58 AC_MSG_ERROR([no shared_ptr<> implementation found])
59 ;; 59 ;;
60esac 60esac
61AC_SUBST([OPKELE_TR1_MEM_NS]) 61AC_SUBST([OPKELE_TR1_MEM_NS])
62AC_SUBST([OPKELE_TR1_MEM_HEADER]) 62AC_SUBST([OPKELE_TR1_MEM_HEADER])
63 63
64AC_MSG_CHECKING([for deprecated attribute support])
65AC_COMPILE_IFELSE([
66 int __attribute__((deprecated)) deprecated_function();
67 ],[
68 AC_MSG_RESULT([yes])
69 AC_DEFINE([OPKELE_DEPRECATE],[__attribute__((deprecated))],[deprecated function attribute])
70 ],[
71 AC_MSG_RESULT([no])
72 AC_DEFINE([OPKELE_DEPRECATE],,[deprecated function attribute])
73 ]
74)
75
76AC_LANG_PUSH([C++])
77AC_MSG_CHECKING([for abi::__cxa_demangle])
78AC_COMPILE_IFELSE([
79 #include <typeinfo>
80 using namespace std;
81 #include <cxxabi.h>
82 int main(int c,char **v) {
83 int dstat;
84 char *demangled = abi::__cxa_demangle(typeid(dstat).name(),0,0,&dstat);
85 return 0;
86 }
87 ],[
88 AC_MSG_RESULT([yes])
89 AC_DEFINE([HAVE_DEMANGLE],,[defined if abi::__cxa_demangle is available])
90 ],[
91 AC_MSG_RESULT([no])
92 ]
93)
94AC_LANG_POP([C++])
95
96
97
98
64PKG_CHECK_MODULES([OPENSSL],[openssl],,[ 99PKG_CHECK_MODULES([OPENSSL],[openssl],,[
65 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/])
66]) 101])
67 102
68WANT_KONFORKA="yes" 103WANT_KONFORKA="yes"
69AC_ARG_ENABLE([konforka], 104AC_ARG_ENABLE([konforka],
70 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)]),
71 [ 106 [
72 test "${enableval}" = "no" && WANT_KONFORKA="no" 107 test "${enableval}" = "no" && WANT_KONFORKA="no"
73 ] 108 ]
74) 109)
75if test "${WANT_KONFORKA}" = "yes" ; then 110if test "${WANT_KONFORKA}" = "yes" ; then
76 PKG_CHECK_MODULES([KONFORKA],[konforka],[ 111 PKG_CHECK_MODULES([KONFORKA],[konforka],[
77 AC_SUBST([KONFORKA_CFLAGS]) 112 AC_SUBST([KONFORKA_CFLAGS])
78 AC_SUBST([KONFORKA_LIBS]) 113 AC_SUBST([KONFORKA_LIBS])
79 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) 114 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library])
80 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) 115 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library])
81 AC_SUBST([KONFORKA_KONFORKA],[konforka]) 116 AC_SUBST([KONFORKA_KONFORKA],[konforka])
82 ],[true]) 117 ],[true])
83fi 118fi
84 119
85WANT_DOXYGEN="yes" 120WANT_DOXYGEN="yes"
86AC_ARG_ENABLE([doxygen], 121AC_ARG_ENABLE([doxygen],
87 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), 122 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]),
@@ -116,48 +151,55 @@ AC_CHECK_HEADER([expat.h],[
116 151
117AC_CHECK_HEADER([tidy.h],[ 152AC_CHECK_HEADER([tidy.h],[
118 AC_CHECK_LIB([tidy],[tidyParseBuffer],[ 153 AC_CHECK_LIB([tidy],[tidyParseBuffer],[
119 TIDY_LIBS=-ltidy 154 TIDY_LIBS=-ltidy
120 TIDY_CFLAGS= 155 TIDY_CFLAGS=
121 AC_SUBST([TIDY_LIBS]) 156 AC_SUBST([TIDY_LIBS])
122 AC_SUBST([TIDY_CFLAGS]) 157 AC_SUBST([TIDY_CFLAGS])
123 ],[ 158 ],[
124 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/])
125 ]) 160 ])
126],[ 161],[
127 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 162 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
128]) 163])
129 164
130if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then 165if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then
131 AC_SUBST([PCRE_CFLAGS]) 166 AC_SUBST([PCRE_CFLAGS])
132 AC_SUBST([PCRE_LIBS]) 167 AC_SUBST([PCRE_LIBS])
133 : 168 :
134else 169else
135 PKG_CHECK_MODULES([PCRE],[libpcre],,[ 170 PKG_CHECK_MODULES([PCRE],[libpcre],,[
136 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) 171 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/])
137 ]) 172 ])
138fi 173fi
139 174
175PKG_CHECK_MODULES([SQLITE3],[sqlite3],[have_sqlite3=true],[have_sqlite3=false])
176AM_CONDITIONAL([HAVE_SQLITE3],[$have_sqlite3])
177PKG_CHECK_MODULES([KINGATE],[kingate-plaincgi],[have_kingate=true],[have_kingate=false])
178AM_CONDITIONAL([HAVE_KINGATE],[$have_kingate])
179PKG_CHECK_MODULES([UUID],[uuid],[have_uuid=true],[have_uuid=false])
180AM_CONDITIONAL([HAVE_UUID],[$have_uuid])
181
140curl_ssl_verify_host="true" 182curl_ssl_verify_host="true"
141AC_ARG_ENABLE([ssl-verify-host], 183AC_ARG_ENABLE([ssl-verify-host],
142 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), 184 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]),
143 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] 185 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ]
144) 186)
145${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) 187${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host])
146 188
147curl_ssl_verify_peer="true" 189curl_ssl_verify_peer="true"
148AC_ARG_ENABLE([ssl-verify-peer], 190AC_ARG_ENABLE([ssl-verify-peer],
149 AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), 191 AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]),
150 [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] 192 [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ]
151) 193)
152${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) 194${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity])
153 195
154postels_law=true 196postels_law=true
155AC_ARG_ENABLE([postels-law], 197AC_ARG_ENABLE([postels-law],
156 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)]), 198 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)]),
157 [ test "${enableval}" = "no" && postels_law=false ] 199 [ test "${enableval}" = "no" && postels_law=false ]
158) 200)
159$postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) 201$postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law])
160 202
161AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) 203AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory])
162 204
163nitpick=false 205nitpick=false
@@ -169,43 +211,43 @@ if $nitpick ; then
169 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ 211 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \
170 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ 212 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \
171 -Wredundant-decls -ansi" 213 -Wredundant-decls -ansi"
172 # -Wlogical-op -Wmissing-noreturn 214 # -Wlogical-op -Wmissing-noreturn
173 C_NITPICK="$CPP_NITPICK" 215 C_NITPICK="$CPP_NITPICK"
174 CXX_NITPICK="$C_NITPICK" 216 CXX_NITPICK="$C_NITPICK"
175 217
176 CPPFLAGS="$CPPFLAGS $CPP_NITPICK" 218 CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
177 CFLAGS="$CFLAGS $C_NITPICK" 219 CFLAGS="$CFLAGS $C_NITPICK"
178 CXXFLAGS="$CXXFLAGS $CXX_NITPICK" 220 CXXFLAGS="$CXXFLAGS $CXX_NITPICK"
179fi 221fi
180 222
181ndebug=true 223ndebug=true
182AC_ARG_ENABLE([debug], 224AC_ARG_ENABLE([debug],
183 AC_HELP_STRING([--enable-debug],[enable debugging code]), 225 AC_HELP_STRING([--enable-debug],[enable debugging code]),
184 [ test "$enableval" = "no" || ndebug=false ] 226 [ test "$enableval" = "no" || ndebug=false ]
185) 227)
186if $ndebug ; then 228if $ndebug ; then
187 CPPFLAGS_DEBUG="-DNDEBUG" 229 CPPFLAGS_DEBUG="-DNDEBUG"
188else 230else
189 CPPFLAGS_DEBUG="" 231 CPPFLAGS_DEBUG=""
190fi 232fi
191AC_SUBST([CPPFLAGS_DEBUG]) 233AC_SUBST([CPPFLAGS_DEBUG])
192 234
193xri_proxy_url="http://beta.xri.net/" 235xri_proxy_url="https://xri.net/"
194AC_MSG_CHECKING([for XRI resolver proxy]) 236AC_MSG_CHECKING([for XRI resolver proxy])
195AC_ARG_ENABLE([xri-proxy], 237AC_ARG_ENABLE([xri-proxy],
196 AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is http://xr_proxy_url]), 238 AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is https://xri.net/]),
197 [ xri_proxy_url="$withval" ] 239 [ xri_proxy_url="$withval" ]
198) 240)
199AC_MSG_RESULT([$xri_proxy_url]) 241AC_MSG_RESULT([$xri_proxy_url])
200AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL]) 242AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL])
201 243
202AC_CONFIG_FILES([ 244AC_CONFIG_FILES([
203 Makefile 245 Makefile
204 libopkele.pc 246 libopkele.pc
205 Doxyfile 247 Doxyfile
206 include/Makefile 248 include/Makefile
207 include/opkele/tr1-mem.h 249 include/opkele/tr1-mem.h
208 lib/Makefile 250 lib/Makefile
209 test/Makefile 251 test/Makefile
210]) 252])
211AC_OUTPUT 253AC_OUTPUT