summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2008-01-01 14:08:05 (UTC)
committer Michael Krelin <hacker@klever.net>2008-01-04 18:23:51 (UTC)
commit15d089da9f7682bc3524b6a278cfcd64621e7db2 (patch) (unidiff)
tree065c437d9de7d9fe33e60cd825d2e2475f7e9f8b
parent9e46475efea0f61bc588221d21d0d749c4eb7ab1 (diff)
downloadlibopkele-15d089da9f7682bc3524b6a278cfcd64621e7db2.zip
libopkele-15d089da9f7682bc3524b6a278cfcd64621e7db2.tar.gz
libopkele-15d089da9f7682bc3524b6a278cfcd64621e7db2.tar.bz2
configurable -DNDEBUG
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configure.ac12
-rw-r--r--lib/Makefile.am1
-rw-r--r--test/Makefile.am1
3 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 9ad9710..51bacd5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,43 +144,55 @@ AC_ARG_ENABLE([postels-law],
144 [ test "${enableval}" = "no" && postels_law=false ] 144 [ test "${enableval}" = "no" && postels_law=false ]
145) 145)
146$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])
147 147
148AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory]) 148AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory])
149 149
150nitpick=false 150nitpick=false
151AC_ARG_ENABLE([nitpicking], 151AC_ARG_ENABLE([nitpicking],
152 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]),
153 [ test "$enableval" = "no" || nitpick=true ] 153 [ test "$enableval" = "no" || nitpick=true ]
154) 154)
155if $nitpick ; then 155if $nitpick ; then
156 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \ 156 CPP_NITPICK="-pedantic -Wall -Wextra -Wundef -Wshadow \
157 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \ 157 -Wunsafe-loop-optimizations -Wconversion -Wmissing-format-attribute \
158 -Wredundant-decls -ansi" 158 -Wredundant-decls -ansi"
159 # -Wlogical-op -Wmissing-noreturn 159 # -Wlogical-op -Wmissing-noreturn
160 C_NITPICK="$CPP_NITPICK" 160 C_NITPICK="$CPP_NITPICK"
161 CXX_NITPICK="$C_NITPICK" 161 CXX_NITPICK="$C_NITPICK"
162 162
163 CPPFLAGS="$CPPFLAGS $CPP_NITPICK" 163 CPPFLAGS="$CPPFLAGS $CPP_NITPICK"
164 CFLAGS="$CFLAGS $C_NITPICK" 164 CFLAGS="$CFLAGS $C_NITPICK"
165 CXXFLAGS="$CXXFLAGS $CXX_NITPICK" 165 CXXFLAGS="$CXXFLAGS $CXX_NITPICK"
166fi 166fi
167 167
168ndebug=true
169AC_ARG_ENABLE([debug],
170 AC_HELP_STRING([--enable-debug],[enable debugging code]),
171 [ test "$enableval" = "no" || ndebug=false ]
172)
173if $ndebug ; then
174 CPPFLAGS_DEBUG="-DNDEBUG"
175else
176 CPPFLAGS_DEBUG=""
177fi
178AC_SUBST([CPPFLAGS_DEBUG])
179
168xri_proxy_url="http://beta.xri.net/" 180xri_proxy_url="http://beta.xri.net/"
169AC_MSG_CHECKING([for XRI resolver proxy]) 181AC_MSG_CHECKING([for XRI resolver proxy])
170AC_ARG_ENABLE([xri-proxy], 182AC_ARG_ENABLE([xri-proxy],
171 AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is http://xr_proxy_url]), 183 AC_HELP_STRING([--with-xri-proxy=url],[set xri proxy for use when resolving xri identities, default is http://xr_proxy_url]),
172 [ xri_proxy_url="$withval" ] 184 [ xri_proxy_url="$withval" ]
173) 185)
174AC_MSG_RESULT([$xri_proxy_url]) 186AC_MSG_RESULT([$xri_proxy_url])
175AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL]) 187AC_DEFINE_UNQUOTED([XRI_PROXY_URL],["$xri_proxy_url"],[XRI proxy resolver URL])
176 188
177AC_CONFIG_FILES([ 189AC_CONFIG_FILES([
178 Makefile 190 Makefile
179 libopkele.pc 191 libopkele.pc
180 Doxyfile 192 Doxyfile
181 include/Makefile 193 include/Makefile
182 include/opkele/tr1-mem.h 194 include/opkele/tr1-mem.h
183 lib/Makefile 195 lib/Makefile
184 test/Makefile 196 test/Makefile
185]) 197])
186AC_OUTPUT 198AC_OUTPUT
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 185411f..9c73e96 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,26 +1,27 @@
1lib_LTLIBRARIES = libopkele.la 1lib_LTLIBRARIES = libopkele.la
2 2
3AM_CPPFLAGS = ${CPPFLAGS_DEBUG}
3DEFAULT_INCLUDES = -I${top_builddir} 4DEFAULT_INCLUDES = -I${top_builddir}
4INCLUDES = \ 5INCLUDES = \
5 -I${top_srcdir}/include/ \ 6 -I${top_srcdir}/include/ \
6 ${KONFORKA_CFLAGS} \ 7 ${KONFORKA_CFLAGS} \
7 ${OPENSSL_CFLAGS} \ 8 ${OPENSSL_CFLAGS} \
8 ${LIBCURL_CPPFLAGS} \ 9 ${LIBCURL_CPPFLAGS} \
9 ${PCRE_CFLAGS} ${EXPAT_CFLAGS} 10 ${PCRE_CFLAGS} ${EXPAT_CFLAGS}
10libopkele_la_LIBADD = \ 11libopkele_la_LIBADD = \
11 ${LIBCURL} \ 12 ${LIBCURL} \
12 ${PCRE_LIBS} ${EXPAT_LIBS} \ 13 ${PCRE_LIBS} ${EXPAT_LIBS} \
13 ${OPENSSL_LIBS} \ 14 ${OPENSSL_LIBS} \
14 ${KONFORKA_LIBS} 15 ${KONFORKA_LIBS}
15 16
16libopkele_la_SOURCES = \ 17libopkele_la_SOURCES = \
17 params.cc \ 18 params.cc \
18 util.cc \ 19 util.cc \
19 server.cc \ 20 server.cc \
20 secret.cc \ 21 secret.cc \
21 data.cc \ 22 data.cc \
22 consumer.cc \ 23 consumer.cc \
23 exception.cc \ 24 exception.cc \
24 extension.cc \ 25 extension.cc \
25 sreg.cc \ 26 sreg.cc \
26 extension_chain.cc \ 27 extension_chain.cc \
diff --git a/test/Makefile.am b/test/Makefile.am
index 13c4cd2..bacaafa 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1,15 +1,16 @@
1noinst_PROGRAMS = test idiscover 1noinst_PROGRAMS = test idiscover
2 2
3AM_CPPFLAGS=${CPPFLAGS_DEBUG}
3DEFAULT_INCLUDES = -I${top_builddir} 4DEFAULT_INCLUDES = -I${top_builddir}
4INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS} 5INCLUDES = -I${top_srcdir}/include/ ${KONFORKA_CFLAGS}
5 6
6test_SOURCES = test.cc 7test_SOURCES = test.cc
7test_LDADD = ${top_builddir}/lib/libopkele.la 8test_LDADD = ${top_builddir}/lib/libopkele.la
8 9
9EXTRA_DIST=$(addsuffix .html,$(addprefix html/, \ 10EXTRA_DIST=$(addsuffix .html,$(addprefix html/, \
10 empty head-in-body hkn-delegate hkn-server hkn in-body \ 11 empty head-in-body hkn-delegate hkn-server hkn in-body \
11 unclosed-head spaced-links spaced-link-attrs 2rels \ 12 unclosed-head spaced-links spaced-link-attrs 2rels \
12 )) 13 ))
13 14
14idiscover_SOURCES = idiscover.cc 15idiscover_SOURCES = idiscover.cc
15idiscover_LDADD = ${top_builddir}/lib/libopkele.la 16idiscover_LDADD = ${top_builddir}/lib/libopkele.la