From 04d392535bd32c8a3d17e2fdcc05e42bffba76be Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 17 Jan 2009 23:12:35 +0000 Subject: [PATCH] (trunk) in configure.ac, make debugging support automatic for nightly & beta builds --- configure.ac | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/configure.ac b/configure.ac index f20ad47cb..2904c3038 100644 --- a/configure.ac +++ b/configure.ac @@ -19,15 +19,20 @@ AC_CONFIG_SRCDIR(libtransmission/transmission.h) AM_INIT_AUTOMAKE([1.9 tar-ustar]) AC_PROG_LIBTOOL -if test m4_substr(peer_id_prefix,6,1) = "X"; then - AC_DEFINE(TR_BETA_RELEASE, 1, [Define to 1 if this is a beta release of Transmission]) - supported_build=no -elif test m4_substr(peer_id_prefix,6,1) = "Z"; then - AC_DEFINE(TR_NIGHTLY_RELEASE, 1, [Define to 1 if this is a nightly release of Transmission]) - supported_build=no -else - AC_DEFINE(TR_STABLE_RELEASE, 1, [Define to 1 if this is a stable release of Transmission]) +if test m4_substr(peer_id_prefix,6,1) = "0"; then supported_build=yes + CFLAGS="$CFLAGS -g -O3 -funroll-loops " + CXXFLAGS="$CXXFLAGS -g -O3 -funroll-loops " + AC_DEFINE(TR_STABLE_RELEASE, 1, [Define to 1 if this is a stable release of Transmission]) +else + supported_build=no + CFLAGS="$CFLAGS -g -O0" + CXXFLAGS="$CXXFLAGS -g -O0" + if test m4_substr(peer_id_prefix,6,1) = "X"; then + AC_DEFINE(TR_BETA_RELEASE, 1, [Define to 1 if this is a beta release of Transmission]) + else + AC_DEFINE(TR_NIGHTLY_RELEASE, 1, [Define to 1 if this is a nightly release of Transmission]) + fi fi AM_CONDITIONAL(TR_UNSTABLE, test "x$supported_build" = "xno") @@ -94,20 +99,6 @@ AC_TRY_LINK([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);], ) ]) - -dnl ---------------------------------------------------------------------------- -dnl -dnl debugging support -AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug],[build with debugging support]),,,) -if test "x$enable_debug" = "xyes" ; then - CFLAGS="$CFLAGS -g -O0" - CXXFLAGS="$CXXFLAGS -g -O0" -else - CFLAGS="$CFLAGS -g -O3 -funroll-loops -DNDEBUG " - CXXFLAGS="$CXXFLAGS -g -O3 -funroll-loops -DNDEBUG " -fi - - dnl ---------------------------------------------------------------------------- dnl dnl libevent fun @@ -335,7 +326,6 @@ Configuration: Source code location: ${srcdir} Compiler: ${CXX} - Debugging support ${enable_debug} Build Command-Line client: ${build_cli} Build Daemon: ${build_daemon} Build GTK+ client: ${build_gtk}