aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <petsku@petteriraty.eu>2011-03-26 00:15:04 +0200
committerPetteri Räty <petsku@petteriraty.eu>2011-03-26 00:15:04 +0200
commite31a500017b0d2f30dd7f2bb35e0996f02aae817 (patch)
treeb00fbde54948ee0ad7e7b6ff0aed0fb7bdf42975 /configure.ac
parentUpdate ANTLR options and handling (diff)
downloadlibbash-e31a500017b0d2f30dd7f2bb35e0996f02aae817.tar.gz
libbash-e31a500017b0d2f30dd7f2bb35e0996f02aae817.tar.bz2
libbash-e31a500017b0d2f30dd7f2bb35e0996f02aae817.zip
Add developer option to autotools
When you give --enable-developer to configure sources get built with -Wall -Werror. In this case boost 1.45 seems to give errors so boost 1.46.1 is marked as the needed version.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac8
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 045fb49..27276fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,13 @@ AC_INIT([libbash],[0.1],[powerofazure@gmail.com])
AM_INIT_AUTOMAKE([foreign parallel-tests color-tests subdir-objects])
AC_PROG_CXX
LT_INIT
-AX_BOOST_BASE(1.43.0,[:],[AC_MSG_ERROR([Needed boost not found])])
+
+AC_ARG_ENABLE([developer],
+ [AS_HELP_STRING([--enable-developer],[makes compiler warnings errors])],
+ [AS_IF([test "x$enable_developer" != xno],[AC_SUBST(DEVELOPER_FLAGS,["-Wall -Werror"])]]))
+AS_IF([test "x$enable_developer" != xno],[boost_version="1.46.1"],[boost_version="1.43.0"])
+AX_BOOST_BASE([$boost_version],[:],
+ [AC_MSG_ERROR([Needed boost not found])])
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AC_PATH_PROG([JAVA],[java],"no")