author | Michael Krelin <hacker@klever.net> | 2007-12-27 00:23:57 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2008-01-04 18:18:06 (UTC) |
commit | 2e8d7f2a65518ec6cb50166771dac8ca41c7304e (patch) (unidiff) | |
tree | 28feefd75292f990f529b31c9c4f45b745bb9c1d | |
parent | 3802b70edcf11533e8a768c10086765558f79a64 (diff) | |
download | libopkele-2e8d7f2a65518ec6cb50166771dac8ca41c7304e.zip libopkele-2e8d7f2a65518ec6cb50166771dac8ca41c7304e.tar.gz libopkele-2e8d7f2a65518ec6cb50166771dac8ca41c7304e.tar.bz2 |
trying to make it report tr1/memory found nicely
Signed-off-by: Michael Krelin <hacker@klever.net>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index c4e9a74..9ad9710 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,182 +1,186 @@ | |||
1 | AC_INIT([libopkele], [0.4], [libopkele-bugs@klever.net]) | 1 | AC_INIT([libopkele], [0.4], [libopkele-bugs@klever.net]) |
2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) | 2 | AC_CONFIG_SRCDIR([include/opkele/opkele-config.h]) |
3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) | 3 | AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h]) |
4 | AM_INIT_AUTOMAKE([dist-bzip2]) | 4 | AM_INIT_AUTOMAKE([dist-bzip2]) |
5 | 5 | ||
6 | AC_PROG_INSTALL | 6 | AC_PROG_INSTALL |
7 | AC_PROG_CXX | 7 | AC_PROG_CXX |
8 | AC_PROG_CC | 8 | AC_PROG_CC |
9 | AC_PROG_LIBTOOL | 9 | AC_PROG_LIBTOOL |
10 | PKG_PROG_PKG_CONFIG | 10 | PKG_PROG_PKG_CONFIG |
11 | 11 | ||
12 | AC_HEADER_STDC | 12 | AC_HEADER_STDC |
13 | 13 | ||
14 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) | 14 | AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) |
15 | 15 | ||
16 | AC_MSG_CHECKING([for source tree version]) | 16 | AC_MSG_CHECKING([for source tree version]) |
17 | if headrev=$(cd $srcdir && git rev-parse --verify HEAD 2>/dev/null) ; then | 17 | if 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" |
22 | else | 22 | else |
23 | PACKAGE_SRC_VERSION="$PACKAGE_VERSION" | 23 | PACKAGE_SRC_VERSION="$PACKAGE_VERSION" |
24 | fi | 24 | fi |
25 | AC_MSG_RESULT([$PACKAGE_SRC_VERSION]) | 25 | 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" | 29 | tr1_mem_std="false" |
30 | tr1_mem_boost="false" | 30 | tr1_mem_boost="false" |
31 | AC_CHECK_SHAREDPTR(std::tr1,tr1/memory,[ tr1_mem_std=true ]) | 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 ]) | 32 | AC_CHECK_SHAREDPTR(boost,boost/shared_ptr.hpp,[ tr1_mem_boost=true ]) |
33 | tr1_mem="" | 33 | tr1_mem="" |
34 | AC_ARG_WITH([tr1-memory], | 34 | AC_ARG_WITH([tr1-memory], |
35 | AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]), | 35 | AC_HELP_STRING([--with-tr1-memory=<boost|std>],[select tr1/memory (shared_ptr<>) implementation to use]), |
36 | [ tr1_mem="$withval" ] | 36 | [ tr1_mem="$withval" ] |
37 | ) | 37 | ) |
38 | AC_MSG_CHECKING([for tr1/memory implementation to use]) | 38 | AC_MSG_CHECKING([for tr1/memory implementation to use]) |
39 | test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std | 39 | test -z "$tr1_mem" && $tr1_mem_std && tr1_mem=std |
40 | test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost | 40 | test -z "$tr1_mem" && $tr1_mem_boost && tr1_mem=boost |
41 | test -z "$tr1_mem" && AC_MSG_RESULT([none found]) || AC_MSG_RESULT([$tr1_mem]) | 41 | if test -z "$tr1_mem" ; then |
42 | AC_MSG_RESULT([none found]) | ||
43 | else | ||
44 | AC_MSG_RESULT([$tr1_mem]) | ||
45 | fi | ||
42 | case "$tr1_mem" in | 46 | case "$tr1_mem" in |
43 | std) | 47 | std) |
44 | $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]) |
45 | OPKELE_TR1_MEM_NS=std::tr1 | 49 | OPKELE_TR1_MEM_NS=std::tr1 |
46 | OPKELE_TR1_MEM_HEADER=tr1/memory | 50 | OPKELE_TR1_MEM_HEADER=tr1/memory |
47 | ;; | 51 | ;; |
48 | boost) | 52 | boost) |
49 | $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]) |
50 | OPKELE_TR1_MEM_NS=boost | 54 | OPKELE_TR1_MEM_NS=boost |
51 | OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp | 55 | OPKELE_TR1_MEM_HEADER=boost/shared_ptr.hpp |
52 | ;; | 56 | ;; |
53 | *) | 57 | *) |
54 | AC_MSG_ERROR([no shared_ptr<> implementation found]) | 58 | AC_MSG_ERROR([no shared_ptr<> implementation found]) |
55 | ;; | 59 | ;; |
56 | esac | 60 | esac |
57 | AC_SUBST([OPKELE_TR1_MEM_NS]) | 61 | AC_SUBST([OPKELE_TR1_MEM_NS]) |
58 | AC_SUBST([OPKELE_TR1_MEM_HEADER]) | 62 | AC_SUBST([OPKELE_TR1_MEM_HEADER]) |
59 | 63 | ||
60 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ | 64 | PKG_CHECK_MODULES([OPENSSL],[openssl],,[ |
61 | 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/]) |
62 | ]) | 66 | ]) |
63 | 67 | ||
64 | WANT_KONFORKA="yes" | 68 | WANT_KONFORKA="yes" |
65 | AC_ARG_ENABLE([konforka], | 69 | AC_ARG_ENABLE([konforka], |
66 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), | 70 | AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]), |
67 | [ | 71 | [ |
68 | test "${enableval}" = "no" && WANT_KONFORKA="no" | 72 | test "${enableval}" = "no" && WANT_KONFORKA="no" |
69 | ] | 73 | ] |
70 | ) | 74 | ) |
71 | if test "${WANT_KONFORKA}" = "yes" ; then | 75 | if test "${WANT_KONFORKA}" = "yes" ; then |
72 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ | 76 | PKG_CHECK_MODULES([KONFORKA],[konforka],[ |
73 | AC_SUBST([KONFORKA_CFLAGS]) | 77 | AC_SUBST([KONFORKA_CFLAGS]) |
74 | AC_SUBST([KONFORKA_LIBS]) | 78 | AC_SUBST([KONFORKA_LIBS]) |
75 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) | 79 | AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library]) |
76 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) | 80 | AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library]) |
77 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) | 81 | AC_SUBST([KONFORKA_KONFORKA],[konforka]) |
78 | ],[true]) | 82 | ],[true]) |
79 | fi | 83 | fi |
80 | 84 | ||
81 | WANT_DOXYGEN="yes" | 85 | WANT_DOXYGEN="yes" |
82 | AC_ARG_ENABLE([doxygen], | 86 | AC_ARG_ENABLE([doxygen], |
83 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), | 87 | AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), |
84 | [ | 88 | [ |
85 | test "${enableval}" = "no" && WANT_DOXYGEN="no" | 89 | test "${enableval}" = "no" && WANT_DOXYGEN="no" |
86 | ] | 90 | ] |
87 | ) | 91 | ) |
88 | if test "${WANT_DOXYGEN}" = "yes" ; then | 92 | if test "${WANT_DOXYGEN}" = "yes" ; then |
89 | AC_WITH_DOXYGEN | 93 | AC_WITH_DOXYGEN |
90 | AC_WITH_DOT | 94 | AC_WITH_DOT |
91 | else | 95 | else |
92 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) | 96 | AM_CONDITIONAL([HAVE_DOXYGEN],[false]) |
93 | AM_CONDITIONAL([HAVE_DOT],[false]) | 97 | AM_CONDITIONAL([HAVE_DOT],[false]) |
94 | fi | 98 | fi |
95 | 99 | ||
96 | LIBCURL_CHECK_CONFIG(,,,[ | 100 | LIBCURL_CHECK_CONFIG(,,,[ |
97 | 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/]) |
98 | ]) | 102 | ]) |
99 | 103 | ||
100 | AC_CHECK_HEADER([expat.h],[ | 104 | AC_CHECK_HEADER([expat.h],[ |
101 | AC_CHECK_LIB([expat],[XML_ParserCreate],[ | 105 | AC_CHECK_LIB([expat],[XML_ParserCreate],[ |
102 | EXPAT_LIBS=-lexpat | 106 | EXPAT_LIBS=-lexpat |
103 | EXPAT_CFLAGS= | 107 | EXPAT_CFLAGS= |
104 | AC_SUBST([EXPAT_LIBS]) | 108 | AC_SUBST([EXPAT_LIBS]) |
105 | AC_SUBST([EXPAT_CFLAGS]) | 109 | AC_SUBST([EXPAT_CFLAGS]) |
106 | ],[ | 110 | ],[ |
107 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | 111 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) |
108 | ]) | 112 | ]) |
109 | ],[ | 113 | ],[ |
110 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) | 114 | AC_MSG_ERROR([no required expat library. get one from http://expat.sourceforge.net/]) |
111 | ]) | 115 | ]) |
112 | 116 | ||
113 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then | 117 | if test -n "$PCRE_LIBS" -a -n "$PCRE_CFLAGS" ; then |
114 | AC_SUBST([PCRE_CFLAGS]) | 118 | AC_SUBST([PCRE_CFLAGS]) |
115 | AC_SUBST([PCRE_LIBS]) | 119 | AC_SUBST([PCRE_LIBS]) |
116 | : | 120 | : |
117 | else | 121 | else |
118 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ | 122 | PKG_CHECK_MODULES([PCRE],[libpcre],,[ |
119 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) | 123 | AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/]) |
120 | ]) | 124 | ]) |
121 | fi | 125 | fi |
122 | 126 | ||
123 | curl_ssl_verify_host="true" | 127 | curl_ssl_verify_host="true" |
124 | AC_ARG_ENABLE([ssl-verify-host], | 128 | AC_ARG_ENABLE([ssl-verify-host], |
125 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), | 129 | AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]), |
126 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] | 130 | [ test "${enableval}" = "no" && curl_ssl_verify_host="false" ] |
127 | ) | 131 | ) |
128 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) | 132 | ${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host]) |
129 | 133 | ||
130 | curl_ssl_verify_peer="true" | 134 | curl_ssl_verify_peer="true" |
131 | AC_ARG_ENABLE([ssl-verify-peer], | 135 | AC_ARG_ENABLE([ssl-verify-peer], |
132 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), | 136 | AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]), |
133 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] | 137 | [ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ] |
134 | ) | 138 | ) |
135 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) | 139 | ${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity]) |
136 | 140 | ||
137 | postels_law=true | 141 | postels_law=true |
138 | AC_ARG_ENABLE([postels-law], | 142 | AC_ARG_ENABLE([postels-law], |
139 | 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)]), | 143 | 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)]), |
140 | [ test "${enableval}" = "no" && postels_law=false ] | 144 | [ test "${enableval}" = "no" && postels_law=false ] |
141 | ) | 145 | ) |
142 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) | 146 | $postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law]) |
143 | 147 | ||
144 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) | 148 | AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) |
145 | 149 | ||
146 | nitpick=false | 150 | nitpick=false |
147 | AC_ARG_ENABLE([nitpicking], | 151 | AC_ARG_ENABLE([nitpicking], |
148 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), | 152 | AC_HELP_STRING([--enable-nitpicking],[make compiler somewhat overly fastidious about the code it deals with]), |
149 | [ test "$enableval" = "no" || nitpick=true ] | 153 | [ test "$enableval" = "no" || nitpick=true ] |
150 | ) | 154 | ) |
151 | if $nitpick ; then | 155 | if $nitpick ; then |
152 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ | 156 | CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ |
153 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ | 157 | -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ |
154 | -Wredundant-decls -ansi" | 158 | -Wredundant-decls -ansi" |
155 | # -Wlogical-op -Wmissing-noreturn | 159 | # -Wlogical-op -Wmissing-noreturn |
156 | C_NITPICK="$CPP_NITPICK" | 160 | C_NITPICK="$CPP_NITPICK" |
157 | CXX_NITPICK="$C_NITPICK" | 161 | CXX_NITPICK="$C_NITPICK" |
158 | 162 | ||
159 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" | 163 | CPPFLAGS="$CPPFLAGS $CPP_NITPICK" |
160 | CFLAGS="$CFLAGS $C_NITPICK" | 164 | CFLAGS="$CFLAGS $C_NITPICK" |
161 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" | 165 | CXXFLAGS="$CXXFLAGS $CXX_NITPICK" |
162 | fi | 166 | fi |
163 | 167 | ||
164 | xri_proxy_url="http://beta.xri.net/" | 168 | xri_proxy_url="http://beta.xri.net/" |
165 | AC_MSG_CHECKING([for XRI resolver proxy]) | 169 | AC_MSG_CHECKING([for XRI resolver proxy]) |
166 | AC_ARG_ENABLE([xri-proxy], | 170 | AC_ARG_ENABLE([xri-proxy], |
167 | AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is http://xr_proxy_url]), | 171 | AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is http://xr_proxy_url]), |
168 | [ xri_proxy_url="$withval" ] | 172 | [ xri_proxy_url="$withval" ] |
169 | ) | 173 | ) |
170 | AC_MSG_RESULT([$xri_proxy_url]) | 174 | AC_MSG_RESULT([$xri_proxy_url]) |
171 | AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL]) | 175 | AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL]) |
172 | 176 | ||
173 | AC_CONFIG_FILES([ | 177 | AC_CONFIG_FILES([ |
174 | Makefile | 178 | Makefile |
175 | libopkele.pc | 179 | libopkele.pc |
176 | Doxyfile | 180 | Doxyfile |
177 | include/Makefile | 181 | include/Makefile |
178 | include/opkele/tr1-mem.h | 182 | include/opkele/tr1-mem.h |
179 | lib/Makefile | 183 | lib/Makefile |
180 | test/Makefile | 184 | test/Makefile |
181 | ]) | 185 | ]) |
182 | AC_OUTPUT | 186 | AC_OUTPUT |