zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r946074 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/Makefile.am src/c/configure.ac
Date Wed, 19 May 2010 07:37:38 GMT
Author: phunt
Date: Wed May 19 07:37:38 2010
New Revision: 946074

URL: http://svn.apache.org/viewvc?rev=946074&view=rev
Log:
ZOOKEEPER-636. configure.ac has instructions which override the contents of CFLAGS and CXXFLAGS

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/Makefile.am
    hadoop/zookeeper/trunk/src/c/configure.ac

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=946074&r1=946073&r2=946074&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Wed May 19 07:37:38 2010
@@ -58,6 +58,9 @@ BUGFIXES: 
   ZOOKEEPER-772. zkpython segfaults when watcher from async get children is
   invoked. (henry via phunt)
 
+  ZOOKEEPER-636. configure.ac has instructions which override the contents of
+  CFLAGS and CXXFLAGS. (Maxim P. Dementiev via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-724. Improve junit test integration - log harness information 
   (phunt via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/Makefile.am
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/Makefile.am?rev=946074&r1=946073&r2=946074&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/Makefile.am (original)
+++ hadoop/zookeeper/trunk/src/c/Makefile.am Wed May 19 07:37:38 2010
@@ -3,7 +3,7 @@ include $(top_srcdir)/aminclude.am
 
 AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated
 AM_CFLAGS = -Wall -Werror 
-CXXFLAGS = -Wall -g $(USEIPV6)
+AM_CXXFLAGS = -Wall $(USEIPV6)
 
 LIB_LDFLAGS = -no-undefined -version-info 2
 

Modified: hadoop/zookeeper/trunk/src/c/configure.ac
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/configure.ac?rev=946074&r1=946073&r2=946074&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/configure.ac (original)
+++ hadoop/zookeeper/trunk/src/c/configure.ac Wed May 19 07:37:38 2010
@@ -6,6 +6,10 @@ AC_PREREQ(2.59)
 AC_INIT([zookeeper C client],3.4.0,[zookeeper-user@hadoop.apache.org],[c-client-src])
 AC_CONFIG_SRCDIR([src/zookeeper.c])
 
+# Save initial CFLAGS and CXXFLAGS values before AC_PROG_CC and AC_PROG_CXX
+init_cflags="$CFLAGS"
+init_cxxflags="$CXXFLAGS"
+
 # initialize Doxygen support
 DX_HTML_FEATURE(ON)
 DX_CHM_FEATURE(OFF)
@@ -58,8 +62,30 @@ AC_PROG_LIBTOOL
 #hence this define for gcc
 AC_ARG_ENABLE([debug],
  [AS_HELP_STRING([--enable-debug],[enable debug build [default=no]])],
- [CFLAGS="-g -O0 -D_GNU_SOURCE";CXXFLAGS="-g -O0"],[CFLAGS="-g -O2 -D_GNU_SOURCE";CXXFLAGS="-g
-O2"])
- 
+ [],[enable_debug=no])
+
+if test "x$enable_debug" = xyes; then
+    if test "x$init_cflags" = x; then
+        CFLAGS=""
+    fi
+    CFLAGS="$CFLAGS -g -O0 -D_GNU_SOURCE"
+else
+    if test "x$init_cflags" = x; then
+        CFLAGS="-g -O2 -D_GNU_SOURCE"
+    fi
+fi
+
+if test "x$enable_debug" = xyes; then
+    if test "x$init_cxxflags" = x; then
+        CXXFLAGS=""
+    fi
+    CXXFLAGS="$CXXFLAGS -g -O0"
+else
+    if test "x$init_cxxflags" = x; then
+        CXXFLAGS="-g -O2"
+    fi
+fi
+
 AC_ARG_WITH([syncapi],
  [AS_HELP_STRING([--with-syncapi],[build with support for SyncAPI [default=yes]])],
  [],[with_syncapi=yes])



Mime
View raw message