0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-26 06:41:03 +08:00

include directory split into c and cpp dirs, added --with-c and --with-cpp configure options

This commit is contained in:
malosek 2009-09-07 17:06:47 +02:00
parent f895426c18
commit b71c3005e6
19 changed files with 65 additions and 35 deletions

View File

@ -1,5 +1,3 @@
include_HEADERS = include/zmq.h include/zmq.hpp
if BUILD_PYTHON
DIR_P = python
endif

View File

@ -18,7 +18,13 @@
# Script to generate all required files from fresh svn checkout.
pkg-config --version > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo
echo "Could not find pkg-config, pkg.m4 macro is probably not installed."
echo
exit 1
fi
autoreconf --install --force --verbose -I config

View File

@ -164,11 +164,29 @@ if test "x$HAVE_INTTYPES_H" = "xyes"; then
inttypes="1"
fi
# c
czmq="no"
AC_ARG_WITH([c], [AS_HELP_STRING([--with-c],
[build c language binding [default=no]])], [c=yes], [c=no])
if test "x$c" != "xno"; then
czmq="yes"
fi
# c++
cppzmq="no"
AC_ARG_WITH([cpp], [AS_HELP_STRING([--with-cpp],
[build c++ language binding [default=no]])], [cpp=yes], [cpp=no])
if test "x$cpp" != "xno"; then
cppzmq="yes"
fi
# Python
pyzmq="no"
AC_ARG_WITH(python_headersdir,
AC_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"])
AC_ARG_WITH([python], [AS_HELP_STRING([--with-python], [build Python language binding [default=no]])], [with_python=yes], [with_python=no])
@ -209,7 +227,7 @@ fi
rbzmq="no"
AC_ARG_WITH(ruby_headersdir,
AC_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"])
if test "x$ruby_headersdir" != "xno"; then
@ -217,7 +235,7 @@ if test "x$ruby_headersdir" != "xno"; then
fi
AC_ARG_WITH(ruby_libdir,
AC_HELP_STRING([--with-ruby-libdir],[libruby library file location]),
AS_HELP_STRING([--with-ruby-libdir],[libruby library file location]),
[ruby_libdir="$withval"], [ruby_libdir="no"])
if test "x$ruby_libdir" != "xno"; then
@ -249,17 +267,12 @@ RUBYDIR="$rubydir"
AC_SUBST([RUBYDIR])
if test "x$pyzmq" != "xyes"; then
AC_CHECK_PROG(have_python, python, yes, no)
if test "x$have_python" != "xyes"; then
AC_MSG_ERROR([Could not find python.])
fi
AC_CHECK_PROG(have_python, python, yes, no)
if test "x$have_python" != "xyes"; then
AC_MSG_ERROR([Could not find python.])
fi
fi
# Generate version.c
AC_CONFIG_COMMANDS([version.c],
[python third-party/openpgm/libpgm-1.0.0/openpgm/pgm/version_generator.py > \
third-party/openpgm/libpgm-1.0.0/openpgm/pgm/version.c])
# Java language binding
jzmq="no"
AC_ARG_WITH([java], [AS_HELP_STRING([--with-java], [build Java language binding [default=no]])], [with_java=yes], [with_java=no])
@ -312,6 +325,10 @@ fi
AM_CONDITIONAL(BUILD_PYTHON, test "x$pyzmq" = "xyes")
AM_CONDITIONAL(BUILD_JAVA, test "x$jzmq" = "xyes")
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")
AC_SUBST(stdint)
AC_SUBST(inttypes)
@ -319,8 +336,6 @@ AC_SUBST(inttypes)
# Subst ZMQ_EXTRA_CXXFLAGS
AC_SUBST(ZMQ_EXTRA_CXXFLAGS)
AM_CONDITIONAL(BUILD_PYTHON, test "x$pyzmq" = "xyes")
AM_CONDITIONAL(BUILD_RUBY, test "x$rbzmq" = "xyes")
# Checks for library functions.
AC_FUNC_MALLOC
@ -342,6 +357,8 @@ AC_MSG_RESULT([ license text. ])
AC_MSG_RESULT([ ******************************************************** ])
AC_MSG_RESULT([])
AC_MSG_RESULT([ 0MQ install dir: $prefix])
AC_MSG_RESULT([ C language binding: $czmq])
AC_MSG_RESULT([ C++ language binding: $cppzmq])
AC_MSG_RESULT([ Python language binding: $pyzmq])
AC_MSG_RESULT([ Ruby language binding: $rbzmq])
if test "x$rbzmq" = "xyes"; then

View File

@ -1,6 +1,6 @@
INCLUDES = -I$(top_builddir)/include
INCLUDES = -I$(top_builddir)/c
bin_PROGRAMS = local_lat remote_lat local_thr remote_thr
noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr
local_lat_LDADD = $(top_builddir)/src/libzmq.la
local_lat_SOURCES = local_lat.c

View File

@ -1,6 +1,6 @@
INCLUDES = -I$(top_builddir)/include
INCLUDES = -I$(top_srcdir)/cpp -I$(top_srcdir)/c
bin_PROGRAMS = local_lat remote_lat local_thr remote_thr
noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr
local_lat_LDADD = $(top_builddir)/src/libzmq.la
local_lat_SOURCES = local_lat.cpp

View File

@ -1,8 +1,17 @@
lib_LTLIBRARIES = libzmq.la
pkginclude_HEADERS = \
../include/zmq.h \
../include/zmq.hpp
if BUILD_CPP
include_HEADERS = ../cpp/zmq.hpp ../c/zmq.h
endif
if BUILD_C
if BUILD_CPP
else
include_HEADERS = ../c/zmq.h
endif
endif
libzmq_la_SOURCES = \
app_thread.hpp \

View File

@ -19,7 +19,7 @@
#include <algorithm>
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "platform.hpp"

View File

@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "dispatcher.hpp"
#include "app_thread.hpp"

View File

@ -20,7 +20,7 @@
#ifndef __ZMQ_I_INOUT_HPP_INCLUDED__
#define __ZMQ_I_INOUT_HPP_INCLUDED__
#include "../include/zmq.h"
#include "../c/zmq.h"
namespace zmq
{

View File

@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "io_thread.hpp"
#include "command.hpp"

View File

@ -22,7 +22,7 @@
#include <stddef.h>
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "atomic_counter.hpp"

View File

@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "pipe.hpp"

View File

@ -20,7 +20,7 @@
#ifndef __ZMQ_PIPE_HPP_INCLUDED__
#define __ZMQ_PIPE_HPP_INCLUDED__
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "stdint.hpp"
#include "i_endpoint.hpp"

View File

@ -20,7 +20,7 @@
#include <string>
#include <algorithm>
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "socket_base.hpp"
#include "app_thread.hpp"

View File

@ -17,7 +17,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../include/zmq.h"
#include "../c/zmq.h"
#include <errno.h>
#include <stdlib.h>

View File

@ -20,7 +20,7 @@
#ifndef __ZMQ_ZMQ_DECODER_HPP_INCLUDED__
#define __ZMQ_ZMQ_DECODER_HPP_INCLUDED__
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "decoder.hpp"

View File

@ -20,7 +20,7 @@
#ifndef __ZMQ_ZMQ_ENCODER_HPP_INCLUDED__
#define __ZMQ_ZMQ_ENCODER_HPP_INCLUDED__
#include "../include/zmq.h"
#include "../c/zmq.h"
#include "encoder.hpp"