summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--configure.in37
-rw-r--r--java/Makefile.am6
-rw-r--r--perf/Makefile.am25
-rw-r--r--perf/java/Makefile.am5
-rw-r--r--perf/python/Makefile.am6
-rw-r--r--perf/ruby/Makefile.am1
-rw-r--r--python/pyzmq.cpp2
-rw-r--r--ruby/rbzmq.cpp3
-rw-r--r--src/Makefile.am2
10 files changed, 76 insertions, 19 deletions
diff --git a/Makefile.am b/Makefile.am
index 4dda619..66cbc3d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -10,5 +10,9 @@ if BUILD_JAVA
DIR_J = java
endif
-SUBDIRS = src perf $(DIR_P) $(DIR_R) $(DIR_J)
-DIST_SUBDIRS = src perf $(DIR_P) $(DIR_R) $(DIR_J)
+if BUILD_PERF
+DIR_PERF = perf
+endif
+
+SUBDIRS = src $(DIR_P) $(DIR_R) $(DIR_J) $(DIR_PERF)
+DIST_SUBDIRS = src python ruby java perf
diff --git a/configure.in b/configure.in
index 6d69333..c5c521a 100644
--- a/configure.in
+++ b/configure.in
@@ -6,15 +6,25 @@ AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(src/platform.hpp)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
+# libzmq -version-info
+LTVER="0:0:0"
+AC_SUBST(LTVER)
+
# librbzmq -version-info
-RBLTVER="1:0:0"
+RBLTVER="0:0:0"
AC_SUBST(RBLTVER)
+# libjzmq -version-info
+JLTVER="0:0:0"
+AC_SUBST(JLTVER)
+
AM_PROG_CC_C_O
# Checks for programs.
AC_PROG_CXX
AC_PROG_LIBTOOL
+AC_PROG_SED
+AC_PROG_AWK
# Checks for libraries.
AC_CHECK_LIB(pthread, pthread_create)
@@ -184,7 +194,6 @@ fi
# Python
pyzmq="no"
-
AC_ARG_WITH(python_headersdir,
AS_HELP_STRING([--with-python-headersdir], [Python.h header file location]),
[python_headersdir="$withval"], [python_headersdir="no"])
@@ -225,7 +234,6 @@ fi
# RUBY
rbzmq="no"
-
AC_ARG_WITH(ruby_headersdir,
AS_HELP_STRING([--with-ruby-headersdir], [ruby.h header file location]),
[ruby_headersdir="$withval"], [ruby_headersdir="no"])
@@ -321,6 +329,25 @@ if test "x$with_java" != "xno"; then
AC_SUBST(JAVA_INCLUDE)
jzmq="yes"
+else
+# Workaround to be able to run make dist without real JAVAH
+ JAVAH=true
+ JAVAC=true
+ JAR=true
+fi
+
+# Perf
+perf="no"
+AC_ARG_WITH([perf], [AS_HELP_STRING([--with-perf],
+ [build performance tests [default=no]])], [with_perf=yes], [with_perf=no])
+
+if test "x$with_perf" != "xno"; then
+ perf="yes"
+
+ if test "x$czmq" = "xno" -a "x$cppzmq" = "xno" -a "x$pyzmq" = "xno" -a \
+ "x$jzmq" = "xno" -a "x$rbzmq" = "xno"; then
+ AC_MSG_ERROR([To run configure with --with-perf option chose at least one language binding.]);
+ fi
fi
AM_CONDITIONAL(BUILD_PYTHON, test "x$pyzmq" = "xyes")
@@ -329,6 +356,7 @@ AM_CONDITIONAL(BUILD_PYTHON, test "x$pyzmq" = "xyes")
AM_CONDITIONAL(BUILD_RUBY, test "x$rbzmq" = "xyes")
AM_CONDITIONAL(BUILD_C, test "x$czmq" = "xyes")
AM_CONDITIONAL(BUILD_CPP, test "x$cppzmq" = "xyes")
+AM_CONDITIONAL(BUILD_PERF, test "x$perf" = "xyes")
AC_SUBST(stdint)
AC_SUBST(inttypes)
@@ -344,7 +372,7 @@ AC_CHECK_FUNCS(perror gettimeofday memset socket getifaddrs freeifaddrs)
AC_OUTPUT(Makefile src/Makefile python/Makefile python/setup.py ruby/Makefile \
java/Makefile perf/Makefile perf/c/Makefile perf/cpp/Makefile \
- perf/python/Makefile)
+ perf/python/Makefile perf/ruby/Makefile perf/java/Makefile)
AC_MSG_RESULT([])
AC_MSG_RESULT([ ******************************************************** ])
@@ -365,5 +393,6 @@ if test "x$rbzmq" = "xyes"; then
AC_MSG_RESULT([ Ruby library install dir: $rubydir])
fi
AC_MSG_RESULT([ Java language binding: $jzmq])
+AC_MSG_RESULT([ performance tests: $perf])
AC_MSG_RESULT([])
diff --git a/java/Makefile.am b/java/Makefile.am
index 403da20..97e6cb9 100644
--- a/java/Makefile.am
+++ b/java/Makefile.am
@@ -21,9 +21,9 @@ libjzmq_la_SOURCES = \
Socket.cpp \
org_zmq_Socket.h
-libjzmq_la_CXXFLAGS = -I$(top_builddir)/src/libzmq \
-@JAVA_INCLUDE@ -I$(top_builddir)/include -I$(top_srcdir)/libjzmq -Wall
-libjzmq_la_LDFLAGS = -version-info 0:0:0
+libjzmq_la_CXXFLAGS = -I$(top_srcdir)/src/libzmq \
+@JAVA_INCLUDE@ -I$(top_srcdir)/c -I$(top_srcdir)/libjzmq -Wall
+libjzmq_la_LDFLAGS = -version-info @JLTVER@
libjzmq_la_LIBADD = $(top_builddir)/src/libzmq.la
BUILT_SOURCES = \
diff --git a/perf/Makefile.am b/perf/Makefile.am
index dbebc93..a3c13ad 100644
--- a/perf/Makefile.am
+++ b/perf/Makefile.am
@@ -1,2 +1,23 @@
-SUBDIRS = c cpp python
-DIST_SUBDIRS = c cpp python
+if BUILD_C
+PERF_DIR_C = c
+endif
+
+if BUILD_CPP
+PERF_DIR_CPP = cpp
+endif
+
+if BUILD_PYTHON
+PERF_DIR_P = python
+endif
+
+if BUILD_JAVA
+PERF_DIR_J = java
+endif
+
+if BUILD_RUBY
+PERF_DIR_R = ruby
+endif
+
+SUBDIRS = $(PERF_DIR_C) $(PERF_DIR_CPP) $(PERF_DIR_P) \
+ $(PERF_DIR_J) $(PERF_DIR_R)
+DIST_SUBDIRS = c cpp python java ruby
diff --git a/perf/java/Makefile.am b/perf/java/Makefile.am
new file mode 100644
index 0000000..6552e80
--- /dev/null
+++ b/perf/java/Makefile.am
@@ -0,0 +1,5 @@
+AM_JAVACFLAGS=-classpath $(top_builddir)/java
+
+dist_noinst_JAVA = local_lat.java remote_lat.java local_thr.java \
+remote_thr.java
+
diff --git a/perf/python/Makefile.am b/perf/python/Makefile.am
index cda8477..c504159 100644
--- a/perf/python/Makefile.am
+++ b/perf/python/Makefile.am
@@ -1,5 +1 @@
-EXTRA_DIST = \
- local_lat.py \
- remote_lat.py \
- local_thr.py \
- remote_thr.py
+EXTRA_DIST = *.py
diff --git a/perf/ruby/Makefile.am b/perf/ruby/Makefile.am
new file mode 100644
index 0000000..6bcd5da
--- /dev/null
+++ b/perf/ruby/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = *.rb
diff --git a/python/pyzmq.cpp b/python/pyzmq.cpp
index 2fc32d1..d1f5457 100644
--- a/python/pyzmq.cpp
+++ b/python/pyzmq.cpp
@@ -23,7 +23,7 @@
#include <string.h>
#include <Python.h>
-#include "../include/zmq.h"
+#include "../c/zmq.h"
struct context_t
{
diff --git a/ruby/rbzmq.cpp b/ruby/rbzmq.cpp
index 5cb7f61..8837aa1 100644
--- a/ruby/rbzmq.cpp
+++ b/ruby/rbzmq.cpp
@@ -20,9 +20,10 @@
#include <assert.h>
#include <errno.h>
#include <string.h>
-#include <zmq.h>
#include <ruby.h>
+#include "../c/zmq.h"
+
static void context_free (void *ctx)
{
if (ctx) {
diff --git a/src/Makefile.am b/src/Makefile.am
index da442f4..6bc5fb6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -101,7 +101,7 @@ libzmq_la_SOURCES = \
zmq_listener.cpp \
zmq_listener_init.cpp
-libzmq_la_LDFLAGS = -version-info 0:0:0
+libzmq_la_LDFLAGS = -version-info @LTVER@
libzmq_la_CXXFLAGS = -Wall -pedantic -Werror @ZMQ_EXTRA_CXXFLAGS@
dist-hook: