-rw-r--r-- | configure.ac | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 48a5efb..c28141c 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -26,6 +26,41 @@ AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) | |||
26 | AC_SUBST([PACKAGE_SRC_VERSION]) | 26 | AC_SUBST([PACKAGE_SRC_VERSION]) |
27 | AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version]) | 27 | AC_DEFINE_UNQUOTED([PACKAGE_SRC_VERSION],["$PACKAGE_SRC_VERSION"],[more or less precise source tree version]) |
28 | 28 | ||
29 | tr1_mem_std="false" | ||
30 | tr1_mem_boost="false" | ||
31 | AC_CHECK_SHAREDPTR(std::tr1,tr1/memory,[ tr1_mem_std=true ]) | ||
32 | AC_CHECK_SHAREDPTR(boost,boost/shared_ptr.hpp,[ tr1_mem_boost=true ]) | ||
33 | tr1_mem="" | ||
34 | AC_ARG_WITH([tr1-memory], | ||
35 | AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]), | ||
36 | [ tr1_mem="$withval" ] | ||
37 | ) | ||
38 | AC_MSG_CHECKING([for tr1/memory implementation to use]) | ||
39 | test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std | ||
40 | test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost | ||
41 | if test -z "$tr1_mem" ; then | ||
42 | AC_MSG_RESULT([none found]) | ||
43 | else | ||
44 | AC_MSG_RESULT([$tr1_mem]) | ||
45 | fi | ||
46 | case "$tr1_mem" in | ||
47 | std) | ||
48 | $tr1_mem_std || AC_MSG_ERROR([std implementation requested, but not found]) | ||
49 | OPKELE_TR1_MEM_NS=std::tr1 | ||
50 | OPKELE_TR1_MEM_HEADER=tr1/memory | ||
51 | ;; | ||
52 | boost) | ||
53 | $tr1_mem_boost || AC_MSG_ERROR([boost implementation requested, but not found]) | ||
54 | OPKELE_TR1_MEM_NS=boost | ||
55 | OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp | ||
56 | ;; | ||
57 | *) | ||
58 | AC_MSG_ERROR([no shared_ptr<> implementation found]) | ||
59 | ;; | ||
60 | esac | ||
61 | AC_SUBST([OPKELE_TR1_MEM_NS]) | ||
62 | AC_SUBST([OPKELE_TR1_MEM_HEADER]) | ||
63 | |||
29 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ | 64 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ |
30 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) | 65 | AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/]) |
31 | ]) | 66 | ]) |
@@ -66,6 +101,32 @@ LIBCURL_CHECK_CONFIG(,,,[ | |||
66 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) | 101 | AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/]) |
67 | ]) | 102 | ]) |
68 | 103 | ||
104 | AC_CHECK_HEADER([expat.h],[ | ||
105 | AC_CHECK_LIB([expat],[XML_ParserCreate],[ | ||
106 | EXPAT_LIBS=-lexpat | ||
107 | EXPAT_CFLAGS= | ||
108 | AC_SUBST([EXPAT_LIBS]) | ||
109 | AC_SUBST([EXPAT_CFLAGS]) | ||
110 | ],[ | ||
111 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | ||
112 | ]) | ||
113 | ],[ | ||
114 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | ||
115 | ]) | ||
116 | |||
117 | AC_CHECK_HEADER([tidy.h],[ | ||
118 | AC_CHECK_LIB([tidy],[tidyParseBuffer],[ | ||
119 | TIDY_LIBS=-ltidy | ||
120 | TIDY_CFLAGS= | ||
121 | AC_SUBST([TIDY_LIBS]) | ||
122 | AC_SUBST([TIDY_CFLAGS]) | ||
123 | ],[ | ||
124 | AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) | ||
125 | ]) | ||
126 | ],[ | ||
127 | AC_MSG_ERROR([no required htmltidy library found. get one from http://tidy.sourceforge.net/]) | ||
128 | ]) | ||
129 | |||
69 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then | 130 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then |
70 | AC_SUBST([PCRE_CFLAGS]) | 131 | AC_SUBST([PCRE_CFLAGS]) |
71 | AC_SUBST([PCRE_LIBS]) | 132 | AC_SUBST([PCRE_LIBS]) |
@@ -117,11 +178,33 @@ if $nitpick ; then | |||
117 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" | 178 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" |
118 | fi | 179 | fi |
119 | 180 | ||
181 | ndebug=true | ||
182 | AC_ARG_ENABLE([debug], | ||
183 | AC_HELP_STRING([--enable-debug],[enable debugging code]), | ||
184 | [ test "$enableval" = "no" || ndebug=false ] | ||
185 | ) | ||
186 | if $ndebug ; then | ||
187 | CPPFLAGS_DEBUG="-DNDEBUG" | ||
188 | else | ||
189 | CPPFLAGS_DEBUG="" | ||
190 | fi | ||
191 | AC_SUBST([CPPFLAGS_DEBUG]) | ||
192 | |||
193 | xri_proxy_url="http://beta.xri.net/" | ||
194 | AC_MSG_CHECKING([for XRI resolver proxy]) | ||
195 | AC_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]), | ||
197 | [ xri_proxy_url="$withval" ] | ||
198 | ) | ||
199 | AC_MSG_RESULT([$xri_proxy_url]) | ||
200 | AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL]) | ||
201 | |||
120 | AC_CONFIG_FILES([ | 202 | AC_CONFIG_FILES([ |
121 | Makefile | 203 | Makefile |
122 | libopkele.pc | 204 | libopkele.pc |
123 | Doxyfile | 205 | Doxyfile |
124 | include/Makefile | 206 | include/Makefile |
207 | include/opkele/tr1-mem.h | ||
125 | lib/Makefile | 208 | lib/Makefile |
126 | test/Makefile | 209 | test/Makefile |
127 | ]) | 210 | ]) |