]> granicus.if.org Git - transmission/commitdiff
(trunk) sync xcode & autoconf idioms for determining if a build is stable, beta,...
authorCharles Kerr <charles@transmissionbt.com>
Fri, 16 Jan 2009 21:29:49 +0000 (21:29 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Fri, 16 Jan 2009 21:29:49 +0000 (21:29 +0000)
configure.ac
macosx/version.sh

index 546add2e9e53a342d8679af36b526a851ae159af..f20ad47cb80f1e29c1acd4e182092b7ad7a5ada4 100644 (file)
@@ -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
 
index 8ae6597474d3777066cf1c72fa26c3bf990f8a85..9718ebe3138c218ed8e17a861972ebf674b498a5 100755 (executable)
@@ -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