build system tuning

This commit is contained in:
malosek 2009-09-08 14:54:04 +02:00
parent ec6822a477
commit 2a4a10c8be
10 changed files with 76 additions and 19 deletions

View File

@ -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

View File

@ -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([])

View File

@ -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 = \

View File

@ -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

5
perf/java/Makefile.am Normal file
View 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

View File

@ -1,5 +1 @@
EXTRA_DIST = \
local_lat.py \
remote_lat.py \
local_thr.py \
remote_thr.py
EXTRA_DIST = *.py

1
perf/ruby/Makefile.am Normal file
View File

@ -0,0 +1 @@
EXTRA_DIST = *.rb

View File

@ -23,7 +23,7 @@
#include <string.h>
#include <Python.h>
#include "../include/zmq.h"
#include "../c/zmq.h"
struct context_t
{

View File

@ -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) {

View File

@ -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: