From: cantor Date: Fri, 7 May 2004 05:26:02 +0000 (+0000) Subject: Add debug option X-Git-Tag: 2.4~1789 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=commitdiff_plain;h=2beb79b967f31c51c2c5ecc1a9e89cb8b43b2e01 Add debug option git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1089 cb58f699-b61c-0410-a6fe-9272a202ed29 --- diff --git a/configure.ac b/configure.ac index 1004527..4597327 100644 --- a/configure.ac +++ b/configure.ac @@ -6,6 +6,19 @@ AM_INIT_AUTOMAKE(shibboleth, 1.2) sinclude(acx_pthread.m4) sinclude(acx_rpctest.m4) +AC_ARG_ENABLE(debug, + AC_HELP_STRING(--enable-debug, + [Compile a version of the library with symbols (Default = no)]), + enable_debug=$enableval, enable_debug=no) + +if test "$enable_debug" = "yes" ; then + CFLAGS="$CFLAGS -g -D_DEBUG" + CXXFLAGS="$CXXFLAGS -g -D_DEBUG" +else + CFLAGS="$CFLAGS -O2 -DNDEBUG" + CXXFLAGS="$CXXFLAGS -O2 -DNDEBUG" +fi + AC_PROG_CC([gcc3 gcc cc]) AC_PROG_CXX([g++3 g++ c++ CC]) AC_DISABLE_STATIC