summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/configure.ac
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-30 08:36:59 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-11-30 08:36:59 +0000
commit0b9d0491fe4fb19c8d2f269c805d0b022ca157f4 (patch)
tree4c7a7cc35ad96f6a412eca9a1089ed0120ad2039 /sca-cpp/trunk/configure.ac
parentff124040623879bc48a0ba5cf06a841642adef53 (diff)
More build improvements, added a configure option to turn on debugging and profiling, fixed compile and link options to support multithreading where applicable, moved non-building tools to contrib, and adjusted the top readmes and build instructions.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@885350 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-cpp/trunk/configure.ac')
-rw-r--r--sca-cpp/trunk/configure.ac26
1 files changed, 22 insertions, 4 deletions
diff --git a/sca-cpp/trunk/configure.ac b/sca-cpp/trunk/configure.ac
index 32b7e055fc..ada22c92e7 100644
--- a/sca-cpp/trunk/configure.ac
+++ b/sca-cpp/trunk/configure.ac
@@ -158,7 +158,25 @@ AC_MSG_NOTICE([checking for library functions])
AC_CHECK_FUNCS([gettimeofday select])
# Configure GCC C++ compile options
-AC_SUBST([CXXFLAGS], ["${CXXFLAGS} -D_DEBUG -O0 -g3 -Wall -std=c++0x -fmessage-length=0"])
+# Configure debugging, profiling and compile-time warnings
+AC_MSG_CHECKING([whether to compile for debugging and profiling])
+AC_ARG_ENABLE(maintainer-mode, [AS_HELP_STRING([--enable-maintainer-mode], [compile for debugging and profiling [default=no]])],
+[ case "${enableval}" in
+ no)
+ AC_MSG_RESULT(no)
+ ;;
+ *)
+ AC_MSG_RESULT(yes)
+ want_maintainer_mode=true
+ ;;
+ esac ],
+[ AC_MSG_RESULT(no)])
+if test "$want_maintainer_mode" = "true"; then
+ AC_SUBST([CXXFLAGS], ["-D_DEBUG -O0 -g3 -pg -Wall -Wextra -Wno-ignored-qualifiers -Winit-self -Wmissing-include-dirs -Wcast-qual -Wcast-align -Wwrite-strings -Wpointer-arith -Wconversion -Waddress -Wlogical-op -Wredundant-decls -std=c++0x -fmessage-length=0"])
+ AC_SUBST([LDFLAGS], ["${LDFLAGS} -pg"])
+else
+ AC_SUBST([CXXFLAGS], ["-O3 -std=c++0x -fmessage-length=0"])
+fi
# Configure exuberant ctags
TAGSFILE="`pwd`/tags"
@@ -166,7 +184,7 @@ AC_SUBST([CTAGSFLAGS], ["${CTAGSFLAGS} --c++-kinds=+p --fields=+iaS --extra=+q -
# Configure TUSCANY_SCACPP
TUSCANY_SCACPP=`echo "$TUSCANY_SCACPP"`
-if test "x$TUSCANY_SCACPP" = "x"; then
+if test "$TUSCANY_SCACPP" = ""; then
SCAPWD=`pwd`
AC_SUBST([TUSCANY_SCACPP], ["$SCAPWD"])
fi
@@ -181,14 +199,14 @@ AC_ARG_ENABLE(doxygen, [AS_HELP_STRING([--enable-doxygen], [build Doxygen docume
*)
AC_MSG_RESULT(yes)
AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
- if test x$DOXYGEN = x; then
+ if test "$DOXYGEN" = ""; then
AC_MSG_ERROR([could not find doxygen])
fi
want_doxygen=true
;;
esac ],
[ AC_MSG_RESULT(no)])
-AM_CONDITIONAL([WANT_DOXYGEN], [test x$want_doxygen = xtrue])
+AM_CONDITIONAL([WANT_DOXYGEN], [test "$want_doxygen" = "true"])
AC_CONFIG_FILES([Makefile
kernel/Makefile