mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-04 07:27:26 +01:00
build system tuning
This commit is contained in:
parent
ec6822a477
commit
2a4a10c8be
@ -10,5 +10,9 @@ if BUILD_JAVA
|
|||||||
DIR_J = java
|
DIR_J = java
|
||||||
endif
|
endif
|
||||||
|
|
||||||
SUBDIRS = src perf $(DIR_P) $(DIR_R) $(DIR_J)
|
if BUILD_PERF
|
||||||
DIST_SUBDIRS = src perf $(DIR_P) $(DIR_R) $(DIR_J)
|
DIR_PERF = perf
|
||||||
|
endif
|
||||||
|
|
||||||
|
SUBDIRS = src $(DIR_P) $(DIR_R) $(DIR_J) $(DIR_PERF)
|
||||||
|
DIST_SUBDIRS = src python ruby java perf
|
||||||
|
37
configure.in
37
configure.in
@ -6,15 +6,25 @@ AC_CONFIG_AUX_DIR(config)
|
|||||||
AM_CONFIG_HEADER(src/platform.hpp)
|
AM_CONFIG_HEADER(src/platform.hpp)
|
||||||
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
||||||
|
|
||||||
|
# libzmq -version-info
|
||||||
|
LTVER="0:0:0"
|
||||||
|
AC_SUBST(LTVER)
|
||||||
|
|
||||||
# librbzmq -version-info
|
# librbzmq -version-info
|
||||||
RBLTVER="1:0:0"
|
RBLTVER="0:0:0"
|
||||||
AC_SUBST(RBLTVER)
|
AC_SUBST(RBLTVER)
|
||||||
|
|
||||||
|
# libjzmq -version-info
|
||||||
|
JLTVER="0:0:0"
|
||||||
|
AC_SUBST(JLTVER)
|
||||||
|
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
|
|
||||||
# Checks for programs.
|
# Checks for programs.
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
|
AC_PROG_SED
|
||||||
|
AC_PROG_AWK
|
||||||
|
|
||||||
# Checks for libraries.
|
# Checks for libraries.
|
||||||
AC_CHECK_LIB(pthread, pthread_create)
|
AC_CHECK_LIB(pthread, pthread_create)
|
||||||
@ -184,7 +194,6 @@ fi
|
|||||||
|
|
||||||
# Python
|
# Python
|
||||||
pyzmq="no"
|
pyzmq="no"
|
||||||
|
|
||||||
AC_ARG_WITH(python_headersdir,
|
AC_ARG_WITH(python_headersdir,
|
||||||
AS_HELP_STRING([--with-python-headersdir], [Python.h header file location]),
|
AS_HELP_STRING([--with-python-headersdir], [Python.h header file location]),
|
||||||
[python_headersdir="$withval"], [python_headersdir="no"])
|
[python_headersdir="$withval"], [python_headersdir="no"])
|
||||||
@ -225,7 +234,6 @@ fi
|
|||||||
|
|
||||||
# RUBY
|
# RUBY
|
||||||
rbzmq="no"
|
rbzmq="no"
|
||||||
|
|
||||||
AC_ARG_WITH(ruby_headersdir,
|
AC_ARG_WITH(ruby_headersdir,
|
||||||
AS_HELP_STRING([--with-ruby-headersdir], [ruby.h header file location]),
|
AS_HELP_STRING([--with-ruby-headersdir], [ruby.h header file location]),
|
||||||
[ruby_headersdir="$withval"], [ruby_headersdir="no"])
|
[ruby_headersdir="$withval"], [ruby_headersdir="no"])
|
||||||
@ -321,6 +329,25 @@ if test "x$with_java" != "xno"; then
|
|||||||
AC_SUBST(JAVA_INCLUDE)
|
AC_SUBST(JAVA_INCLUDE)
|
||||||
|
|
||||||
jzmq="yes"
|
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
|
fi
|
||||||
|
|
||||||
AM_CONDITIONAL(BUILD_PYTHON, test "x$pyzmq" = "xyes")
|
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_RUBY, test "x$rbzmq" = "xyes")
|
||||||
AM_CONDITIONAL(BUILD_C, test "x$czmq" = "xyes")
|
AM_CONDITIONAL(BUILD_C, test "x$czmq" = "xyes")
|
||||||
AM_CONDITIONAL(BUILD_CPP, test "x$cppzmq" = "xyes")
|
AM_CONDITIONAL(BUILD_CPP, test "x$cppzmq" = "xyes")
|
||||||
|
AM_CONDITIONAL(BUILD_PERF, test "x$perf" = "xyes")
|
||||||
|
|
||||||
AC_SUBST(stdint)
|
AC_SUBST(stdint)
|
||||||
AC_SUBST(inttypes)
|
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 \
|
AC_OUTPUT(Makefile src/Makefile python/Makefile python/setup.py ruby/Makefile \
|
||||||
java/Makefile perf/Makefile perf/c/Makefile perf/cpp/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([])
|
||||||
AC_MSG_RESULT([ ******************************************************** ])
|
AC_MSG_RESULT([ ******************************************************** ])
|
||||||
@ -365,5 +393,6 @@ if test "x$rbzmq" = "xyes"; then
|
|||||||
AC_MSG_RESULT([ Ruby library install dir: $rubydir])
|
AC_MSG_RESULT([ Ruby library install dir: $rubydir])
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT([ Java language binding: $jzmq])
|
AC_MSG_RESULT([ Java language binding: $jzmq])
|
||||||
|
AC_MSG_RESULT([ performance tests: $perf])
|
||||||
AC_MSG_RESULT([])
|
AC_MSG_RESULT([])
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@ libjzmq_la_SOURCES = \
|
|||||||
Socket.cpp \
|
Socket.cpp \
|
||||||
org_zmq_Socket.h
|
org_zmq_Socket.h
|
||||||
|
|
||||||
libjzmq_la_CXXFLAGS = -I$(top_builddir)/src/libzmq \
|
libjzmq_la_CXXFLAGS = -I$(top_srcdir)/src/libzmq \
|
||||||
@JAVA_INCLUDE@ -I$(top_builddir)/include -I$(top_srcdir)/libjzmq -Wall
|
@JAVA_INCLUDE@ -I$(top_srcdir)/c -I$(top_srcdir)/libjzmq -Wall
|
||||||
libjzmq_la_LDFLAGS = -version-info 0:0:0
|
libjzmq_la_LDFLAGS = -version-info @JLTVER@
|
||||||
libjzmq_la_LIBADD = $(top_builddir)/src/libzmq.la
|
libjzmq_la_LIBADD = $(top_builddir)/src/libzmq.la
|
||||||
|
|
||||||
BUILT_SOURCES = \
|
BUILT_SOURCES = \
|
||||||
|
@ -1,2 +1,23 @@
|
|||||||
SUBDIRS = c cpp python
|
if BUILD_C
|
||||||
DIST_SUBDIRS = c cpp python
|
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
|
||||||
|
5
perf/java/Makefile.am
Normal file
5
perf/java/Makefile.am
Normal file
@ -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
|
||||||
|
|
@ -1,5 +1 @@
|
|||||||
EXTRA_DIST = \
|
EXTRA_DIST = *.py
|
||||||
local_lat.py \
|
|
||||||
remote_lat.py \
|
|
||||||
local_thr.py \
|
|
||||||
remote_thr.py
|
|
||||||
|
1
perf/ruby/Makefile.am
Normal file
1
perf/ruby/Makefile.am
Normal file
@ -0,0 +1 @@
|
|||||||
|
EXTRA_DIST = *.rb
|
@ -23,7 +23,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
|
||||||
#include "../include/zmq.h"
|
#include "../c/zmq.h"
|
||||||
|
|
||||||
struct context_t
|
struct context_t
|
||||||
{
|
{
|
||||||
|
@ -20,9 +20,10 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <zmq.h>
|
|
||||||
#include <ruby.h>
|
#include <ruby.h>
|
||||||
|
|
||||||
|
#include "../c/zmq.h"
|
||||||
|
|
||||||
static void context_free (void *ctx)
|
static void context_free (void *ctx)
|
||||||
{
|
{
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
|
@ -101,7 +101,7 @@ libzmq_la_SOURCES = \
|
|||||||
zmq_listener.cpp \
|
zmq_listener.cpp \
|
||||||
zmq_listener_init.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@
|
libzmq_la_CXXFLAGS = -Wall -pedantic -Werror @ZMQ_EXTRA_CXXFLAGS@
|
||||||
|
|
||||||
dist-hook:
|
dist-hook:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user