activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
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 GMT
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 <activemq/util/Config.h>
+
+#if !defined(HAVE_WINSOCK2_H)
     #include <unistd.h>
     #include <netdb.h>
     #include <fcntl.h>
@@ -43,13 +46,12 @@
 #include <errno.h>
 #include <sys/types.h>
 #include <assert.h>
-#include "ServerSocket.h"
 #include <errno.h>
 #include <string>
 
 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 <activemq/io/InputStream.h>
 #include <activemq/io/OutputStream.h>
 #include <cms/Closeable.h>
+#include <activemq/util/Config.h>
 
-#if !(defined( unix ) || defined(__APPLE__)) || defined( __CYGWIN__ )
+#if defined(HAVE_WINSOCK2_H)
 #include <Winsock2.h> // 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_*/



Mime
View raw message