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