qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r532543 - in /incubator/qpid/trunk/qpid/cpp: configure.ac src/Makefile.am src/qpid/sys/posix/PosixAcceptor.cpp
Date Thu, 26 Apr 2007 00:01:08 GMT
Author: astitcher
Date: Wed Apr 25 17:01:06 2007
New Revision: 532543

URL: http://svn.apache.org/viewvc?view=rev&rev=532543
Log:
* Make APR/"posix" configurable using --disable-apr
* Make "posix" code build (but not run correctly)
* By default still build APR version, which works as before

Modified:
    incubator/qpid/trunk/qpid/cpp/configure.ac
    incubator/qpid/trunk/qpid/cpp/src/Makefile.am
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixAcceptor.cpp

Modified: incubator/qpid/trunk/qpid/cpp/configure.ac
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/configure.ac?view=diff&rev=532543&r1=532542&r2=532543
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/configure.ac (original)
+++ incubator/qpid/trunk/qpid/cpp/configure.ac Wed Apr 25 17:01:06 2007
@@ -101,16 +101,27 @@
 AC_SUBST(CPPUNIT_LIBS)
 AC_SUBST(CPPUNIT_CXXFLAGS)
 
-# Removed --enable-apr option as we currently don't build without APR.
-  
+AC_ARG_ENABLE([apr],
+  [AS_HELP_STRING([--enable-apr],
+    [use the Apache Portable Runtime library (default yes)])],
+  [case $enableval in
+    yes|no) enable_APR=$enableval;;
+    *) AC_MSG_ERROR([Invalid value for --enable-apr: $enableval]);;
+   esac],
+  [enable_APR=yes]
+)
+AM_CONDITIONAL([USE_APR], [test x$enable_APR = xyes])
+
 APR_MINIMUM_VERSION=1.2.2
 AC_SUBST(APR_MINIMUM_VERSION)
 AC_SUBST(APR_CXXFLAGS)
 AC_SUBST(USE_APR)
 
-PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION])
-APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1"
-USE_APR=1
+if test "$enable_APR" = yes; then
+  PKG_CHECK_MODULES([APR], [apr-1 >= $APR_MINIMUM_VERSION])
+  APR_CXXFLAGS="$APR_CFLAGS -DUSE_APR=1"
+  USE_APR=1
+fi
 
 AC_ARG_ENABLE([valgrind],
   [AS_HELP_STRING([--enable-valgrind],

Modified: incubator/qpid/trunk/qpid/cpp/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/Makefile.am?view=diff&rev=532543&r1=532542&r2=532543
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/src/Makefile.am Wed Apr 25 17:01:06 2007
@@ -43,9 +43,15 @@
   qpid/sys/posix/EventChannel.h \
   qpid/sys/posix/EventChannelThreads.h
 
-EXTRA_DIST=$(posix_src) $(posix_hdr)
-platform_src = $(apr_src)
-platform_hdr = $(apr_hdr)
+if USE_APR
+ EXTRA_DIST=$(posix_src) $(posix_hdr)
+ platform_src = $(apr_src)
+ platform_hdr = $(apr_hdr)
+else
+ EXTRA_DIST=$(apr_src) $(apr_hdr)
+ platform_src = $(posix_src)
+ platform_hdr = $(posix_hdr)
+endif
 
 lib_LTLIBRARIES = libqpidcommon.la libqpidbroker.la libqpidclient.la
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixAcceptor.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixAcceptor.cpp?view=diff&rev=532543&r1=532542&r2=532543
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixAcceptor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/posix/PosixAcceptor.cpp Wed Apr 25 17:01:06
2007
@@ -31,7 +31,7 @@
 
 class PosixAcceptor : public Acceptor {
   public:
-    virtual int16_t getPort() const { fail(); return 0; }
+    virtual uint16_t getPort() const { fail(); return 0; }
     virtual void run(qpid::sys::ConnectionInputHandlerFactory* ) { fail(); }
     virtual void shutdown() { fail(); }
 };



Mime
View raw message