summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am3
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac1
4 files changed, 5 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 87771db..4fe418f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,21 +1,22 @@
1configure 1configure
2Makefile.in 2Makefile.in
3Doxyfile 3Doxyfile
4config.log 4config.log
5depcomp 5depcomp
6config.guess 6config.guess
7config.h 7config.h
8config.sub 8config.sub
9ltmain.sh 9ltmain.sh
10INSTALL 10INSTALL
11NEWS 11NEWS
12Makefile 12Makefile
13config.status 13config.status
14stamp-h1 14stamp-h1
15config.h.in 15config.h.in
16libtool 16libtool
17autom4te.cache 17autom4te.cache
18libopkele.pc 18libopkele.pc
19missing 19missing
20aclocal.m4 20aclocal.m4
21install-sh 21install-sh
22aclocal.d
diff --git a/Makefile.am b/Makefile.am
index 3227bdb..7726dad 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,28 +1,29 @@
1
2SUBDIRS=include lib test 1SUBDIRS=include lib test
3EXTRA_DIST= NEWS NEWS.xml NEWS.xsl 2EXTRA_DIST= NEWS NEWS.xml NEWS.xsl
4 3
4ACLOCAL_AMFLAGS=-I aclocal.d
5
5pkgconfigdir=${libdir}/pkgconfig 6pkgconfigdir=${libdir}/pkgconfig
6pkgconfig_DATA=libopkele.pc 7pkgconfig_DATA=libopkele.pc
7 8
8all-local: NEWS 9all-local: NEWS
9if HAVE_DOXYGEN 10if HAVE_DOXYGEN
10clean-local: 11clean-local:
11 rm -rf doxydox 12 rm -rf doxydox
12endif 13endif
13 14
14NEWS: NEWS.xsl NEWS.xml 15NEWS: NEWS.xsl NEWS.xml
15 ${XSLTPROC} -o $@ NEWS.xsl NEWS.xml 16 ${XSLTPROC} -o $@ NEWS.xsl NEWS.xml
16 17
17if HAVE_DOXYGEN 18if HAVE_DOXYGEN
18dox: Doxyfile 19dox: Doxyfile
19 ${DOXYGEN} 20 ${DOXYGEN}
20endif 21endif
21 22
22ISSUEFILES = $$(find ${top_srcdir} -type f '(' \ 23ISSUEFILES = $$(find ${top_srcdir} -type f '(' \
23 -name '*.cc' -or -name '*.h' \ 24 -name '*.cc' -or -name '*.h' \
24 ')' ) \ 25 ')' ) \
25 ${top_srcdir}/configure.ac 26 ${top_srcdir}/configure.ac
26issues: todo fixme xxx 27issues: todo fixme xxx
27todo fixme xxx: 28todo fixme xxx:
28 @grep --color=auto -in '$@:' ${ISSUEFILES} || true 29 @grep --color=auto -in '$@:' ${ISSUEFILES} || true
diff --git a/autogen.sh b/autogen.sh
index ba27501..52b32cc 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,9 +1,9 @@
1#!/bin/sh 1#!/bin/sh
2WANT_AUTOMAKE=1.8 2WANT_AUTOMAKE=1.8
3export WANT_AUTOMAKE 3export WANT_AUTOMAKE
4libtoolize -f \ 4libtoolize -f \
5&& aclocal \ 5&& aclocal -I aclocal.d \
6&& autoheader \ 6&& autoheader \
7&& automake -a \ 7&& automake -a \
8&& autoconf \ 8&& autoconf \
9&& ./configure "$@" 9&& ./configure "$@"
diff --git a/configure.ac b/configure.ac
index a6de8c3..fd68b5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,195 +1,196 @@
1AC_INIT([libopkele], [2.0.2], [libopkele-bugs@klever.net]) 1AC_INIT([libopkele], [2.0.2], [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])
4AC_CONFIG_MACRO_DIR([aclocal.d])
4AM_INIT_AUTOMAKE([dist-bzip2]) 5AM_INIT_AUTOMAKE([dist-bzip2])
5 6
6AC_PROG_INSTALL 7AC_PROG_INSTALL
7AC_PROG_CXX 8AC_PROG_CXX
8AC_PROG_CC 9AC_PROG_CC
9AC_PROG_LIBTOOL 10AC_PROG_LIBTOOL
10PKG_PROG_PKG_CONFIG 11PKG_PROG_PKG_CONFIG
11 12
12AC_HEADER_STDC 13AC_HEADER_STDC
13AC_CHECK_FUNCS([timegm]) 14AC_CHECK_FUNCS([timegm])
14 15
15AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) 16AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
16 17
17AC_MSG_CHECKING([for source tree version]) 18AC_MSG_CHECKING([for source tree version])
18if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then 19if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then
19 PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)" 20 PACKAGE_SRC_VERSION="$(cd $srcdir && git describe --tags $headrev)"
20 test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \ 21 test "$PACKAGE_SRC_VERSION" = "$PACKAGE_VERSION" \
21 -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}" 22 -o "${PACKAGE_SRC_VERSION#${PACKAGE_VERSION}-}" != "$PACKAGE_SRC_VERSION" || PACKAGE_SRC_VERSION="${PACKAGE_VERSION}:${PACKAGE_SRC_VERSION}"
22 ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty" 23 ( cd $srcdir && git diff-index $headrev | read dirt ) && PACKAGE_SRC_VERSION="${PACKAGE_SRC_VERSION}-dirty"
23else 24else
24 PACKAGE_SRC_VERSION="$PACKAGE_VERSION" 25 PACKAGE_SRC_VERSION="$PACKAGE_VERSION"
25fi 26fi
26AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) 27AC_MSG_RESULT([$PACKAGE_SRC_VERSION])
27AC_SUBST([PACKAGE_SRC_VERSION]) 28AC_SUBST([PACKAGE_SRC_VERSION])
28AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version]) 29AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version])
29 30
30tr1_mem_std="false" 31tr1_mem_std="false"
31tr1_mem_boost="false" 32tr1_mem_boost="false"
32AC_CHECK_SHAREDPTR(std::tr1,tr1/memory,[ tr1_mem_std=true ]) 33AC_CHECK_SHAREDPTR(std::tr1,tr1/memory,[ tr1_mem_std=true ])
33AC_CHECK_SHAREDPTR(boost,boost/shared_ptr.hpp,[ tr1_mem_boost=true ]) 34AC_CHECK_SHAREDPTR(boost,boost/shared_ptr.hpp,[ tr1_mem_boost=true ])
34tr1_mem="" 35tr1_mem=""
35AC_ARG_WITH([tr1-memory], 36AC_ARG_WITH([tr1-memory],
36 AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]), 37 AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]),
37 [ tr1_mem="$withval" ] 38 [ tr1_mem="$withval" ]
38) 39)
39AC_MSG_CHECKING([for tr1/memory implementation to use]) 40AC_MSG_CHECKING([for tr1/memory implementation to use])
40test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std 41test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std
41test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost 42test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost
42if test -z "$tr1_mem" ; then 43if test -z "$tr1_mem" ; then
43 AC_MSG_RESULT([none found]) 44 AC_MSG_RESULT([none found])
44else 45else
45 AC_MSG_RESULT([$tr1_mem]) 46 AC_MSG_RESULT([$tr1_mem])
46fi 47fi
47case "$tr1_mem" in 48case "$tr1_mem" in
48 std) 49 std)
49 $tr1_mem_std || AC_MSG_ERROR([std implementation requested, but not found]) 50 $tr1_mem_std || AC_MSG_ERROR([std implementation requested, but not found])
50 OPKELE_TR1_MEM_NS=std::tr1 51 OPKELE_TR1_MEM_NS=std::tr1
51 OPKELE_TR1_MEM_HEADER=tr1/memory 52 OPKELE_TR1_MEM_HEADER=tr1/memory
52 ;; 53 ;;
53 boost) 54 boost)
54 $tr1_mem_boost || AC_MSG_ERROR([boost implementation requested, but not found]) 55 $tr1_mem_boost || AC_MSG_ERROR([boost implementation requested, but not found])
55 OPKELE_TR1_MEM_NS=boost 56 OPKELE_TR1_MEM_NS=boost
56 OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp 57 OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp
57 ;; 58 ;;
58 *) 59 *)
59 AC_MSG_ERROR([no shared_ptr<> implementation found]) 60 AC_MSG_ERROR([no shared_ptr<> implementation found])
60 ;; 61 ;;
61esac 62esac
62AC_SUBST([OPKELE_TR1_MEM_NS]) 63AC_SUBST([OPKELE_TR1_MEM_NS])
63AC_SUBST([OPKELE_TR1_MEM_HEADER]) 64AC_SUBST([OPKELE_TR1_MEM_HEADER])
64 65
65AC_MSG_CHECKING([for deprecated attribute support]) 66AC_MSG_CHECKING([for deprecated attribute support])
66AC_COMPILE_IFELSE([ 67AC_COMPILE_IFELSE([
67 int __attribute__((deprecated)) deprecated_function(); 68 int __attribute__((deprecated)) deprecated_function();
68 ],[ 69 ],[
69 AC_MSG_RESULT([yes]) 70 AC_MSG_RESULT([yes])
70 AC_DEFINE([OPKELE_DEPRECATE],[__attribute__((deprecated))],[deprecated function attribute]) 71 AC_DEFINE([OPKELE_DEPRECATE],[__attribute__((deprecated))],[deprecated function attribute])
71 ],[ 72 ],[
72 AC_MSG_RESULT([no]) 73 AC_MSG_RESULT([no])
73 AC_DEFINE([OPKELE_DEPRECATE],,[deprecated function attribute]) 74 AC_DEFINE([OPKELE_DEPRECATE],,[deprecated function attribute])
74 ] 75 ]
75) 76)
76 77
77AC_LANG_PUSH([C++]) 78AC_LANG_PUSH([C++])
78AC_MSG_CHECKING([for abi::__cxa_demangle]) 79AC_MSG_CHECKING([for abi::__cxa_demangle])
79AC_COMPILE_IFELSE([ 80AC_COMPILE_IFELSE([
80 #include <typeinfo> 81 #include <typeinfo>
81 using namespace std; 82 using namespace std;
82 #include <cxxabi.h> 83 #include <cxxabi.h>
83 int main(int c,char **v) { 84 int main(int c,char **v) {
84 int dstat; 85 int dstat;
85 char *demangled = abi::__cxa_demangle(typeid(dstat).name(),0,0,&dstat); 86 char *demangled = abi::__cxa_demangle(typeid(dstat).name(),0,0,&dstat);
86 return 0; 87 return 0;
87 } 88 }
88 ],[ 89 ],[
89 AC_MSG_RESULT([yes]) 90 AC_MSG_RESULT([yes])
90 AC_DEFINE([HAVE_DEMANGLE],,[defined if abi::__cxa_demangle is available]) 91 AC_DEFINE([HAVE_DEMANGLE],,[defined if abi::__cxa_demangle is available])
91 ],[ 92 ],[
92 AC_MSG_RESULT([no]) 93 AC_MSG_RESULT([no])
93 ] 94 ]
94) 95)
95AC_LANG_POP([C++]) 96AC_LANG_POP([C++])
96 97
97 98
98 99
99 100
100PKG_CHECK_MODULES([OPENSSL],[openssl],,[ 101PKG_CHECK_MODULES([OPENSSL],[openssl],,[
101 AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) 102 AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/])
102]) 103])
103 104
104WANT_KONFORKA="yes" 105WANT_KONFORKA="yes"
105AC_ARG_ENABLE([konforka], 106AC_ARG_ENABLE([konforka],
106 AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), 107 AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]),
107 [ 108 [
108 test "${enableval}" = "no" && WANT_KONFORKA="no" 109 test "${enableval}" = "no" && WANT_KONFORKA="no"
109 ] 110 ]
110) 111)
111if test "${WANT_KONFORKA}" = "yes" ; then 112if test "${WANT_KONFORKA}" = "yes" ; then
112 PKG_CHECK_MODULES([KONFORKA],[konforka],[ 113 PKG_CHECK_MODULES([KONFORKA],[konforka],[
113 AC_SUBST([KONFORKA_CFLAGS]) 114 AC_SUBST([KONFORKA_CFLAGS])
114 AC_SUBST([KONFORKA_LIBS]) 115 AC_SUBST([KONFORKA_LIBS])
115 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) 116 AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library])
116 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) 117 AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library])
117 AC_SUBST([KONFORKA_KONFORKA],[konforka]) 118 AC_SUBST([KONFORKA_KONFORKA],[konforka])
118 ],[true]) 119 ],[true])
119fi 120fi
120 121
121WANT_DOXYGEN="yes" 122WANT_DOXYGEN="yes"
122AC_ARG_ENABLE([doxygen], 123AC_ARG_ENABLE([doxygen],
123 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), 124 AC_HELP_STRING([--disable-doxygen],[do not generate documentation]),
124 [ 125 [
125 test "${enableval}" = "no" && WANT_DOXYGEN="no" 126 test "${enableval}" = "no" && WANT_DOXYGEN="no"
126 ] 127 ]
127) 128)
128if test "${WANT_DOXYGEN}" = "yes" ; then 129if test "${WANT_DOXYGEN}" = "yes" ; then
129 AC_WITH_DOXYGEN 130 AC_WITH_DOXYGEN
130 AC_WITH_DOT 131 AC_WITH_DOT
131else 132else
132 AM_CONDITIONAL([HAVE_DOXYGEN],[false]) 133 AM_CONDITIONAL([HAVE_DOXYGEN],[false])
133 AM_CONDITIONAL([HAVE_DOT],[false]) 134 AM_CONDITIONAL([HAVE_DOT],[false])
134fi 135fi
135 136
136LIBCURL_CHECK_CONFIG(,,,[ 137LIBCURL_CHECK_CONFIG(,,,[
137 AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) 138 AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/])
138]) 139])
139 140
140AC_CHECK_HEADER([expat.h],[ 141AC_CHECK_HEADER([expat.h],[
141 AC_CHECK_LIB([expat],[XML_ParserCreate],[ 142 AC_CHECK_LIB([expat],[XML_ParserCreate],[
142 EXPAT_LIBS=-lexpat 143 EXPAT_LIBS=-lexpat
143 EXPAT_CFLAGS= 144 EXPAT_CFLAGS=
144 AC_SUBST([EXPAT_LIBS]) 145 AC_SUBST([EXPAT_LIBS])
145 AC_SUBST([EXPAT_CFLAGS]) 146 AC_SUBST([EXPAT_CFLAGS])
146 ],[ 147 ],[
147 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 148 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
148 ]) 149 ])
149],[ 150],[
150 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) 151 AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/])
151]) 152])
152 153
153AC_CHECK_HEADERS([tidy.h tidy/tidy.h],[ 154AC_CHECK_HEADERS([tidy.h tidy/tidy.h],[
154 AC_CHECK_LIB([tidy],[tidyParseBuffer],[ 155 AC_CHECK_LIB([tidy],[tidyParseBuffer],[
155 TIDY_LIBS=-ltidy 156 TIDY_LIBS=-ltidy
156 TIDY_CFLAGS= 157 TIDY_CFLAGS=
157 AC_SUBST([TIDY_LIBS]) 158 AC_SUBST([TIDY_LIBS])
158 AC_SUBST([TIDY_CFLAGS]) 159 AC_SUBST([TIDY_CFLAGS])
159 ],[ 160 ],[
160 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 161 AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
161 ]) 162 ])
162],[ 163],[
163 test "$ac_header" = "tidy/tidy.h" \ 164 test "$ac_header" = "tidy/tidy.h" \
164 && AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) 165 && AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/])
165]) 166])
166 167
167if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then 168if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then
168 AC_SUBST([PCRE_CFLAGS]) 169 AC_SUBST([PCRE_CFLAGS])
169 AC_SUBST([PCRE_LIBS]) 170 AC_SUBST([PCRE_LIBS])
170 : 171 :
171else 172else
172 PKG_CHECK_MODULES([PCRE],[libpcre],,[ 173 PKG_CHECK_MODULES([PCRE],[libpcre],,[
173 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) 174 AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/])
174 ]) 175 ])
175fi 176fi
176 177
177PKG_CHECK_MODULES([SQLITE3],[sqlite3],[have_sqlite3=true],[have_sqlite3=false]) 178PKG_CHECK_MODULES([SQLITE3],[sqlite3],[have_sqlite3=true],[have_sqlite3=false])
178AM_CONDITIONAL([HAVE_SQLITE3],[$have_sqlite3]) 179AM_CONDITIONAL([HAVE_SQLITE3],[$have_sqlite3])
179PKG_CHECK_MODULES([KINGATE],[kingate-plaincgi],[have_kingate=true],[have_kingate=false]) 180PKG_CHECK_MODULES([KINGATE],[kingate-plaincgi],[have_kingate=true],[have_kingate=false])
180AM_CONDITIONAL([HAVE_KINGATE],[$have_kingate]) 181AM_CONDITIONAL([HAVE_KINGATE],[$have_kingate])
181PKG_CHECK_MODULES([UUID],[uuid],[have_uuid=true],[have_uuid=false]) 182PKG_CHECK_MODULES([UUID],[uuid],[have_uuid=true],[have_uuid=false])
182AM_CONDITIONAL([HAVE_UUID],[$have_uuid]) 183AM_CONDITIONAL([HAVE_UUID],[$have_uuid])
183if $have_uuid ; then 184if $have_uuid ; then
184 AC_DEFINE([HAVE_LIBUUID],,[defined in presence of libuuid]) 185 AC_DEFINE([HAVE_LIBUUID],,[defined in presence of libuuid])
185 AC_SUBST([UUID_UUID],[uuid]) 186 AC_SUBST([UUID_UUID],[uuid])
186fi 187fi
187 188
188curl_ssl_verify_host="true" 189curl_ssl_verify_host="true"
189AC_ARG_ENABLE([ssl-verify-host], 190AC_ARG_ENABLE([ssl-verify-host],
190 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), 191 AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]),
191 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] 192 [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ]
192) 193)
193${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) 194${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host])
194 195
195curl_ssl_verify_peer="true" 196curl_ssl_verify_peer="true"