You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by st...@apache.org on 2006/11/21 20:08:48 UTC

svn commit: r477826 - in /incubator/qpid/trunk/qpid/cpp: Makefile README.rhel3 options-rhel3.mk options.mk src/qpid/framing/amqp_types.h

Author: steshaw
Date: Tue Nov 21 11:08:47 2006
New Revision: 477826

URL: http://svn.apache.org/viewvc?view=rev&rev=477826
Log:
QPID-120 Enabled qpid-cpp to build on RHEL3 with less pain.

Added:
    incubator/qpid/trunk/qpid/cpp/README.rhel3
    incubator/qpid/trunk/qpid/cpp/options-rhel3.mk
Modified:
    incubator/qpid/trunk/qpid/cpp/Makefile
    incubator/qpid/trunk/qpid/cpp/options.mk
    incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h

Modified: incubator/qpid/trunk/qpid/cpp/Makefile
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/Makefile?view=diff&rev=477826&r1=477825&r2=477826
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/Makefile (original)
+++ incubator/qpid/trunk/qpid/cpp/Makefile Tue Nov 21 11:08:47 2006
@@ -26,6 +26,14 @@
 
 test: unittest pythontest
 
+.PHONY: show-vars
+show-vars:
+	@echo APR_LDFLAGS=$(APR_LDFLAGS)
+	@echo APR_CFLAGS=$(APR_CFLAGS)
+	@echo CXXFLAGS=$(CXXFLAGS)
+	@echo LDFLAGS=$(LDFLAGS)
+	@echo CXX=$(CXX)
+
 # Must run two separate make processes to pick up generated files.
 all:
 	$(MAKE) generate
@@ -106,10 +114,14 @@
 
 $(foreach dir,$(SRCDIRS),$(eval $(call CPPRULE,$(dir))))
 
+ifndef CPPUNIT_LDFLAGS
+  CPPUNIT_LDFLAGS := -lcppunit
+endif
+
 #  Unit test plugin libraries.
 $(TESTDIR)/%Test.so: test/unit/%Test.cpp $(LIB_common) $(LIB_broker)
 	mkdir -p $(dir $@)
-	$(CXX) -shared -o $@ $< $(CXXFLAGS)  -Itest/include $(LDFLAGS) -lcppunit $(LIB_common) $(LIB_broker)
+	$(CXX) -shared -o $@ $< $(CXXFLAGS)  -Itest/include $(LDFLAGS) $(CPPUNIT_LDFLAGS) $(LIB_common) $(LIB_broker)
 
 # Client test programs
 $(TESTDIR)/%: test/client/%.cpp $(LIB_common) $(LIB_client)

Added: incubator/qpid/trunk/qpid/cpp/README.rhel3
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/README.rhel3?view=auto&rev=477826
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/README.rhel3 (added)
+++ incubator/qpid/trunk/qpid/cpp/README.rhel3 Tue Nov 21 11:08:47 2006
@@ -0,0 +1,15 @@
+Building on RHEL3 without access to root (i.e. no yum)
+======================================================
+
+Install make-3.80 into ~/local/make-3.80
+
+Install apr-1.2.7 into ~/local/apr-1.2.7.
+
+Install boost-1.33.1 into ~/local/boost-1.33.1
+
+Install cppunit-1.11.4 into ~/local/cppunit-1.11.4
+
+Build using the following command:
+
+  $ ./build.rhel3
+

Added: incubator/qpid/trunk/qpid/cpp/options-rhel3.mk
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/options-rhel3.mk?view=auto&rev=477826
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/options-rhel3.mk (added)
+++ incubator/qpid/trunk/qpid/cpp/options-rhel3.mk Tue Nov 21 11:08:47 2006
@@ -0,0 +1,20 @@
+#
+# Expects dependencies in ~/local
+#
+
+RELEASE := 1
+
+# Configure Boost.
+BOOST_CXXFLAGS := -I$(HOME)/local/boost-1.33.1/include/boost-1_33_1
+CXXFLAGS := $(CXXFLAGS) $(BOOST_CXXFLAGS)
+
+# Configure CppUnit.
+CPPUNIT_CFLAGS := `cppunit-config --cflags`
+CPPUNIT_LDFLAGS := `cppunit-config --libs`
+CXXFLAGS := $(CXXFLAGS) $(CPPUNIT_CFLAGS)
+
+#
+# RedHat Enterprise 3 g++ can't handle -Wextra etc so remove them.
+#
+
+WARN := -Werror -pedantic -Wall -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wno-system-headers

Modified: incubator/qpid/trunk/qpid/cpp/options.mk
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/options.mk?view=diff&rev=477826&r1=477825&r2=477826
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/options.mk (original)
+++ incubator/qpid/trunk/qpid/cpp/options.mk Tue Nov 21 11:08:47 2006
@@ -36,8 +36,10 @@
 ifdef USE_APR
 PLATFORM := apr
 IGNORE   := posix
-CXXFLAGS := $(CXXFLAGS) -DUSE_APR -I$(shell apr-1-config --includedir)
-LDFLAGS  := $(LDFLAGS) -L/usr/local/apr/lib -lapr-1 
+APR_LDFLAGS := $(shell apr-1-config --link-ld --libs)
+APR_CFLAGS := -DUSE_APR -I$(shell apr-1-config --includedir)
+CXXFLAGS := $(CXXFLAGS) $(APR_CFLAGS)
+LDFLAGS  := $(LDFLAGS) $(APR_LDFLAGS)
 else
 PLATFORM := posix
 IGNORE   := apr
@@ -72,7 +74,9 @@
 # -Wunreachable-code -Wpadded -Winline
 # -Wshadow - warns about boost headers.
 # 
+ifndef WARN
 WARN := -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers
+endif
 
 INCLUDES := $(SRCDIRS:%=-I%) $(EXTRA_INCLUDES)
 LDFLAGS  := $(LDFLAGS) -L$(LIBDIR) 
@@ -90,3 +94,4 @@
 
 LIB_COMMAND = 	mkdir -p $(dir $@) && $(CXX) -shared -o $@ $(LDFLAGS) $(CXXFLAGS) $^
 
+-include options-local-override.mk

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h?view=diff&rev=477826&r1=477825&r2=477826
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/framing/amqp_types.h Tue Nov 21 11:08:47 2006
@@ -27,7 +27,7 @@
 typedef unsigned __int64 u_int64_t;
 #endif
 #ifndef _WINDOWS
-#include "sys/types.h"
+#include "stdint.h"
 #endif
 
 #ifndef AMQP_TYPES_H