From 7f5f2f7480d7c86ddd0acd6d5b27009a10baac78 Mon Sep 17 00:00:00 2001 From: darkeye Date: Mon, 5 Jan 2004 12:00:20 +0000 Subject: [PATCH] added --with-debug configure option --- darkice/trunk/configure.in | 18 +++++++++++++++++- darkice/trunk/src/Makefile.am | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/darkice/trunk/configure.in b/darkice/trunk/configure.in index 30b27bb..42a7234 100644 --- a/darkice/trunk/configure.in +++ b/darkice/trunk/configure.in @@ -99,7 +99,7 @@ if test "x${USE_VORBIS}" = "xyes" ; then AC_DEFINE( HAVE_VORBIS_LIB, 1, [build with Ogg Vorbis library] ) if test "x${OGG_INC_LOC}" != "x${SYSTEM_INCLUDE}" ; then - LAME_INCFLAGS="-I${OGG_INC_LOC}" + VORBIS_INCFLAGS="-I${OGG_INC_LOC}" fi VORBIS_LDFLAGS="-L${OGG_LIB_LOC} -logg -lvorbis -lvorbisenc" AC_MSG_RESULT( [found at ${CONFIG_VORBIS_PREFIX}] ) @@ -135,6 +135,22 @@ AC_TRY_COMPILE([#include ], [ ]) +dnl----------------------------------------------------------------------------- +dnl enable compilation with debug flags +dnl----------------------------------------------------------------------------- +AC_SUBST( DEBUG_CXXFLAGS) + +AC_ARG_WITH( debug, +[ --with-debug enable debug mode [no] ], + USE_DEBUG=${withval}, USE_DEBUG="no" ) + +if test "x${USE_DEBUG}" == "xyes" ; then + DEBUG_CXXFLAGS="-g" + AC_MSG_RESULT([compiling in debug mode]) +else + AC_MSG_RESULT([not compiling in debug mode]) +fi + AC_OUTPUT(Makefile src/Makefile man/Makefile) diff --git a/darkice/trunk/src/Makefile.am b/darkice/trunk/src/Makefile.am index 41ff71b..cebd010 100644 --- a/darkice/trunk/src/Makefile.am +++ b/darkice/trunk/src/Makefile.am @@ -1,5 +1,5 @@ bin_PROGRAMS = darkice -CXXFLAGS = -O2 -pedantic -Wall @PTHREAD_CFLAGS@ +CXXFLAGS = -O2 -pedantic -Wall @DEBUG_CXXFLAGS@ @PTHREAD_CFLAGS@ INCLUDES = @LAME_INCFLAGS@ @VORBIS_INCFLAGS@ LDADD = @PTHREAD_LIBS@ @LAME_LDFLAGS@ @VORBIS_LDFLAGS@