From eca2b290c0e8b80b938225248511fe7f98ca4518 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 16 Jan 2009 21:29:49 +0000 Subject: [PATCH] (trunk) sync xcode & autoconf idioms for determining if a build is stable, beta, or nightly --- configure.ac | 17 ++++++++++------- macosx/version.sh | 11 +++++++---- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 546add2e9..f20ad47cb 100644 --- a/configure.ac +++ b/configure.ac @@ -19,14 +19,17 @@ 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) = "Z"; then - AC_DEFINE(TR_UNSTABLE, 1, [Define to 1 if this is an unstable version of Transmission]) - TR_UNSTABLE=yes - enable_debug=yes +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 - enable_debug=no + AC_DEFINE(TR_STABLE_RELEASE, 1, [Define to 1 if this is a stable release of Transmission]) + supported_build=yes fi -AM_CONDITIONAL(TR_UNSTABLE, test "x$TR_UNSTABLE" = "xyes") +AM_CONDITIONAL(TR_UNSTABLE, test "x$supported_build" = "xno") OPENSSL_MINIMUM=0.9.4 CURL_MINIMUM=7.16.3 @@ -49,7 +52,7 @@ AC_PROG_CC AC_PROG_CXX AC_C_INLINE if test "x$GCC" = "xyes" ; then - CFLAGS="-std=gnu99 -ggdb3 -Wall -Wextra -Wredundant-decls -Wpointer-arith -Wformat-security -W -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Winit-self -Wundef -Wnested-externs -Wmissing-format-attribute" + CFLAGS="-std=gnu99 -ggdb3 -Wall -Wextra -Wredundant-decls -Wpointer-arith -Wformat-security -W -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winit-self -Wundef -Wnested-externs -Wmissing-format-attribute" CXXFLAGS="-Wall -Wformat-security -W" fi diff --git a/macosx/version.sh b/macosx/version.sh index 8ae659747..9718ebe31 100755 --- a/macosx/version.sh +++ b/macosx/version.sh @@ -38,12 +38,15 @@ cat > libtransmission/version.h.new << EOF #define BUNDLE_VERSION_INFOPLIST $SVN_REVISION EOF -# Check if it's a beta release +# add a release definition if [ ${PEERID_PREFIX:6:1} = X ]; then -cat >> libtransmission/version.h.new << EOF -#define BETA_RELEASE "BETA" -EOF + line='#define TR_BETA_RELEASE "BETA"' +elif [ ${PEERID_PREFIX:6:1} = Z ]; then + line='#define TR_NIGHTLY_RELEASE "NIGHTLY"' +else + line='#define TR_STABLE_RELEASE "STABLE"' fi +echo $line >> libtransmission/version.h.new replace_if_differs libtransmission/version.h.new libtransmission/version.h -- 2.40.0