Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 69878 invoked from network); 29 Sep 2006 21:32:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2006 21:32:35 -0000 Received: (qmail 78917 invoked by uid 500); 29 Sep 2006 21:32:35 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 78871 invoked by uid 500); 29 Sep 2006 21:32:35 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 78862 invoked by uid 99); 29 Sep 2006 21:32:35 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Sep 2006 14:32:35 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=5.0 tests=ALL_TRUSTED,NO_REAL_NAME Received: from [140.211.166.113] ([140.211.166.113:61707] helo=eris.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id EA/90-20582-1F09D154 for ; Fri, 29 Sep 2006 14:32:33 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 0E7671A9820; Fri, 29 Sep 2006 14:32:31 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r451455 [3/3] - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp: ./ activemq-cpp.xcodeproj/ src/main/ src/main/activemq/network/ src/main/activemq/util/ Date: Fri, 29 Sep 2006 21:32:30 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20060929213231.0E7671A9820@eris.apache.org> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Propchange: incubator/activemq/activemq-cpp/trunk/activemq-cpp/activemq-cpp.xcodeproj/project.pbxproj ------------------------------------------------------------------------------ svn:executable = * Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/configure.ac URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/configure.ac?view=diff&rev=451455&r1=451454&r2=451455 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/configure.ac (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/configure.ac Fri Sep 29 14:32:29 2006 @@ -53,9 +53,44 @@ AM_SANITY_CHECK AC_LANG_CPLUSPLUS -## ----------------------------------------------- +AC_C_BIGENDIAN +AC_CHECK_SIZEOF(short) +AC_CHECK_SIZEOF(int) +AC_CHECK_SIZEOF(long) + +#save_LIBS="${LIBS}" +#AC_CHECK_LIB(rt, clock_gettime, [rt_libs=" -lrt"]) +#LIBS="${LIBS}${rt_libs}" +#DLL_LIBS="${DLL_LIBS}${rt_libs}" +#AC_CHECK_FUNCS([clock_gettime nanosleep]) +#LIBS="${save_LIBS}" +## AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no) + +case "${host_os}" in + + darwin* ) ## Mac OS X configuration + LIBS=""; + ;; + + cygwin* ) ## Cygwin configuration + # LIBS="-lwinmm -lm"; + CFLAGS="$CFLAGS -pthread" + LIBS="$LIBS -lm -lpthread"; + ;; + + *) ## Unix configuration + + AC_CHECK_LIB(pthread, pthread_create,[have_pthread="yes"], + AC_MSG_ERROR([libpthread not found!])) + + CFLAGS="$CFLAGS -pthread" + LIBS="$LIBS -lm -lpthread"; +esac + +## ----------------------------------------------------- +## configuration ## Generates Makefile's, configuration files and scripts -## ----------------------------------------------- +## ----------------------------------------------------- AC_OUTPUT(\ Makefile \ Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?view=diff&rev=451455&r1=451454&r2=451455 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Fri Sep 29 14:32:29 2006 @@ -226,7 +226,7 @@ lib_LTLIBRARIES= libactivemq-cpp.la libactivemq_cpp_la_SOURCES= $(h_sources) $(cc_sources) libactivemq_cpp_la_LDFLAGS= -version-info $(ACTIVEMQ_LIBRARY_VERSION) -release $(ACTIVEMQ_VERSION) -libactivemq_cpp_la_LIBADD=-lpthread -ldl -luuid +##libactivemq_cpp_la_LIBADD=-lpthread -ldl -luuid ## Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/ServerSocket.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/ServerSocket.cpp?view=diff&rev=451455&r1=451454&r2=451455 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/ServerSocket.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/ServerSocket.cpp Fri Sep 29 14:32:29 2006 @@ -15,7 +15,10 @@ * limitations under the License. */ -#if (defined(unix) || defined(__APPLE__)) && !defined(__CYGWIN__) +#include "ServerSocket.h" +#include + +#if !defined(HAVE_WINSOCK2_H) #include #include #include @@ -43,13 +46,12 @@ #include #include #include -#include "ServerSocket.h" #include #include using namespace activemq::network; -#if !defined( unix ) || defined( __CYGWIN__ ) +#if defined(HAVE_WINSOCK2_H) // Static socket initializer needed for winsock @@ -80,7 +82,7 @@ { socketHandle = Socket::INVALID_SOCKET_HANDLE; -#if !defined( unix ) || defined( __CYGWIN__ ) +#if defined(HAVE_WINSOCK2_H) if( ServerSocket::staticSocketInitializer.getSocketInitError() != NULL ) { throw *ServerSocket::staticSocketInitializer.getSocketInitError(); } @@ -166,7 +168,7 @@ if( isBound() ) { - #if defined(unix) && !defined( __CYGWIN__ ) + #if !defined(HAVE_WINSOCK2_H) ::close( socketHandle ); #else ::closesocket( socketHandle ); @@ -186,7 +188,7 @@ { struct sockaddr_in temp; - #if defined( unix ) && !defined( __CYGWIN__ ) + #if !defined(HAVE_WINSOCK2_H) socklen_t temp_len = sizeof( sockaddr_in ); #else int temp_len = sizeof( sockaddr_in ); Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/Socket.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/Socket.h?view=diff&rev=451455&r1=451454&r2=451455 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/Socket.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/network/Socket.h Fri Sep 29 14:32:29 2006 @@ -21,8 +21,9 @@ #include #include #include +#include -#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ ) +#if defined(HAVE_WINSOCK2_H) #include // SOCKET #endif @@ -34,7 +35,7 @@ public: // Define the SocketHandle type. - #if defined( unix ) && !defined( __CYGWIN__ ) + #if !defined(HAVE_WINSOCK2_H) typedef int SocketHandle; #else typedef SOCKET SocketHandle; @@ -165,4 +166,4 @@ }} -#endif /*_ACTIVEMQ_NETWORK_BASESOCKET_H_*/ +#endif /*_ACTIVEMQ_NETWORK_SOCKET_H_*/ Added: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Config.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Config.h?view=auto&rev=451455 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Config.h (added) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/Config.h Fri Sep 29 14:32:29 2006 @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef ACTIVEMQ_UTIL_CONFIG_H_ +#define ACTIVEMQ_UTIL_CONFIG_H_ + +// +// The purpose of this header is to try to detect the supported headers +// of the platform when the ./configure script is not being used to generate +// the config.h file. +// + +#if !( defined( unix ) || defined(__APPLE__) ) || defined( __CYGWIN__ ) +#define HAVE_WINSOCK2_H +#endif + + +#endif /*ACTIVEMQ_UTIL_CONFIG_H_*/