added --with-debug configure option

This commit is contained in:
darkeye 2004-01-05 12:00:20 +00:00
parent d9981cf01e
commit 7f5f2f7480
2 changed files with 18 additions and 2 deletions

View File

@ -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 <sys/socket.h>], [
])
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)

View File

@ -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@