zeromq-2.2.0.orig/0000775000000000000000000000000011741762444012501 5ustar rootrootzeromq-2.2.0.orig/INSTALL0000664000000000000000000002271511732125604013530 0ustar rootrootInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. If you are building a development version from the Github source, for example, use `./autogen.sh' to generate `configure' and other necessary installation scripts. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 6. Often, you can also type `make uninstall' to remove the installed files again. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. zeromq-2.2.0.orig/foreign/0000775000000000000000000000000011756415065014132 5ustar rootrootzeromq-2.2.0.orig/foreign/openpgm/0000775000000000000000000000000011756415065015577 5ustar rootrootzeromq-2.2.0.orig/foreign/openpgm/Makefile.in0000664000000000000000000004254211737024114017641 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = foreign/openpgm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = $(pgm_subdir) DIST_SUBDIRS = all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign foreign/openpgm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign foreign/openpgm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Override Automake's installation targets with the command ":" that does nothing. install:; @: install-exec:; @: install-data:; @: uninstall:; @: dist:; @; # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/foreign/openpgm/Makefile.am0000664000000000000000000000030411732125604017617 0ustar rootrootSUBDIRS = $(pgm_subdir) DIST_SUBDIRS = # Override Automake's installation targets with the command ":" that does nothing. install:; @: install-exec:; @: install-data:; @: uninstall:; @: dist:; @; zeromq-2.2.0.orig/Makefile.in0000664000000000000000000006013111737024114014535 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in \ $(top_srcdir)/builds/redhat/zeromq.spec.in \ $(top_srcdir)/configure AUTHORS COPYING COPYING.LESSER INSTALL \ NEWS config/compile config/config.guess config/config.sub \ config/depcomp config/install-sh config/ltmain.sh \ config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = builds/redhat/zeromq.spec CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I config @BUILD_PGM_FALSE@SUBDIRS = src doc perf tests @BUILD_PGM_TRUE@SUBDIRS = foreign/openpgm src doc perf tests DIST_SUBDIRS = foreign/openpgm src doc perf tests builds/msvc EXTRA_DIST = \ autogen.sh \ version.sh \ MAINTAINERS \ foreign/openpgm/@pgm_basename@.tar.gz \ foreign/xmlParser/xmlParser.cpp \ foreign/xmlParser/xmlParser.hpp MAINTAINERCLEANFILES = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autom4te.cache \ $(srcdir)/configure \ `find "$(srcdir)" -type f -name Makefile.in -print` all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): builds/redhat/zeromq.spec: $(top_builddir)/config.status $(top_srcdir)/builds/redhat/zeromq.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-local distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzma dist-shar dist-tarZ dist-xz \ dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-local mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am dist-hook: @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/config/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging maintainer-clean-local: -rm -rf $(top_srcdir)/config # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/tests/0000775000000000000000000000000011741762443013642 5ustar rootrootzeromq-2.2.0.orig/tests/test_pair_ipc.cpp0000664000000000000000000000202611732125604017163 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "ipc:///tmp/tester" ; basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR); return 0 ; } zeromq-2.2.0.orig/tests/Makefile.in0000664000000000000000000006107111737024114015703 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = test_pair_inproc$(EXEEXT) test_pair_tcp$(EXEEXT) \ test_reqrep_inproc$(EXEEXT) test_reqrep_tcp$(EXEEXT) \ test_hwm$(EXEEXT) $(am__EXEEXT_1) @ON_MINGW_FALSE@am__append_1 = test_shutdown_stress \ @ON_MINGW_FALSE@ test_pair_ipc \ @ON_MINGW_FALSE@ test_reqrep_ipc \ @ON_MINGW_FALSE@ test_timeo subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = @ON_MINGW_FALSE@am__EXEEXT_1 = test_shutdown_stress$(EXEEXT) \ @ON_MINGW_FALSE@ test_pair_ipc$(EXEEXT) \ @ON_MINGW_FALSE@ test_reqrep_ipc$(EXEEXT) test_timeo$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am_test_hwm_OBJECTS = test_hwm.$(OBJEXT) test_hwm_OBJECTS = $(am_test_hwm_OBJECTS) test_hwm_LDADD = $(LDADD) test_hwm_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am_test_pair_inproc_OBJECTS = test_pair_inproc.$(OBJEXT) test_pair_inproc_OBJECTS = $(am_test_pair_inproc_OBJECTS) test_pair_inproc_LDADD = $(LDADD) test_pair_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_pair_ipc_SOURCES_DIST = test_pair_ipc.cpp testutil.hpp @ON_MINGW_FALSE@am_test_pair_ipc_OBJECTS = test_pair_ipc.$(OBJEXT) test_pair_ipc_OBJECTS = $(am_test_pair_ipc_OBJECTS) test_pair_ipc_LDADD = $(LDADD) test_pair_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_pair_tcp_OBJECTS = test_pair_tcp.$(OBJEXT) test_pair_tcp_OBJECTS = $(am_test_pair_tcp_OBJECTS) test_pair_tcp_LDADD = $(LDADD) test_pair_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_reqrep_inproc_OBJECTS = test_reqrep_inproc.$(OBJEXT) test_reqrep_inproc_OBJECTS = $(am_test_reqrep_inproc_OBJECTS) test_reqrep_inproc_LDADD = $(LDADD) test_reqrep_inproc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_reqrep_ipc_SOURCES_DIST = test_reqrep_ipc.cpp testutil.hpp @ON_MINGW_FALSE@am_test_reqrep_ipc_OBJECTS = \ @ON_MINGW_FALSE@ test_reqrep_ipc.$(OBJEXT) test_reqrep_ipc_OBJECTS = $(am_test_reqrep_ipc_OBJECTS) test_reqrep_ipc_LDADD = $(LDADD) test_reqrep_ipc_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_test_reqrep_tcp_OBJECTS = test_reqrep_tcp.$(OBJEXT) test_reqrep_tcp_OBJECTS = $(am_test_reqrep_tcp_OBJECTS) test_reqrep_tcp_LDADD = $(LDADD) test_reqrep_tcp_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_shutdown_stress_SOURCES_DIST = test_shutdown_stress.cpp @ON_MINGW_FALSE@am_test_shutdown_stress_OBJECTS = \ @ON_MINGW_FALSE@ test_shutdown_stress.$(OBJEXT) test_shutdown_stress_OBJECTS = $(am_test_shutdown_stress_OBJECTS) test_shutdown_stress_LDADD = $(LDADD) test_shutdown_stress_DEPENDENCIES = $(top_builddir)/src/libzmq.la am__test_timeo_SOURCES_DIST = test_timeo.cpp @ON_MINGW_FALSE@am_test_timeo_OBJECTS = test_timeo.$(OBJEXT) test_timeo_OBJECTS = $(am_test_timeo_OBJECTS) test_timeo_LDADD = $(LDADD) test_timeo_DEPENDENCIES = $(top_builddir)/src/libzmq.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(test_hwm_SOURCES) $(test_pair_inproc_SOURCES) \ $(test_pair_ipc_SOURCES) $(test_pair_tcp_SOURCES) \ $(test_reqrep_inproc_SOURCES) $(test_reqrep_ipc_SOURCES) \ $(test_reqrep_tcp_SOURCES) $(test_shutdown_stress_SOURCES) \ $(test_timeo_SOURCES) DIST_SOURCES = $(test_hwm_SOURCES) $(test_pair_inproc_SOURCES) \ $(am__test_pair_ipc_SOURCES_DIST) $(test_pair_tcp_SOURCES) \ $(test_reqrep_inproc_SOURCES) \ $(am__test_reqrep_ipc_SOURCES_DIST) $(test_reqrep_tcp_SOURCES) \ $(am__test_shutdown_stress_SOURCES_DIST) \ $(am__test_timeo_SOURCES_DIST) ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_builddir)/include LDADD = $(top_builddir)/src/libzmq.la test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp test_hwm_SOURCES = test_hwm.cpp @ON_MINGW_FALSE@test_shutdown_stress_SOURCES = test_shutdown_stress.cpp @ON_MINGW_FALSE@test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp @ON_MINGW_FALSE@test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp @ON_MINGW_FALSE@test_timeo_SOURCES = test_timeo.cpp TESTS = $(noinst_PROGRAMS) all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_hwm$(EXEEXT): $(test_hwm_OBJECTS) $(test_hwm_DEPENDENCIES) @rm -f test_hwm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_hwm_OBJECTS) $(test_hwm_LDADD) $(LIBS) test_pair_inproc$(EXEEXT): $(test_pair_inproc_OBJECTS) $(test_pair_inproc_DEPENDENCIES) @rm -f test_pair_inproc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_inproc_OBJECTS) $(test_pair_inproc_LDADD) $(LIBS) test_pair_ipc$(EXEEXT): $(test_pair_ipc_OBJECTS) $(test_pair_ipc_DEPENDENCIES) @rm -f test_pair_ipc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_ipc_OBJECTS) $(test_pair_ipc_LDADD) $(LIBS) test_pair_tcp$(EXEEXT): $(test_pair_tcp_OBJECTS) $(test_pair_tcp_DEPENDENCIES) @rm -f test_pair_tcp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_pair_tcp_OBJECTS) $(test_pair_tcp_LDADD) $(LIBS) test_reqrep_inproc$(EXEEXT): $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_DEPENDENCIES) @rm -f test_reqrep_inproc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_inproc_OBJECTS) $(test_reqrep_inproc_LDADD) $(LIBS) test_reqrep_ipc$(EXEEXT): $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_DEPENDENCIES) @rm -f test_reqrep_ipc$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_ipc_OBJECTS) $(test_reqrep_ipc_LDADD) $(LIBS) test_reqrep_tcp$(EXEEXT): $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_DEPENDENCIES) @rm -f test_reqrep_tcp$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_reqrep_tcp_OBJECTS) $(test_reqrep_tcp_LDADD) $(LIBS) test_shutdown_stress$(EXEEXT): $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_DEPENDENCIES) @rm -f test_shutdown_stress$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_shutdown_stress_OBJECTS) $(test_shutdown_stress_LDADD) $(LIBS) test_timeo$(EXEEXT): $(test_timeo_OBJECTS) $(test_timeo_DEPENDENCIES) @rm -f test_timeo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_timeo_OBJECTS) $(test_timeo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_hwm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_inproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_pair_tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_inproc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_reqrep_tcp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_shutdown_stress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_timeo.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ echo "$$grn$$dashes"; \ else \ echo "$$red$$dashes"; \ fi; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes$$std"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstPROGRAMS ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/tests/test_reqrep_inproc.cpp0000664000000000000000000000202211732125604020241 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "inproc://tester" ; basic_tests (transport, ZMQ_REQ, ZMQ_REP); return 0 ; } zeromq-2.2.0.orig/tests/test_pair_inproc.cpp0000664000000000000000000000202411732125604017700 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "inproc://tester" ; basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR); return 0 ; } zeromq-2.2.0.orig/tests/testutil.hpp0000664000000000000000000000773711732125604016236 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TEST_TESTUTIL_HPP_INCLUDED__ #define __ZMQ_TEST_TESTUTIL_HPP_INCLUDED__ #include #include #include #include #include "../include/zmq.hpp" namespace zmqtestutil { using namespace std ; typedef std::pair socket_pair; // Create a pair of sockets connected to each other. socket_pair create_bound_pair (zmq::context_t *context_, int t1_, int t2_, const char *transport_) { zmq::socket_t *s1 = new zmq::socket_t (*context_, t1_); zmq::socket_t *s2 = new zmq::socket_t (*context_, t2_); s1->bind (transport_); s2->connect (transport_); return socket_pair (s1, s2); } // Send a message from one socket in the pair to the other and back. std::string ping_pong (const socket_pair &sp_, const std::string &orig_msg_) { zmq::socket_t &s1 = *sp_.first; zmq::socket_t &s2 = *sp_.second; // Construct message to send. zmq::message_t ping (orig_msg_.size ()); memcpy (ping.data (), orig_msg_.c_str (), orig_msg_.size ()); // Send ping out. s1.send (ping, 0); // Get pong from connected socket. zmq::message_t pong; s2.recv (&pong, 0); // Send message via s2, so state is clean in case of req/rep. std::string ret ((char*) pong.data(), pong.size ()); s2.send (pong, 0); // Return received data as std::string. return ret ; } /* Run basic tests for the given transport. Basic tests are: * ping pong as defined above. * send receive where the receive is signalled by zmq::poll */ void basic_tests (const char *transport_, int t1_, int t2_) { zmq::context_t context (1); zmq::pollitem_t items [2]; socket_pair p = create_bound_pair (&context, t1_, t2_, transport_); // First test simple ping pong. const string expect ("XXX"); { const string returned = zmqtestutil::ping_pong (p, expect); assert (expect == returned); // Adjust socket state so that poll shows only 1 pending message. zmq::message_t mx ; p.first->recv (&mx, 0); } { // Now poll is used to singal that a message is ready to read. zmq::message_t m1 (expect.size ()); memcpy (m1.data (), expect.c_str (), expect.size ()); items [0].socket = *p.first; items [0].fd = 0; items [0].events = ZMQ_POLLIN; items [0].revents = 0; items [1].socket = *p.second; items [1].fd = 0; items [1].events = ZMQ_POLLIN; items [1].revents = 0; p.first->send (m1, 0); int rc = zmq::poll (&items [0], 2, -1); assert (rc == 1); assert ((items [1].revents & ZMQ_POLLIN) != 0); zmq::message_t m2; p.second->recv (&m2, 0); const string ret ((char*) m2.data (), m2.size ()); assert (expect == ret); } // Delete sockets. delete (p.first); delete (p.second); } } #endif zeromq-2.2.0.orig/tests/test_pair_tcp.cpp0000664000000000000000000000203011732125604017171 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "tcp://127.0.0.1:5560"; basic_tests (transport, ZMQ_PAIR, ZMQ_PAIR); return 0 ; } zeromq-2.2.0.orig/tests/test_reqrep_ipc.cpp0000664000000000000000000000202411732125604017524 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "ipc:///tmp/tester" ; basic_tests (transport, ZMQ_REQ, ZMQ_REP); return 0 ; } zeromq-2.2.0.orig/tests/test_hwm.cpp0000664000000000000000000000363111732125604016173 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" #include "../src/stdint.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { uint64_t hwm = 5; int linger = 0; zmq::context_t context (1); zmq::socket_t s1 (context, ZMQ_PULL); zmq::socket_t s2 (context, ZMQ_PUSH); s2.setsockopt (ZMQ_LINGER, &linger, sizeof (int)); s2.setsockopt (ZMQ_HWM, &hwm, sizeof (uint64_t)); s1.bind ("tcp://127.0.0.1:5858"); s2.connect ("tcp://127.0.0.1:5858"); for (int i = 0; i < 10; i++) { zmq::message_t msg (sizeof ("test") - 1); memcpy (msg.data (), "test", sizeof ("test") - 1); bool sent = s2.send (msg, ZMQ_NOBLOCK); // Anything below HWM should be sent if (i < 5) { assert (sent); } else { assert (!sent && errno == EAGAIN); } } // There should be now 5 messages pending, consume one zmq::message_t msg; bool received = s1.recv (&msg, 0); assert (received); // Now it should be possible to send one more bool sent = s2.send (msg, 0); assert (sent); return 0; } zeromq-2.2.0.orig/tests/test_timeo.cpp0000664000000000000000000000735111737023311016515 0ustar rootroot/* Copyright (c) 2010-2011 250bpm s.r.o. Copyright (c) 2010-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include #include "../include/zmq.h" #include "../include/zmq_utils.h" extern "C" { void *worker(void *ctx) { // Worker thread connects after delay of 1 second. Then it waits // for 1 more second, so that async connect has time to succeed. zmq_sleep (1); void *sc = zmq_socket (ctx, ZMQ_PUSH); assert (sc); int rc = zmq_connect (sc, "inproc://timeout_test"); assert (rc == 0); zmq_sleep (1); rc = zmq_close (sc); assert (rc == 0); return NULL; } } int main (int argc, char *argv []) { fprintf (stderr, "test_timeo running...\n"); void *ctx = zmq_init (1); assert (ctx); // Create a disconnected socket. void *sb = zmq_socket (ctx, ZMQ_PULL); assert (sb); int rc = zmq_bind (sb, "inproc://timeout_test"); assert (rc == 0); // Check whether non-blocking recv returns immediately. zmq_msg_t msg; zmq_msg_init (&msg); rc = zmq_recv (sb, &msg, ZMQ_NOBLOCK); assert (rc == -1); assert (zmq_errno() == EAGAIN); // Check whether recv timeout is honoured. int timeout = 500; size_t timeout_size = sizeof timeout; rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); assert (rc == 0); void *watch = zmq_stopwatch_start (); rc = zmq_recv (sb, &msg, 0); assert (rc == -1); assert (zmq_errno () == EAGAIN); unsigned long elapsed = zmq_stopwatch_stop (watch); assert (elapsed > 440000 && elapsed < 550000); // Check whether connection during the wait doesn't distort the timeout. timeout = 2000; rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); assert (rc == 0); pthread_t thread; rc = pthread_create (&thread, NULL, worker, ctx); assert (rc == 0); watch = zmq_stopwatch_start (); rc = zmq_recv (sb, &msg, 0); assert (rc == -1); assert (zmq_errno () == EAGAIN); elapsed = zmq_stopwatch_stop (watch); assert (elapsed > 1900000 && elapsed < 2100000); rc = pthread_join (thread, NULL); assert (rc == 0); // Check that timeouts don't break normal message transfer. void *sc = zmq_socket (ctx, ZMQ_PUSH); assert (sc); rc = zmq_setsockopt(sb, ZMQ_RCVTIMEO, &timeout, timeout_size); assert (rc == 0); rc = zmq_setsockopt(sb, ZMQ_SNDTIMEO, &timeout, timeout_size); assert (rc == 0); rc = zmq_connect (sc, "inproc://timeout_test"); assert (rc == 0); zmq_msg_init (&msg); zmq_msg_init_size (&msg, 32); memcpy (zmq_msg_data (&msg), "12345678ABCDEFGH12345678abcdefgh", 32); rc = zmq_send (sc, &msg, 0); assert (rc == 0); rc = zmq_recv (sb, &msg, 0); assert (rc == 0); assert (32 == zmq_msg_size(&msg)); // Clean-up. rc = zmq_close (sc); assert (rc == 0); rc = zmq_close (sb); assert (rc == 0); rc = zmq_term (ctx); assert (rc == 0); return 0 ; } zeromq-2.2.0.orig/tests/test_reqrep_tcp.cpp0000664000000000000000000000202711732125604017542 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "testutil.hpp" using namespace std; using namespace zmqtestutil; int main (int argc, char *argv []) { const char *transport = "tcp://127.0.0.1:5560" ; basic_tests (transport, ZMQ_REQ, ZMQ_REP); return 0 ; } zeromq-2.2.0.orig/tests/test_shutdown_stress.cpp0000664000000000000000000000420711732125604020656 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include #include #include #define THREAD_COUNT 100 extern "C" { static void *worker (void *s) { int rc; rc = zmq_connect (s, "tcp://127.0.0.1:5560"); assert (rc == 0); // Start closing the socket while the connecting process is underway. rc = zmq_close (s); assert (rc == 0); return NULL; } } int main (int argc, char *argv []) { void *ctx; void *s1; void *s2; int i; int j; int rc; pthread_t threads [THREAD_COUNT]; for (j = 0; j != 10; j++) { // Check the shutdown with many parallel I/O threads. ctx = zmq_init (7); assert (ctx); s1 = zmq_socket (ctx, ZMQ_REP); assert (s1); rc = zmq_bind (s1, "tcp://127.0.0.1:5560"); assert (rc == 0); for (i = 0; i != THREAD_COUNT; i++) { s2 = zmq_socket (ctx, ZMQ_SUB); assert (s2); rc = pthread_create (&threads [i], NULL, worker, s2); assert (rc == 0); } for (i = 0; i != THREAD_COUNT; i++) { rc = pthread_join (threads [i], NULL); assert (rc == 0); } rc = zmq_close (s1); assert (rc == 0); rc = zmq_term (ctx); assert (rc == 0); } return 0; } zeromq-2.2.0.orig/tests/Makefile.am0000664000000000000000000000165611737023311015673 0ustar rootrootINCLUDES = -I$(top_builddir)/include LDADD = $(top_builddir)/src/libzmq.la noinst_PROGRAMS = test_pair_inproc \ test_pair_tcp \ test_reqrep_inproc \ test_reqrep_tcp \ test_hwm if !ON_MINGW noinst_PROGRAMS += test_shutdown_stress \ test_pair_ipc \ test_reqrep_ipc \ test_timeo endif test_pair_inproc_SOURCES = test_pair_inproc.cpp testutil.hpp test_pair_tcp_SOURCES = test_pair_tcp.cpp testutil.hpp test_reqrep_inproc_SOURCES = test_reqrep_inproc.cpp testutil.hpp test_reqrep_tcp_SOURCES = test_reqrep_tcp.cpp testutil.hpp test_hwm_SOURCES = test_hwm.cpp if !ON_MINGW test_shutdown_stress_SOURCES = test_shutdown_stress.cpp test_pair_ipc_SOURCES = test_pair_ipc.cpp testutil.hpp test_reqrep_ipc_SOURCES = test_reqrep_ipc.cpp testutil.hpp test_timeo_SOURCES = test_timeo.cpp endif TESTS = $(noinst_PROGRAMS) zeromq-2.2.0.orig/COPYING0000664000000000000000000010451511732125604013531 0ustar rootroot GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . zeromq-2.2.0.orig/configure.in0000664000000000000000000003227311737024001015002 0ustar rootroot# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.61) # # The 0MQ version number is extracted from include/zmq.h using # the version.sh script. Hence, it should be updated there. # The version in git should reflect the *next* version planned. # AC_INIT([zeromq],[m4_esyscmd([./version.sh])],[zeromq-dev@lists.zeromq.org]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) AM_CONFIG_HEADER(src/platform.hpp) AM_INIT_AUTOMAKE(tar-ustar dist-zip foreign) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # This lets us use PACKAGE_VERSION in Makefiles AC_SUBST(PACKAGE_VERSION) # Libtool -version-info (ABI version) # # Don't change this unless you know exactly what you're doing and have read and # understand: # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # Changes: # # ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable") # ZeroMQ version 2.1.0: 1:0:0 # ZeroMQ version 2.2.0: 1:1:0 # # libzmq -version-info current:revision:age LTVER="1:1:0" AC_SUBST(LTVER) # Take a copy of original flags ZMQ_ORIG_CFLAGS="${CFLAGS:-none}" ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}" ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}" # Checks for programs. AC_PROG_CC AC_PROG_CC_C99 AC_PROG_CXX AM_PROG_CC_C_O AC_PROG_SED AC_PROG_AWK AC_ARG_VAR([XMLTO], [Path to xmlto command]) AC_PATH_PROG([XMLTO], [xmlto]) AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) AC_PATH_PROG([ASCIIDOC], [asciidoc]) LIBZMQ_CONFIG_LIBTOOL AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL # Check whether to build a with debug symbols LIBZMQ_CHECK_ENABLE_DEBUG # Check wheter to enable code coverage LIBZMQ_WITH_GCOV # Checks for libraries. AC_CHECK_LIB([pthread], [pthread_create]) # Set pedantic libzmq_pedantic="yes" # By default compiling with -Werror except OSX. libzmq_werror="yes" # By default use DSO visibility libzmq_dso_visibility="yes" # Whether we are on mingw or not. libzmq_on_mingw32="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" # For host type checks AC_CANONICAL_HOST # OS-specific tests case "${host_os}" in *linux*) # Define on Linux to enable all library features. Define if using a gnu compiler if test "x$GXX" = "xyes"; then CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" fi AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS]) AC_CHECK_LIB(rt, sem_init) AC_CHECK_LIB(uuid, uuid_generate, , [AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])]) case "${host_os}" in *android*) AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS]) ;; esac ;; *solaris*) # Define on Solaris to enable all library features CPPFLAGS="-D_PTHREADS $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_SOLARIS, 1, [Have Solaris OS]) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(rt, sem_init) AC_CHECK_LIB(uuid, uuid_generate, , [AC_MSG_ERROR([cannot link with -luuid, install uuid-dev.])]) AC_MSG_CHECKING([whether atomic operations can be used]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])], [solaris_has_atomic=yes], [solaris_has_atomic=no]) AC_MSG_RESULT([$solaris_has_atomic]) # Solaris 8 does not have atomic operations exported to user space. if test "x$solaris_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi ;; *freebsd*) # Define on FreeBSD to enable all library features CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_FREEBSD, 1, [Have FreeBSD OS]) ;; *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" libzmq_pedantic="no" libzmq_werror="no" AC_DEFINE(ZMQ_HAVE_OSX, 1, [Have DarwinOSX OS]) AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-uninitialized]) AC_LANG_POP([C++]) ;; *netbsd*) # Define on NetBSD to enable all library features CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_NETBSD, 1, [Have NetBSD OS]) # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. libzmq_netbsd_has_atomic=no AC_MSG_CHECKING([whether atomic operations can be used]) AC_LANG_PUSH([C++]) AC_LINK_IFELSE([AC_LANG_PROGRAM( [[#include ]], [[uint32_t value; atomic_cas_32 (&value, 0, 0); return 0;]])], [libzmq_netbsd_has_atomic=yes], [libzmq_netbsd_has_atomic=no]) AC_LANG_POP([C++]) AC_MSG_RESULT([$libzmq_netbsd_has_atomic]) if test "x$libzmq_netbsd_has_atomic" = "xno"; then AC_DEFINE(ZMQ_FORCE_MUTEXES, 1, [Force to use mutexes]) fi ;; *openbsd*) # Define on OpenBSD to enable all library features CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_OPENBSD, 1, [Have OpenBSD OS]) ;; *nto-qnx*) libzmq_pedantic="no" AC_DEFINE(ZMQ_HAVE_QNXNTO, 1, [Have QNX Neutrino OS]) AC_CHECK_LIB(socket, socket) AC_CHECK_LIB(crypto, RAND_bytes) ;; *aix*) AC_DEFINE(ZMQ_HAVE_AIX, 1, [Have AIX OS]) AC_CHECK_LIB(crypto,RAND_bytes) ;; *hpux*) # Define on HP-UX to enable all library features CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_HPUX, 1, [Have HPUX OS]) AC_CHECK_LIB(rt, sem_init) AC_ARG_WITH([dce], [AS_HELP_STRING([--without-dce], [HP-UX only: Do not use DCE library for UUID functions])],, [], [with_dce=yes]) AS_IF([test "x$with_dce" != xno], [AC_CHECK_LIB(dcekt, uuid_create)], [AC_CHECK_LIB(crypto, RAND_bytes)]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Ae]) AC_CHECK_FUNCS(gethrtime) ;; *mingw32*) AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS]) AC_DEFINE(ZMQ_HAVE_MINGW32, 1, [Have MinGW32]) AC_CHECK_HEADERS(windows.h) AC_CHECK_LIB(ws2_32, main, , [AC_MSG_ERROR([cannot link with ws2_32.dll.])]) AC_CHECK_LIB(rpcrt4, main, , [AC_MSG_ERROR([cannot link with rpcrt4.dll.])]) AC_CHECK_LIB(iphlpapi, main, , [AC_MSG_ERROR([cannot link with iphlpapi.dll.])]) # mingw32 defines __int64_t as long long AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Wno-long-long]) AC_LANG_POP([C++]) libzmq_on_mingw32="yes" libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under MinGW32]) fi ;; *cygwin*) # Define on Cygwin to enable all library features CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" AC_DEFINE(ZMQ_HAVE_CYGWIN, 1, [Have Cygwin]) # Cygwin provides libuuid as part of the e2fsprogs package, and somewhat # uselessly installs the library in /usr/lib/e2fsprogs LDFLAGS="-L/usr/lib/e2fsprogs ${LDFLAGS}" AC_CHECK_LIB(uuid, uuid_generate, , [AC_MSG_ERROR([cannot link with -luuid, install the e2fsprogs package.])]) if test "x$enable_static" = "xyes"; then AC_MSG_ERROR([Building static libraries is not supported under Cygwin]) fi ;; *) AC_MSG_ERROR([unsupported system: ${host_os}.]) ;; esac # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # if test "x$libzmq_dso_visibility" = "xyes"; then AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_VISIBILITY([LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}"]) AC_LANG_POP([C++]) fi # CPU-specific optimizations case "${host_cpu}" in *sparc*) AC_LANG_PUSH([C++]) LIBZMQ_CHECK_LANG_FLAG_PREPEND([-mcpu=v9]) AC_LANG_POP([C++]) ;; *) ;; esac # Check whether to build docs / install man pages LIBZMQ_CHECK_DOC_BUILD # Check polling system LIBZMQ_CHECK_POLLER([CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}"], [AC_MSG_ERROR([Unable to continue without polling system])]) # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \ stdlib.h string.h sys/socket.h sys/time.h time.h unistd.h limits.h) # Check if we have ifaddrs.h header file. AC_CHECK_HEADERS(ifaddrs.h, [AC_DEFINE(ZMQ_HAVE_IFADDRS, 1, [Have ifaddrs.h header.])]) # Use c++ in subsequent tests AC_LANG_PUSH(C++) AC_HEADER_STDBOOL AC_C_CONST AC_C_INLINE # Checks for typedefs, structures, and compiler characteristics. if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then dnl 279: controlling expression is constant dnl Fixes build with ICC 12.x LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SIZE_T]) LIBZMQ_CHECK_WITH_FLAG([-wd279], [AC_TYPE_SSIZE_T]) else AC_TYPE_SIZE_T AC_TYPE_SSIZE_T fi AC_HEADER_TIME AC_TYPE_UINT32_T AC_C_VOLATILE # PGM extension libzmq_pgm_ext="no" pgm_basename="libpgm-5.1.118~dfsg" AC_ARG_WITH([pgm], [AS_HELP_STRING([--with-pgm], [build libzmq with PGM extension [default=no]])], [with_pgm_ext=$withval], [with_pgm_ext=no]) # build using system pgm AC_ARG_WITH([system-pgm], [AS_HELP_STRING([--with-system-pgm], [build libzmq with PGM extension. Requires pkg-config [default=no]])], [with_system_pgm_ext=yes], [with_system_pgm_ext=no]) if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then AC_MSG_ERROR([--with-pgm and --with-system-pgm cannot be specified together]) fi if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm # and using ./configure --with-pgm=libpgm-x.y.z if test "x$with_pgm_ext" != "xyes"; then pgm_basename="$with_pgm_ext" fi # Unpack libpgm AC_MSG_NOTICE([Unpacking ${pgm_basename}.tar.gz]) libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then AC_MSG_ERROR([cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file]) fi cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging fi mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi # DSO symbol visibility for openpgm AC_LANG_PUSH([C]) LIBZMQ_CHECK_LANG_VISIBILITY([ac_configure_args="CFLAGS='$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag' ${ac_configure_args}"]) AC_LANG_POP([C]) pgm_subdir=build-staging/openpgm/pgm AC_SUBST(pgm_subdir) AC_SUBST(pgm_srcdir) AC_CONFIG_SUBDIRS([foreign/openpgm/build-staging/openpgm/pgm/]) # Success! AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) libzmq_pgm_ext="yes" fi # Build with system openpgm if test "x$with_system_pgm_ext" != "xno"; then m4_ifdef([PKG_CHECK_MODULES], [ PKG_CHECK_MODULES([OpenPGM], [openpgm-5.1 >= 5.1]) AC_DEFINE(ZMQ_HAVE_OPENPGM, 1, [Have OpenPGM extension]) LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" LIBS="$OpenPGM_LIBS $LIBS" ], [AC_MSG_ERROR([--with-system-pgm requires a working pkg-config installation])]) fi AC_SUBST(pgm_basename) # Set -Wall, -Werror and -pedantic AC_LANG_PUSH([C++]) # Check how to enable -Wall LIBZMQ_LANG_WALL([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag $CPPFLAGS"]) if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" != "xyes"; then LIBZMQ_LANG_WERROR([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag $CPPFLAGS"]) fi if test "x$libzmq_pedantic" = "xyes"; then LIBZMQ_LANG_STRICT([CPPFLAGS="$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag $CPPFLAGS"]) fi AC_LANG_POP([C++]) AM_CONDITIONAL(BUILD_PGM, test "x$libzmq_pgm_ext" = "xyes") AM_CONDITIONAL(ON_MINGW, test "x$libzmq_on_mingw32" = "xyes") # Checks for library functions. AC_TYPE_SIGNAL AC_CHECK_FUNCS(perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs) AC_CHECK_HEADERS([alloca.h]) LIBZMQ_CHECK_SOCK_CLOEXEC([AC_DEFINE( [HAVE_SOCK_CLOEXEC], [1], [Whether SOCK_CLOEXEC is defined and functioning.]) ]) # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS AC_SUBST(LIBZMQ_EXTRA_CFLAGS) AC_SUBST(LIBZMQ_EXTRA_CXXFLAGS) AC_SUBST(LIBZMQ_EXTRA_LDFLAGS) AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc \ builds/msvc/Makefile tests/Makefile \ foreign/openpgm/Makefile \ builds/redhat/zeromq.spec]) AC_OUTPUT zeromq-2.2.0.orig/zeromq.spec0000664000000000000000000000722111741762444014674 0ustar rootrootName: zeromq Version: 2.2.0 Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet License: LGPLv3+ URL: http://www.zeromq.org/ Source: http://download.zeromq.org/%{name}-%{version}.tar.gz Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc, make, gcc-c++, libstdc++-devel Requires: libstdc++ %if %{?rhel}%{!?rhel:0} >= 6 BuildRequires: libuuid-devel Requires: libuuid %elseif %{?rhel}%{!?rhel:0} >= 5 BuildRequires: e2fsprogs-devel Requires: e2fsprogs %else BuildRequires: uuid-devel Requires: uuid %endif # Build pgm only on supported archs %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 BuildRequires: glib2-devel Requires: glib2 %endif %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the ZeroMQ shared library. %package devel Summary: Development files and static library for the ZeroMQ library Group: Development/Libraries Requires: %{name} = %{version}-%{release}, pkgconfig %description devel The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains ZeroMQ related development libraries and header files. %prep %setup -q %build %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %configure --with-pgm %else %configure %endif %{__make} %{?_smp_mflags} %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Install the package to build area %{__make} check %makeinstall %post /sbin/ldconfig %postun /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) # docs in the main package %doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README # libraries %{_libdir}/libzmq.so.1 %{_libdir}/libzmq.so.1.0.0 %{_mandir}/man7/zmq.7.gz %files devel %defattr(-,root,root,-) %{_includedir}/zmq.h %{_includedir}/zmq.hpp %{_includedir}/zmq_utils.h %{_libdir}/libzmq.la %{_libdir}/libzmq.a %{_libdir}/pkgconfig/libzmq.pc %{_libdir}/libzmq.so %{_mandir}/man3/zmq_bind.3.gz %{_mandir}/man3/zmq_close.3.gz %{_mandir}/man3/zmq_connect.3.gz %{_mandir}/man3/zmq_errno.3.gz %{_mandir}/man3/zmq_device.3.gz %{_mandir}/man3/zmq_getsockopt.3.gz %{_mandir}/man3/zmq_init.3.gz %{_mandir}/man3/zmq_msg_close.3.gz %{_mandir}/man3/zmq_msg_copy.3.gz %{_mandir}/man3/zmq_msg_data.3.gz %{_mandir}/man3/zmq_msg_init.3.gz %{_mandir}/man3/zmq_msg_init_data.3.gz %{_mandir}/man3/zmq_msg_init_size.3.gz %{_mandir}/man3/zmq_msg_move.3.gz %{_mandir}/man3/zmq_msg_size.3.gz %{_mandir}/man3/zmq_poll.3.gz %{_mandir}/man3/zmq_recv.3.gz %{_mandir}/man3/zmq_send.3.gz %{_mandir}/man3/zmq_setsockopt.3.gz %{_mandir}/man3/zmq_socket.3.gz %{_mandir}/man3/zmq_strerror.3.gz %{_mandir}/man3/zmq_term.3.gz %{_mandir}/man3/zmq_version.3.gz %{_mandir}/man7/zmq_cpp.7.gz %{_mandir}/man7/zmq_epgm.7.gz %{_mandir}/man7/zmq_inproc.7.gz %{_mandir}/man7/zmq_ipc.7.gz %{_mandir}/man7/zmq_pgm.7.gz %{_mandir}/man7/zmq_tcp.7.gz %changelog * Sat Apr 10 2010 Mikko Koppanen 2.0.7-1 - Initial packaging zeromq-2.2.0.orig/configure0000775000000000000000000250132311737024115014405 0ustar rootroot#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.68 for zeromq 2.2.0. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: zeromq-dev@lists.zeromq.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='zeromq' PACKAGE_TARNAME='zeromq' PACKAGE_VERSION='2.2.0' PACKAGE_STRING='zeromq 2.2.0' PACKAGE_BUGREPORT='zeromq-dev@lists.zeromq.org' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS LIBZMQ_EXTRA_LDFLAGS LIBZMQ_EXTRA_CXXFLAGS LIBZMQ_EXTRA_CFLAGS ON_MINGW_FALSE ON_MINGW_TRUE BUILD_PGM_FALSE BUILD_PGM_TRUE pgm_basename OpenPGM_LIBS OpenPGM_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG subdirs pgm_srcdir pgm_subdir INSTALL_MAN_FALSE INSTALL_MAN_TRUE BUILD_DOC_FALSE BUILD_DOC_TRUE libzmq_have_xmlto libzmq_have_asciidoc CXXCPP CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP LIBTOOL OBJDUMP DLLTOOL AS host_os host_vendor host_cpu host build_os build_vendor build_cpu build ASCIIDOC XMLTO SED am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC LTVER AM_BACKSLASH AM_DEFAULT_VERBOSITY am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_debug with_gcov with_dce with_documentation with_poller with_pgm with_system_pgm ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC XMLTO ASCIIDOC CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR OpenPGM_CFLAGS OpenPGM_LIBS' ac_subdirs_all='foreign/openpgm/build-staging/openpgm/pgm/' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures zeromq 2.2.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/zeromq] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of zeromq 2.2.0:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable debugging information [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-gcov=yes/no With GCC Code Coverage reporting. --without-dce HP-UX only: Do not use DCE library for UUID functions --without-documentation disable documentation build even if asciidoc and xmlto are present [default=no] --with-poller choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select [default=autodetect] --with-pgm build libzmq with PGM extension [default=no] --with-system-pgm build libzmq with PGM extension. Requires pkg-config [default=no] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags XMLTO Path to xmlto command ASCIIDOC Path to asciidoc command CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path OpenPGM_CFLAGS C compiler flags for OpenPGM, overriding pkg-config OpenPGM_LIBS linker flags for OpenPGM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF zeromq configure 2.2.0 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to zeromq-dev@lists.zeromq.org ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0 ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to zeromq-dev@lists.zeromq.org ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by zeromq $as_me 2.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers src/platform.hpp" am__api_version='1.11' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='zeromq' VERSION='2.2.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' _am_tools=${am_cv_prog_tar_ustar-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac AM_BACKSLASH='\' # This lets us use PACKAGE_VERSION in Makefiles # Libtool -version-info (ABI version) # # Don't change this unless you know exactly what you're doing and have read and # understand: # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html # # Changes: # # ZeroMQ versions prior to 2.1.0 use 0.0.0 ("unstable") # ZeroMQ version 2.1.0: 1:0:0 # ZeroMQ version 2.2.0: 1:1:0 # # libzmq -version-info current:revision:age LTVER="1:1:0" # Take a copy of original flags ZMQ_ORIG_CFLAGS="${CFLAGS:-none}" ZMQ_ORIG_CPPFLAGS="${CPPFLAGS:-none}" ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK your preprocessor is broken; #endif #if BIG_OK #else your preprocessor is broken; #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\0'; ++i) continue; return 0; } // Check varargs and va_copy. static void test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str; int number; float fnumber; while (*format) { switch (*format++) { case 's': // string str = va_arg (args_copy, const char *); break; case 'd': // int number = va_arg (args_copy, int); break; case 'f': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. test_varargs ("s, d' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_XMLTO+:} false; then : $as_echo_n "(cached) " >&6 else case $XMLTO in [\\/]* | ?:[\\/]*) ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi XMLTO=$ac_cv_path_XMLTO if test -n "$XMLTO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLTO" >&5 $as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "asciidoc", so it can be a program name with args. set dummy asciidoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ASCIIDOC+:} false; then : $as_echo_n "(cached) " >&6 else case $ASCIIDOC in [\\/]* | ?:[\\/]*) ac_cv_path_ASCIIDOC="$ASCIIDOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ASCIIDOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ASCIIDOC=$ac_cv_path_ASCIIDOC if test -n "$ASCIIDOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ASCIIDOC" >&5 $as_echo "$ASCIIDOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { # Libtool configuration for different targets case "${host_os}" in *mingw32*|*cygwin*) # Disable static build by default # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=no fi ;; *) # Everything else with static enabled # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi ;; esac } enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4' macro_revision='1.3293' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf # Set options enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' lt_prog_compiler_pic='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Check whether to build a with debug symbols { # For that the compiler works and try to come up with the type ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } if ${libzmq_cv_c_compiler_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_c_compiler_works="yes" ; else libzmq_cv_c_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_compiler_works" >&5 $as_echo "$libzmq_cv_c_compiler_works" >&6; } if test "x$libzmq_cv_c_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C compiler" >&5 $as_echo_n "checking whether we are using Intel C compiler... " >&6; } if ${libzmq_cv_c_intel_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __INTEL_COMPILER error if not ICC #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_intel_compiler="yes" ; else libzmq_cv_c_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_intel_compiler" >&5 $as_echo "$libzmq_cv_c_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C compiler... " >&6; } if ${libzmq_cv_c_sun_studio_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_sun_studio_compiler="yes" ; else libzmq_cv_c_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_sun_studio_compiler" >&5 $as_echo "$libzmq_cv_c_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C compiler" >&5 $as_echo_n "checking whether we are using clang C compiler... " >&6; } if ${libzmq_cv_c_clang_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __clang__ error if not clang #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_clang_compiler="yes" ; else libzmq_cv_c_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_clang_compiler" >&5 $as_echo "$libzmq_cv_c_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C compiler... " >&6; } if ${libzmq_cv_c_gcc4_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : libzmq_cv_c_gcc4_compiler="yes" ; else libzmq_cv_c_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_c_gcc4_compiler" >&5 $as_echo "$libzmq_cv_c_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { # Test that compiler for the current language actually works { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } if ${libzmq_cv_cxx_compiler_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : libzmq_cv_cxx_compiler_works="yes" ; else libzmq_cv_cxx_compiler_works="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_compiler_works" >&5 $as_echo "$libzmq_cv_cxx_compiler_works" >&6; } if test "x$libzmq_cv_cxx_compiler_works" != "xyes"; then as_fn_error $? "Unable to find a working C++ compiler" "$LINENO" 5 fi } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Intel C++ compiler" >&5 $as_echo_n "checking whether we are using Intel C++ compiler... " >&6; } if ${libzmq_cv_cxx_intel_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __INTEL_COMPILER error if not ICC #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_intel_compiler="yes" ; else libzmq_cv_cxx_intel_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_intel_compiler" >&5 $as_echo "$libzmq_cv_cxx_intel_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Sun Studio C++ compiler" >&5 $as_echo_n "checking whether we are using Sun Studio C++ compiler... " >&6; } if ${libzmq_cv_cxx_sun_studio_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_sun_studio_compiler="yes" ; else libzmq_cv_cxx_sun_studio_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_sun_studio_compiler" >&5 $as_echo "$libzmq_cv_cxx_sun_studio_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using clang C++ compiler" >&5 $as_echo_n "checking whether we are using clang C++ compiler... " >&6; } if ${libzmq_cv_cxx_clang_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __clang__ error if not clang #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_clang_compiler="yes" ; else libzmq_cv_cxx_clang_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_clang_compiler" >&5 $as_echo "$libzmq_cv_cxx_clang_compiler" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using gcc >= 4 C++ compiler" >&5 $as_echo_n "checking whether we are using gcc >= 4 C++ compiler... " >&6; } if ${libzmq_cv_cxx_gcc4_compiler+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : libzmq_cv_cxx_gcc4_compiler="yes" ; else libzmq_cv_cxx_gcc4_compiler="no" ; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_gcc4_compiler" >&5 $as_echo "$libzmq_cv_cxx_gcc4_compiler" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi } { # Require compiler specifics # This flag is checked also in # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable debugging information" >&5 $as_echo_n "checking whether to enable debugging information... " >&6; } if test "x$enable_debug" = "xyes"; then # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi } # Check wheter to enable code coverage { # Require compiler specifics # Check whether --with-gcov was given. if test "${with_gcov+set}" = set; then : withval=$with_gcov; ZMQ_GCOV="$withval" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable code coverage" >&5 $as_echo_n "checking whether to enable code coverage... " >&6; } if test "x$ZMQ_GCOV" = "xyes"; then if test "x$GXX" != "xyes"; then as_fn_error $? "--with-gcov=yes works only with GCC" "$LINENO" 5 fi CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi CXXFLAGS="-fprofile-arcs" if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi LIBS="-lgcov ${LIBS}" fi if test "x$ZMQ_GCOV" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } # Checks for libraries. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi # Set pedantic libzmq_pedantic="yes" # By default compiling with -Werror except OSX. libzmq_werror="yes" # By default use DSO visibility libzmq_dso_visibility="yes" # Whether we are on mingw or not. libzmq_on_mingw32="no" # Set some default features required by 0MQ code. CPPFLAGS="-D_REENTRANT -D_THREAD_SAFE $CPPFLAGS" # For host type checks # OS-specific tests case "${host_os}" in *linux*) # Define on Linux to enable all library features. Define if using a gnu compiler if test "x$GXX" = "xyes"; then CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" fi $as_echo "#define ZMQ_HAVE_LINUX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5 $as_echo_n "checking for sem_init in -lrt... " >&6; } if ${ac_cv_lib_rt_sem_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_init (); int main () { return sem_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_sem_init=yes else ac_cv_lib_rt_sem_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5 $as_echo "$ac_cv_lib_rt_sem_init" >&6; } if test "x$ac_cv_lib_rt_sem_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 $as_echo_n "checking for uuid_generate in -luuid... " >&6; } if ${ac_cv_lib_uuid_uuid_generate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char uuid_generate (); int main () { return uuid_generate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes else ac_cv_lib_uuid_uuid_generate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUUID 1 _ACEOF LIBS="-luuid $LIBS" else as_fn_error $? "cannot link with -luuid, install uuid-dev." "$LINENO" 5 fi case "${host_os}" in *android*) $as_echo "#define ZMQ_HAVE_ANDROID 1" >>confdefs.h ;; esac ;; *solaris*) # Define on Solaris to enable all library features CPPFLAGS="-D_PTHREADS $CPPFLAGS" $as_echo "#define ZMQ_HAVE_SOLARIS 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5 $as_echo_n "checking for sem_init in -lrt... " >&6; } if ${ac_cv_lib_rt_sem_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_init (); int main () { return sem_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_sem_init=yes else ac_cv_lib_rt_sem_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5 $as_echo "$ac_cv_lib_rt_sem_init" >&6; } if test "x$ac_cv_lib_rt_sem_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 $as_echo_n "checking for uuid_generate in -luuid... " >&6; } if ${ac_cv_lib_uuid_uuid_generate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char uuid_generate (); int main () { return uuid_generate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes else ac_cv_lib_uuid_uuid_generate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUUID 1 _ACEOF LIBS="-luuid $LIBS" else as_fn_error $? "cannot link with -luuid, install uuid-dev." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5 $as_echo_n "checking whether atomic operations can be used... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { uint32_t value; atomic_cas_32 (&value, 0, 0); return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : solaris_has_atomic=yes else solaris_has_atomic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $solaris_has_atomic" >&5 $as_echo "$solaris_has_atomic" >&6; } # Solaris 8 does not have atomic operations exported to user space. if test "x$solaris_has_atomic" = "xno"; then $as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h fi ;; *freebsd*) # Define on FreeBSD to enable all library features CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_FREEBSD 1" >>confdefs.h ;; *darwin*) # Define on Darwin to enable all library features CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS" libzmq_pedantic="no" libzmq_werror="no" $as_echo "#define ZMQ_HAVE_OSX 1" >>confdefs.h ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-uninitialized" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-uninitialized... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-uninitialized" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-uninitialized" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" else eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="yes" fi else eval libzmq_cv_cxx_supports_flag__Wno_uninitialized="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CFLAGS="-Wno-uninitialized $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_cxx_supports_flag__Wno_uninitialized = "xyes"; then : CPPFLAGS="-Wno-uninitialized $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; *netbsd*) # Define on NetBSD to enable all library features CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_NETBSD 1" >>confdefs.h # NetBSD 5.0 and newer provides atomic operations but we can # only use these on systems where PR #42842 has been fixed so # we must try and link a test program using C++. libzmq_netbsd_has_atomic=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether atomic operations can be used" >&5 $as_echo_n "checking whether atomic operations can be used... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { uint32_t value; atomic_cas_32 (&value, 0, 0); return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : libzmq_netbsd_has_atomic=yes else libzmq_netbsd_has_atomic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_netbsd_has_atomic" >&5 $as_echo "$libzmq_netbsd_has_atomic" >&6; } if test "x$libzmq_netbsd_has_atomic" = "xno"; then $as_echo "#define ZMQ_FORCE_MUTEXES 1" >>confdefs.h fi ;; *openbsd*) # Define on OpenBSD to enable all library features CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_OPENBSD 1" >>confdefs.h ;; *nto-qnx*) libzmq_pedantic="no" $as_echo "#define ZMQ_HAVE_QNXNTO 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_bytes in -lcrypto" >&5 $as_echo_n "checking for RAND_bytes in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_RAND_bytes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RAND_bytes (); int main () { return RAND_bytes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_RAND_bytes=yes else ac_cv_lib_crypto_RAND_bytes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_bytes" >&5 $as_echo "$ac_cv_lib_crypto_RAND_bytes" >&6; } if test "x$ac_cv_lib_crypto_RAND_bytes" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" fi ;; *aix*) $as_echo "#define ZMQ_HAVE_AIX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_bytes in -lcrypto" >&5 $as_echo_n "checking for RAND_bytes in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_RAND_bytes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RAND_bytes (); int main () { return RAND_bytes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_RAND_bytes=yes else ac_cv_lib_crypto_RAND_bytes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_bytes" >&5 $as_echo "$ac_cv_lib_crypto_RAND_bytes" >&6; } if test "x$ac_cv_lib_crypto_RAND_bytes" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" fi ;; *hpux*) # Define on HP-UX to enable all library features CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS" $as_echo "#define ZMQ_HAVE_HPUX 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sem_init in -lrt" >&5 $as_echo_n "checking for sem_init in -lrt... " >&6; } if ${ac_cv_lib_rt_sem_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_init (); int main () { return sem_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_sem_init=yes else ac_cv_lib_rt_sem_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sem_init" >&5 $as_echo "$ac_cv_lib_rt_sem_init" >&6; } if test "x$ac_cv_lib_rt_sem_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRT 1 _ACEOF LIBS="-lrt $LIBS" fi # Check whether --with-dce was given. if test "${with_dce+set}" = set; then : withval=$with_dce; fi if test "x$with_dce" != xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_create in -ldcekt" >&5 $as_echo_n "checking for uuid_create in -ldcekt... " >&6; } if ${ac_cv_lib_dcekt_uuid_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldcekt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char uuid_create (); int main () { return uuid_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dcekt_uuid_create=yes else ac_cv_lib_dcekt_uuid_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dcekt_uuid_create" >&5 $as_echo "$ac_cv_lib_dcekt_uuid_create" >&6; } if test "x$ac_cv_lib_dcekt_uuid_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDCEKT 1 _ACEOF LIBS="-ldcekt $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_bytes in -lcrypto" >&5 $as_echo_n "checking for RAND_bytes in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_RAND_bytes+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RAND_bytes (); int main () { return RAND_bytes (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_RAND_bytes=yes else ac_cv_lib_crypto_RAND_bytes=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_bytes" >&5 $as_echo "$ac_cv_lib_crypto_RAND_bytes" >&6; } if test "x$ac_cv_lib_crypto_RAND_bytes" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" fi fi { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -Ae" >&5 $as_echo_n "checking whether C compiler supports -Ae... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Ae" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Ae" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_c_supports_flag__Ae="no" else eval libzmq_cv_c_supports_flag__Ae="yes" fi else eval libzmq_cv_c_supports_flag__Ae="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xc" in xc) if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : CFLAGS="-Ae $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_c_supports_flag__Ae = "xyes"; then : CPPFLAGS="-Ae $CPPFLAGS"; fi ;; esac } for ac_func in gethrtime do : ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETHRTIME 1 _ACEOF fi done ;; *mingw32*) $as_echo "#define ZMQ_HAVE_WINDOWS 1" >>confdefs.h $as_echo "#define ZMQ_HAVE_MINGW32 1" >>confdefs.h for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lws2_32" >&5 $as_echo_n "checking for main in -lws2_32... " >&6; } if ${ac_cv_lib_ws2_32_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lws2_32 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ws2_32_main=yes else ac_cv_lib_ws2_32_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ws2_32_main" >&5 $as_echo "$ac_cv_lib_ws2_32_main" >&6; } if test "x$ac_cv_lib_ws2_32_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBWS2_32 1 _ACEOF LIBS="-lws2_32 $LIBS" else as_fn_error $? "cannot link with ws2_32.dll." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpcrt4" >&5 $as_echo_n "checking for main in -lrpcrt4... " >&6; } if ${ac_cv_lib_rpcrt4_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpcrt4 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpcrt4_main=yes else ac_cv_lib_rpcrt4_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpcrt4_main" >&5 $as_echo "$ac_cv_lib_rpcrt4_main" >&6; } if test "x$ac_cv_lib_rpcrt4_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRPCRT4 1 _ACEOF LIBS="-lrpcrt4 $LIBS" else as_fn_error $? "cannot link with rpcrt4.dll." "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -liphlpapi" >&5 $as_echo_n "checking for main in -liphlpapi... " >&6; } if ${ac_cv_lib_iphlpapi_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liphlpapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iphlpapi_main=yes else ac_cv_lib_iphlpapi_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iphlpapi_main" >&5 $as_echo "$ac_cv_lib_iphlpapi_main" >&6; } if test "x$ac_cv_lib_iphlpapi_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBIPHLPAPI 1 _ACEOF LIBS="-liphlpapi $LIBS" else as_fn_error $? "cannot link with iphlpapi.dll." "$LINENO" 5 fi # mingw32 defines __int64_t as long long ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -Wno-long-long" >&5 $as_echo_n "checking whether C++ compiler supports -Wno-long-long... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Wno-long-long" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Wno-long-long" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" else eval libzmq_cv_cxx_supports_flag__Wno_long_long="yes" fi else eval libzmq_cv_cxx_supports_flag__Wno_long_long="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CFLAGS="-Wno-long-long $CFLAGS"; fi ;; xcxx) if eval test x$libzmq_cv_cxx_supports_flag__Wno_long_long = "xyes"; then : CPPFLAGS="-Wno-long-long $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu libzmq_on_mingw32="yes" libzmq_dso_visibility="no" if test "x$enable_static" = "xyes"; then as_fn_error $? "Building static libraries is not supported under MinGW32" "$LINENO" 5 fi ;; *cygwin*) # Define on Cygwin to enable all library features CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS" $as_echo "#define ZMQ_HAVE_CYGWIN 1" >>confdefs.h # Cygwin provides libuuid as part of the e2fsprogs package, and somewhat # uselessly installs the library in /usr/lib/e2fsprogs LDFLAGS="-L/usr/lib/e2fsprogs ${LDFLAGS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 $as_echo_n "checking for uuid_generate in -luuid... " >&6; } if ${ac_cv_lib_uuid_uuid_generate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char uuid_generate (); int main () { return uuid_generate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes else ac_cv_lib_uuid_uuid_generate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUUID 1 _ACEOF LIBS="-luuid $LIBS" else as_fn_error $? "cannot link with -luuid, install the e2fsprogs package." "$LINENO" 5 fi if test "x$enable_static" = "xyes"; then as_fn_error $? "Building static libraries is not supported under Cygwin" "$LINENO" 5 fi ;; *) as_fn_error $? "unsupported system: ${host_os}." "$LINENO" 5 ;; esac # # Check if the compiler supports -fvisibility=hidden flag. MinGW32 uses __declspec # if test "x$libzmq_dso_visibility" = "xyes"; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { libzmq_cv_cxx_visibility_flag="" if test "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_gcc4_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -fvisibility=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -fvisibility=hidden... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -fvisibility=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-fvisibility=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -xldscope=hidden" >&5 $as_echo_n "checking whether C++ compiler supports -xldscope=hidden... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -xldscope=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -xldscope=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_cxx_visibility_flag="-xldscope=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports dso visibility" >&5 $as_echo_n "checking whether C++ compiler supports dso visibility... " >&6; } if test "x$libzmq_cv_cxx_visibility_flag" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; LIBZMQ_EXTRA_CXXFLAGS="$libzmq_cv_cxx_visibility_flag ${LIBZMQ_EXTRA_CXXFLAGS}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi # CPU-specific optimizations case "${host_cpu}" in *sparc*) ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler supports -mcpu=v9" >&5 $as_echo_n "checking whether C++ compiler supports -mcpu=v9... " >&6; } libzmq_cv_cxx_werror_flag_save=$ac_cxx_werror_flag ac_cxx_werror_flag="yes" case "xcxx" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -mcpu=v9" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -mcpu=v9" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xcxx" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_cxx_werror_flag=$libzmq_cv_cxx_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } case "xcxx" in xc) if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CFLAGS="-mcpu=v9 $CFLAGS"; fi ;; xcxx) if eval test x$`$as_echo "libzmq_cv_cxx_supports_flag_-mcpu=v9" | $as_tr_sh` = "xyes"; then : CPPFLAGS="-mcpu=v9 $CPPFLAGS"; fi ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ;; *) ;; esac # Check whether to build docs / install man pages { # Allow user to disable doc build # Check whether --with-documentation was given. if test "${with_documentation+set}" = set; then : withval=$with_documentation; fi if test "x$with_documentation" = "xno"; then libzmq_build_doc="no" libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. libzmq_build_doc="yes" libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. # Extract the first word of "asciidoc", so it can be a program name with args. set dummy asciidoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_libzmq_have_asciidoc+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$libzmq_have_asciidoc"; then ac_cv_prog_libzmq_have_asciidoc="$libzmq_have_asciidoc" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_libzmq_have_asciidoc="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_libzmq_have_asciidoc" && ac_cv_prog_libzmq_have_asciidoc="no" fi fi libzmq_have_asciidoc=$ac_cv_prog_libzmq_have_asciidoc if test -n "$libzmq_have_asciidoc"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_asciidoc" >&5 $as_echo "$libzmq_have_asciidoc" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xmlto", so it can be a program name with args. set dummy xmlto; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_libzmq_have_xmlto+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$libzmq_have_xmlto"; then ac_cv_prog_libzmq_have_xmlto="$libzmq_have_xmlto" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_libzmq_have_xmlto="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_libzmq_have_xmlto" && ac_cv_prog_libzmq_have_xmlto="no" fi fi libzmq_have_xmlto=$ac_cv_prog_libzmq_have_xmlto if test -n "$libzmq_have_xmlto"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_have_xmlto" >&5 $as_echo "$libzmq_have_xmlto" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then libzmq_install_man="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&5 $as_echo "$as_me: WARNING: You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Documentation will not be built and manual pages will not be installed." >&5 $as_echo "$as_me: WARNING: Documentation will not be built and manual pages will not be installed." >&2;} fi fi # Do not install man pages if on mingw if test "x$libzmq_on_mingw32" = "xyes"; then libzmq_install_man="no" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build documentation" >&5 $as_echo_n "checking whether to build documentation... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_build_doc" >&5 $as_echo "$libzmq_build_doc" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install manpages" >&5 $as_echo_n "checking whether to install manpages... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_install_man" >&5 $as_echo "$libzmq_install_man" >&6; } if test "x$libzmq_build_doc" = "xyes"; then BUILD_DOC_TRUE= BUILD_DOC_FALSE='#' else BUILD_DOC_TRUE='#' BUILD_DOC_FALSE= fi if test "x$libzmq_install_man" = "xyes"; then INSTALL_MAN_TRUE= INSTALL_MAN_FALSE='#' else INSTALL_MAN_TRUE='#' INSTALL_MAN_FALSE= fi } # Check polling system { # Allow user to disable doc build # Check whether --with-poller was given. if test "${with_poller+set}" = set; then : withval=$with_poller; fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable polling system" >&5 $as_echo_n "checking for suitable polling system... " >&6; } case "${with_poller}" in kqueue|epoll|devpoll|poll|select) # User has chosen polling system libzmq_cv_poller="${with_poller}" ;; *) # try to find suitable polling system. the order of testing is: # kqueue -> epoll -> devpoll -> poll -> select for subsystem in kqueue epoll devpoll poll select; do case "${subsystem}" in kqueue) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { struct kevent t_kev; kqueue(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_kqueue="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_kqueue="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; epoll) { if test "$cross_compiling" = yes; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct epoll_event t_ev; epoll_create(10); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_epoll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct epoll_event t_ev; int r; r = epoll_create(10); return(r < 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : libzmq_cv_have_poller_epoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_epoll="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } ;; devpoll) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct pollfd t_devpoll; int fd = open("/dev/poll", O_RDWR); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_devpoll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_devpoll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; poll) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct pollfd t_poll; poll(&t_poll, 1, 1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_poll="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_poll="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; select) { cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif int main () { fd_set t_rfds; struct timeval tv; FD_ZERO(&t_rfds); FD_SET(0, &t_rfds); tv.tv_sec = 5; tv.tv_usec = 0; select(1, &t_rfds, NULL, NULL, &tv); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : libzmq_cv_have_poller_select="yes" ; libzmq_cv_poller=$subsystem else libzmq_cv_have_poller_select="no" ; fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext } ;; esac if test "x${libzmq_cv_poller}" != "x"; then break fi done ;; esac libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` if test "x${libzmq_cv_poller}" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: using $libzmq_cv_poller" >&5 $as_echo "using $libzmq_cv_poller" >&6; } ; CPPFLAGS="${CPPFLAGS} -D${libzmq_cv_poller_flag}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no suitable polling system found" >&5 $as_echo "no suitable polling system found" >&6; } ; as_fn_error $? "Unable to continue without polling system" "$LINENO" 5 fi } # Checks for header files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \ stdlib.h string.h sys/socket.h sys/time.h time.h unistd.h limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check if we have ifaddrs.h header file. for ac_header in ifaddrs.h do : ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" if test "x$ac_cv_header_ifaddrs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IFADDRS_H 1 _ACEOF $as_echo "#define ZMQ_HAVE_IFADDRS 1" >>confdefs.h fi done # Use c++ in subsequent tests ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # Checks for typedefs, structures, and compiler characteristics. if test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then { libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" # Execute the macro ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } { libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS -wd279" CPPFLAGS="$CPPFLAGS -wd279" # Execute the macro ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" } else ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { volatile int x; int * volatile y = (int *) 0; return !x && !y; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_volatile=yes else ac_cv_c_volatile=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 $as_echo "$ac_cv_c_volatile" >&6; } if test $ac_cv_c_volatile = no; then $as_echo "#define volatile /**/" >>confdefs.h fi # PGM extension libzmq_pgm_ext="no" pgm_basename="libpgm-5.1.118~dfsg" # Check whether --with-pgm was given. if test "${with_pgm+set}" = set; then : withval=$with_pgm; with_pgm_ext=$withval else with_pgm_ext=no fi # build using system pgm # Check whether --with-system-pgm was given. if test "${with_system_pgm+set}" = set; then : withval=$with_system_pgm; with_system_pgm_ext=yes else with_system_pgm_ext=no fi if test "x$with_pgm_ext" != "xno" -a "x$with_system_pgm_ext" != "xno"; then as_fn_error $? "--with-pgm and --with-system-pgm cannot be specified together" "$LINENO" 5 fi if test "x$with_pgm_ext" != "xno"; then # This allows placing the tar.gz to foreign/openpgm # and using ./configure --with-pgm=libpgm-x.y.z if test "x$with_pgm_ext" != "xyes"; then pgm_basename="$with_pgm_ext" fi # Unpack libpgm { $as_echo "$as_me:${as_lineno-$LINENO}: Unpacking ${pgm_basename}.tar.gz" >&5 $as_echo "$as_me: Unpacking ${pgm_basename}.tar.gz" >&6;} libzmq_pwd=`pwd` cd foreign/openpgm if ! (gzip -dc "${pgm_basename}.tar.gz" || echo "failed") | ${am__untar}; then as_fn_error $? "cannot unpack the foreign/openpgm/${pgm_basename}.tar.gz file" "$LINENO" 5 fi cd "${libzmq_pwd}" if test -d foreign/openpgm/build-staging; then rm -rf foreign/openpgm/build-staging fi mv foreign/openpgm/${pgm_basename} foreign/openpgm/build-staging pgm_srcdir=foreign/openpgm/build-staging/openpgm/pgm if ! test -d foreign/openpgm/build-staging/openpgm/pgm/config; then mkdir foreign/openpgm/build-staging/openpgm/pgm/config fi # DSO symbol visibility for openpgm ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { libzmq_cv_c_visibility_flag="" if test "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes" -o \ "x$libzmq_cv_c_gcc4_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -fvisibility=hidden" >&5 $as_echo_n "checking whether C compiler supports -fvisibility=hidden... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -fvisibility=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -fvisibility=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-fvisibility=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-fvisibility=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports -xldscope=hidden" >&5 $as_echo_n "checking whether C compiler supports -xldscope=hidden... " >&6; } libzmq_cv_c_werror_flag_save=$ac_c_werror_flag ac_c_werror_flag="yes" case "xc" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -xldscope=hidden" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -xldscope=hidden" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: testing compiler characteristic on an unknown language" >&5 $as_echo "$as_me: WARNING: testing compiler characteristic on an unknown language" >&2;} ;; esac cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" else eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="yes" fi else eval `$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh`="no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext case "xc" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_c_werror_flag=$libzmq_cv_c_werror_flag_save # Call the action as the flags are restored if eval test x$`$as_echo "libzmq_cv_c_supports_flag_-xldscope=hidden" | $as_tr_sh` = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_c_visibility_flag="-xldscope=hidden" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler supports dso visibility" >&5 $as_echo_n "checking whether C compiler supports dso visibility... " >&6; } if test "x$libzmq_cv_c_visibility_flag" != "x"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; ac_configure_args="CFLAGS='$libzmq_cv_c_visibility_flag' ${ac_configure_args}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; fi } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu pgm_subdir=build-staging/openpgm/pgm subdirs="$subdirs foreign/openpgm/build-staging/openpgm/pgm/" # Success! $as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h libzmq_pgm_ext="yes" fi # Build with system openpgm if test "x$with_system_pgm_ext" != "xno"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenPGM" >&5 $as_echo_n "checking for OpenPGM... " >&6; } if test -n "$OpenPGM_CFLAGS"; then pkg_cv_OpenPGM_CFLAGS="$OpenPGM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_CFLAGS=`$PKG_CONFIG --cflags "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$OpenPGM_LIBS"; then pkg_cv_OpenPGM_LIBS="$OpenPGM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openpgm-5.1 >= 5.1\""; } >&5 ($PKG_CONFIG --exists --print-errors "openpgm-5.1 >= 5.1") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_OpenPGM_LIBS=`$PKG_CONFIG --libs "openpgm-5.1 >= 5.1" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then OpenPGM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` else OpenPGM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openpgm-5.1 >= 5.1" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$OpenPGM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (openpgm-5.1 >= 5.1) were not met: $OpenPGM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables OpenPGM_CFLAGS and OpenPGM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else OpenPGM_CFLAGS=$pkg_cv_OpenPGM_CFLAGS OpenPGM_LIBS=$pkg_cv_OpenPGM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define ZMQ_HAVE_OPENPGM 1" >>confdefs.h LIBZMQ_EXTRA_CXXFLAGS="$OpenPGM_CFLAGS $LIBZMQ_EXTRA_CXXFLAGS" LIBS="$OpenPGM_LIBS $LIBS" fi # Set -Wall, -Werror and -pedantic ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # Check how to enable -Wall { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable additional warnings for C++ compiler" >&5 $as_echo_n "checking how to enable additional warnings for C++ compiler... " >&6; } libzmq_cv_cxx_wall_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_wall_flag="+w" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_wall_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_wall_flag" >&5 $as_echo "$libzmq_cv_cxx_wall_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_wall_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } if test "x$libzmq_werror" = "xyes" -a "x$libzmq_cv_cxx_sun_studio_compiler" != "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to turn warnings to errors in C++ compiler" >&5 $as_echo_n "checking how to turn warnings to errors in C++ compiler... " >&6; } libzmq_cv_cxx_werror_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_werror_flag="-errwarn=%all" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_werror_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_werror_flag" >&5 $as_echo "$libzmq_cv_cxx_werror_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_werror_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } fi if test "x$libzmq_pedantic" = "xyes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to enable strict standards compliance in C++ compiler" >&5 $as_echo_n "checking how to enable strict standards compliance in C++ compiler... " >&6; } libzmq_cv_cxx_strict_flag="" # C compilers case "xcxx" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-pedantic" elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-pedantic" elif test "x$libzmq_cv_cxx_intel_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then libzmq_cv_cxx_strict_flag="-compat=5" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_cxx_strict_flag" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libzmq_cv_cxx_strict_flag" >&5 $as_echo "$libzmq_cv_cxx_strict_flag" >&6; } CPPFLAGS="$libzmq_cv_cxx_strict_flag $CPPFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } fi } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$libzmq_pgm_ext" = "xyes"; then BUILD_PGM_TRUE= BUILD_PGM_FALSE='#' else BUILD_PGM_TRUE='#' BUILD_PGM_FALSE= fi if test "x$libzmq_on_mingw32" = "xyes"; then ON_MINGW_TRUE= ON_MINGW_FALSE='#' else ON_MINGW_TRUE='#' ON_MINGW_FALSE= fi # Checks for library functions. { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF for ac_func in perror gettimeofday clock_gettime memset socket getifaddrs freeifaddrs do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in alloca.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "alloca.h" "ac_cv_header_alloca_h" "$ac_includes_default" if test "x$ac_cv_header_alloca_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi done { { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SOCK_CLOEXEC is supported" >&5 $as_echo_n "checking whether SOCK_CLOEXEC is supported... " >&6; } if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: not during cross-compile" >&5 $as_echo "not during cross-compile" >&6; } ; libzmq_cv_sock_cloexec="no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* SOCK_CLOEXEC test */ #include #include int main (int argc, char *argv []) { int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); return (s == -1); } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ; libzmq_cv_sock_cloexec="yes" ; $as_echo "#define HAVE_SOCK_CLOEXEC 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ; libzmq_cv_sock_cloexec="no" ; fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi } # Subst LIBZMQ_EXTRA_CFLAGS & CXXFLAGS & LDFLAGS ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile perf/Makefile src/libzmq.pc builds/msvc/Makefile tests/Makefile foreign/openpgm/Makefile builds/redhat/zeromq.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then as_fn_error $? "conditional \"BUILD_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_MAN_TRUE}" && test -z "${INSTALL_MAN_FALSE}"; then as_fn_error $? "conditional \"INSTALL_MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PGM_TRUE}" && test -z "${BUILD_PGM_FALSE}"; then as_fn_error $? "conditional \"BUILD_PGM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ON_MINGW_TRUE}" && test -z "${ON_MINGW_FALSE}"; then as_fn_error $? "conditional \"ON_MINGW\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by zeromq $as_me 2.2.0, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ zeromq config.status 2.2.0 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/platform.hpp") CONFIG_HEADERS="$CONFIG_HEADERS src/platform.hpp" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "perf/Makefile") CONFIG_FILES="$CONFIG_FILES perf/Makefile" ;; "src/libzmq.pc") CONFIG_FILES="$CONFIG_FILES src/libzmq.pc" ;; "builds/msvc/Makefile") CONFIG_FILES="$CONFIG_FILES builds/msvc/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "foreign/openpgm/Makefile") CONFIG_FILES="$CONFIG_FILES foreign/openpgm/Makefile" ;; "builds/redhat/zeromq.spec") CONFIG_FILES="$CONFIG_FILES builds/redhat/zeromq.spec" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi zeromq-2.2.0.orig/MAINTAINERS0000664000000000000000000000235311732125604014170 0ustar rootrootComponent: Atomic Operations Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Lock-free Algorithms Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: TCP transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: IPC transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: PGM transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: In-process transport Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: I/O Threads Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Application Threads and Differnet Socket Types Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Multiplexing (zmq_poll) Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Generic Infrastructure (context, mailbox, command, pipe) Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Documentation Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Autotools build system Maintainer: Mikko Koppanen Contact: mikko.koppanen@gmail.com Component: MSVC build system Maintainer: Martin Sustrik Contact: sustrik@250bpm.com Component: Performance tests Maintainer: Martin Sustrik Contact: sustrik@250bpm.com zeromq-2.2.0.orig/builds/0000775000000000000000000000000011741762441013760 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/0000775000000000000000000000000011741762443014732 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/libzmq/0000775000000000000000000000000011741762443016230 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/libzmq/libzmq.vcproj0000664000000000000000000003423511732125604020752 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/inproc_lat/0000775000000000000000000000000011741762443017064 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/inproc_lat/inproc_lat.vcproj0000664000000000000000000000625711732125604022445 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/c_local_thr/0000775000000000000000000000000011741762443017203 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/c_local_thr/c_local_thr.vcproj0000664000000000000000000000643211732125604022676 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/c_remote_lat/0000775000000000000000000000000011741762443017367 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/c_remote_lat/c_remote_lat.vcproj0000664000000000000000000000643711732125604023253 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/Makefile.in0000664000000000000000000002512011737024114016766 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = builds/msvc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LIBZMQ_DIST = libzmq/libzmq.vcproj platform.hpp msvc.sln PERF_DIST = c_local_thr/c_local_thr.vcproj \ c_remote_thr/c_remote_thr.vcproj \ c_local_lat/c_local_lat.vcproj \ c_remote_lat/c_remote_lat.vcproj \ inproc_lat/inproc_lat.vcproj \ inproc_thr/inproc_thr.vcproj EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign builds/msvc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign builds/msvc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/builds/msvc/c_local_lat/0000775000000000000000000000000011741762443017166 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/c_local_lat/c_local_lat.vcproj0000664000000000000000000000643211732125604022644 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/c_remote_thr/0000775000000000000000000000000011741762443017404 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/c_remote_thr/c_remote_thr.vcproj0000664000000000000000000000643711732125604023305 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/msvc.sln0000664000000000000000000001323311732125604016412 0ustar rootroot Microsoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzmq", "libzmq\libzmq.vcproj", "{641C5F36-32EE-4323-B740-992B651CF9D6}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_lat", "c_local_lat\c_local_lat.vcproj", "{4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_lat", "c_remote_lat\c_remote_lat.vcproj", "{9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "local_thr", "c_local_thr\c_local_thr.vcproj", "{8EF2DF6B-6646-460F-8032-913B70FE0E94}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "remote_thr", "c_remote_thr\c_remote_thr.vcproj", "{B15E059C-0CBB-4A82-8C42-6567FB650802}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_lat", "inproc_lat\inproc_lat.vcproj", "{6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "inproc_thr", "inproc_thr\inproc_thr.vcproj", "{1077E977-95DD-4E73-A692-74647DD0CC1E}" ProjectSection(ProjectDependencies) = postProject {641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 WithOpenPGM|Win32 = WithOpenPGM|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.ActiveCfg = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Debug|Win32.Build.0 = Debug|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.ActiveCfg = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.Release|Win32.Build.0 = Release|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.ActiveCfg = WithOpenPGM|Win32 {641C5F36-32EE-4323-B740-992B651CF9D6}.WithOpenPGM|Win32.Build.0 = WithOpenPGM|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.ActiveCfg = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Debug|Win32.Build.0 = Debug|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.Release|Win32.Build.0 = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {4FDB8C73-9D4A-4D87-A4A9-A7FC06DFEA57}.WithOpenPGM|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.ActiveCfg = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Debug|Win32.Build.0 = Debug|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.Release|Win32.Build.0 = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {9C20A37C-5D9F-4C4C-A2D9-E6EE91A077D1}.WithOpenPGM|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.ActiveCfg = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Debug|Win32.Build.0 = Debug|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.Release|Win32.Build.0 = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {8EF2DF6B-6646-460F-8032-913B70FE0E94}.WithOpenPGM|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.ActiveCfg = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Debug|Win32.Build.0 = Debug|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.Release|Win32.Build.0 = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {B15E059C-0CBB-4A82-8C42-6567FB650802}.WithOpenPGM|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.ActiveCfg = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Debug|Win32.Build.0 = Debug|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.Release|Win32.Build.0 = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {6FF7436F-B3F6-4AE9-A3AC-CFDE8A3872A0}.WithOpenPGM|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.ActiveCfg = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Debug|Win32.Build.0 = Debug|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.Release|Win32.Build.0 = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.ActiveCfg = Release|Win32 {1077E977-95DD-4E73-A692-74647DD0CC1E}.WithOpenPGM|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal zeromq-2.2.0.orig/builds/msvc/inproc_thr/0000775000000000000000000000000011741762443017101 5ustar rootrootzeromq-2.2.0.orig/builds/msvc/inproc_thr/inproc_thr.vcproj0000664000000000000000000000625711732125604022477 0ustar rootroot zeromq-2.2.0.orig/builds/msvc/platform.hpp0000664000000000000000000000227611732125604017266 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PLATFORM_HPP_INCLUDED__ #define __ZMQ_PLATFORM_HPP_INCLUDED__ // This is the platform definition for the MSVC platform. // As a first step of the build process it is copied to // zmq directory to take place of platform.hpp generated from // platform.hpp.in on platforms supported by GNU autotools. // Place any MSVC-specific definitions here. #define ZMQ_HAVE_WINDOWS #endif zeromq-2.2.0.orig/builds/msvc/Makefile.am0000664000000000000000000000056011732125604016757 0ustar rootrootLIBZMQ_DIST = libzmq/libzmq.vcproj platform.hpp msvc.sln PERF_DIST = c_local_thr/c_local_thr.vcproj \ c_remote_thr/c_remote_thr.vcproj \ c_local_lat/c_local_lat.vcproj \ c_remote_lat/c_remote_lat.vcproj \ inproc_lat/inproc_lat.vcproj \ inproc_thr/inproc_thr.vcproj EXTRA_DIST = $(LIBZMQ_DIST) $(PERF_DIST) zeromq-2.2.0.orig/builds/redhat/0000775000000000000000000000000011741762441015227 5ustar rootrootzeromq-2.2.0.orig/builds/redhat/zeromq.spec.in0000664000000000000000000000723511732125604020026 0ustar rootrootName: zeromq Version: @PACKAGE_VERSION@ Release: 1%{?dist} Summary: The ZeroMQ messaging library Group: Applications/Internet License: LGPLv3+ URL: http://www.zeromq.org/ Source: http://download.zeromq.org/%{name}-%{version}.tar.gz Prefix: %{_prefix} Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gcc, make, gcc-c++, libstdc++-devel Requires: libstdc++ %if %{?rhel}%{!?rhel:0} >= 6 BuildRequires: libuuid-devel Requires: libuuid %elseif %{?rhel}%{!?rhel:0} >= 5 BuildRequires: e2fsprogs-devel Requires: e2fsprogs %else BuildRequires: uuid-devel Requires: uuid %endif # Build pgm only on supported archs %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 BuildRequires: glib2-devel Requires: glib2 %endif %description The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains the ZeroMQ shared library. %package devel Summary: Development files and static library for the ZeroMQ library Group: Development/Libraries Requires: %{name} = %{version}-%{release}, pkgconfig %description devel The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. This package contains ZeroMQ related development libraries and header files. %prep %setup -q %build %ifarch pentium3 pentium4 athlon i386 i486 i586 i686 x86_64 %configure --with-pgm %else %configure %endif %{__make} %{?_smp_mflags} %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} # Install the package to build area %{__make} check %makeinstall %post /sbin/ldconfig %postun /sbin/ldconfig %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %files %defattr(-,root,root,-) # docs in the main package %doc AUTHORS ChangeLog COPYING COPYING.LESSER NEWS README # libraries %{_libdir}/libzmq.so.1 %{_libdir}/libzmq.so.1.0.0 %{_mandir}/man7/zmq.7.gz %files devel %defattr(-,root,root,-) %{_includedir}/zmq.h %{_includedir}/zmq.hpp %{_includedir}/zmq_utils.h %{_libdir}/libzmq.la %{_libdir}/libzmq.a %{_libdir}/pkgconfig/libzmq.pc %{_libdir}/libzmq.so %{_mandir}/man3/zmq_bind.3.gz %{_mandir}/man3/zmq_close.3.gz %{_mandir}/man3/zmq_connect.3.gz %{_mandir}/man3/zmq_errno.3.gz %{_mandir}/man3/zmq_device.3.gz %{_mandir}/man3/zmq_getsockopt.3.gz %{_mandir}/man3/zmq_init.3.gz %{_mandir}/man3/zmq_msg_close.3.gz %{_mandir}/man3/zmq_msg_copy.3.gz %{_mandir}/man3/zmq_msg_data.3.gz %{_mandir}/man3/zmq_msg_init.3.gz %{_mandir}/man3/zmq_msg_init_data.3.gz %{_mandir}/man3/zmq_msg_init_size.3.gz %{_mandir}/man3/zmq_msg_move.3.gz %{_mandir}/man3/zmq_msg_size.3.gz %{_mandir}/man3/zmq_poll.3.gz %{_mandir}/man3/zmq_recv.3.gz %{_mandir}/man3/zmq_send.3.gz %{_mandir}/man3/zmq_setsockopt.3.gz %{_mandir}/man3/zmq_socket.3.gz %{_mandir}/man3/zmq_strerror.3.gz %{_mandir}/man3/zmq_term.3.gz %{_mandir}/man3/zmq_version.3.gz %{_mandir}/man7/zmq_cpp.7.gz %{_mandir}/man7/zmq_epgm.7.gz %{_mandir}/man7/zmq_inproc.7.gz %{_mandir}/man7/zmq_ipc.7.gz %{_mandir}/man7/zmq_pgm.7.gz %{_mandir}/man7/zmq_tcp.7.gz %changelog * Sat Apr 10 2010 Mikko Koppanen 2.0.7-1 - Initial packaging zeromq-2.2.0.orig/aclocal.m40000664000000000000000000012527011737024112014334 0ustar rootroot# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) m4_include([acinclude.m4]) zeromq-2.2.0.orig/NEWS0000664000000000000000000002702411737023574013204 0ustar rootroot0MQ version 2.2.0 (Stable), released on 2012/04/04 ================================================== Changes ------- * Fixed issue 349, add send/recv timeout socket options. Bug fixes --------- * Fixed issue 301, fix builds on HP-UX 11iv3 when using either gcc or aCC. * Fixed issue 305, memory leakage when using dynamic subscriptions. * Fixed issue 332, libzmq doesn't compile on Android NDK. * Fixed issue 293, libzmq doesn't follow ZMTP/1.0 spec. * Fixed issue 342, cannot build against zmq.hpp under C++11. 0MQ version 2.1.11 (Stable), released on 2011/12/18 =================================================== Bug fixes --------- * Fixed issue 290, zmq_poll was using system time instead of monotonic clock (Mika Fischer). * Fixed issue 281, crash on heavy socket creation - assertion failure in mutex.hpp:91. (Mika Fischer). * Fixed issue 273, O_CLOEXEC flag used in ip.cpp:192 is supported only on Linux kernels 2.6.27+ * Fixed issue 261, assertion failure in kqueue.cpp:76. * Fixed issue 269, faulty diagnostic code in 2.1.10. * Fixed issue 254, assertion failure at tcp_socket.cpp:229 on ENOTCONN. Changes ------- * Now builds properly on AIX 6.1 (AJ Lewis). * Builds using libdcekt on HP-UX (AJ Lewis). * New upstream OpenPGM maintenance release 5.1.118. * Enabled debugging on assertion failure on Windows (Paul Betts). 0MQ version 2.1.10 (Stable), released on 2011/10/03 =================================================== Bug fixes --------- * Fixed issue 140, SWAP failed with assertion failure in pipe.cpp:187 if the current directory was not writeable. Behavior now is to return -1 at zmq_setsockopt in this situation. * Fixed issue 207, assertion failure in zmq_connecter.cpp:48, when an invalid zmq_connect() string was used, or the hostname could not be resolved. The zmq_connect() call now returns -1 in both those cases. * Fixed issue 218, sockets not opened with SOCK_CLOEXEC, causing fork/exec to sit on sockets unnecessarily. * Fixed issue 250, build errors on Windows (Mikko Koppanen). * Fixed issue 252, assertion failure in req.cpp:87 and req.cpp:88 (Mikko Koppanen). 0MQ version 2.1.9 (Stable), released on 2011/08/29 ================================================== Bug fixes --------- * Fixed issue 240, assertion failure in pgm_socket.cpp:437. * Fixed issue 238, assertion failure in zmq.cpp:655, when zmq_poll is used on an empty set, on Windows. * Fixed issue 239, assertion failure in zmq.cpp:223, when ZMQ_SWAP was used with explicit identities and multiple SUB sockets. * Fixed issue 236, zmq_send() and zmq_recv() did not always return error conditions such as EFSM properly. This bug was introduced in version 2.1.8 by the backport of changes for issue 231. Building -------- * 0MQ support for Android added (Bill Roberts, Mikko Koppanen). 0MQ version 2.1.8 (RC), released on 2011/07/28 ============================================== Bug fixes --------- * Fixed issue 223, assertion failure in tcp_connecter.cpp:300 when connecting to a server that is on an unreachable network (errno is equal to ENETUNREACH). * Fixed issue 228, assertion failure at rep.cpp:88 when HWM was reached. * Fixed issue 231, assertion failure at mailbox.cpp:183 when too many pending socketpair operations were queued (major backport from 3.0). * Fixed issue 234, assertion failure at mailbox.cpp:77 when Ctrl-C was used (only affected git master following backport for 231). * Fixed issue 230, SIGPIPE killing servers when client disconnected, hit OS/X only. Note: this release was renamed "release candidate" due to issue 236, fixed in 2.1.9. 0MQ version 2.1.7 (Stable), released on 2011/05/12 ================================================== Bug fixes --------- * Fixed issue 188, assert when closing socket that had unread multipart data still on it (affected PULL, SUB, ROUTER, and DEALER sockets). * Fixed issue 191, message atomicity issue with PUB sockets (an old issue). * Fixed issue 199 (affected ROUTER/XREP sockets, an old issue). * Fixed issue 206, assertion failure in zmq.cpp:223, affected all sockets (bug was introduced in 2.1.6 as part of message validity checking). * Fixed issue 211, REP socket asserted if sent malformed envelope (old issue due to abuse of assertions for error checking). * Fixed issue 212, reconnect failing after resume from sleep on Windows (due to not handling WSAENETDOWN). * Properly handle WSAENETUNREACH on Windows (e.g. if client connects before server binds). * Fixed memory leak with threads on Windows. Changes ------- * Checks zmq_msg_t validity at each operation. * Inproc performance tests now work on Windows. * PGM wire format specification improved in zmq_pgm(7) * Added thread latency/throughput performance examples. * Added "--with-system-pgm" configure option to use already installed OpenPGM. * Runtime checking of socket and context validity, to catch e.g. using a socket after closing it, or passing an invalid pointer to context/socket methods. * Test cases moved off port 5555, which conflicts with other services. * Clarified zmq_poll man page that the resolution of the timeout is 1msec. 0MQ version 2.1.6 (Broken), released on 2011/04/26 ================================================== Note that this version contained a malformed patch and is not usable. It is not available for download, but is available in the git via the 2.1.6 tag. 0MQ version 2.1.5 (Broken), released on 2011/04/20 ================================================== Note that this version contained a malformed patch and is not usable. It is not available for download, but is available in the git via the 2.1.5 tag. 0MQ version 2.1.4 (Stable), released on 2011/03/30 ================================================== Bug fixes --------- * Fix to OpenPGM which was asserting on small messages (Steven McCoy). Changes ------- * Upgraded OpenPGM to version 5.1.115 (Pieter Hintjens). * OpenPGM build changed to not install OpenPGM artifacts. 0MQ version 2.1.3 (Stable), released on 2011/03/21 ================================================== Bug fixes --------- * Fix to PUSH sockets, which would sometimes deliver tail frames of a multipart message to new subscribers (Martin Sustrik). * Fix to PUB sockets, which would sometimes deliver tail frames of a multipart message to new subscribers (Martin Sustrik). * Windows build was broken due to EPROTONOSUPPORT not being defined. This has now been fixed (Martin Sustrik). * Various fixes to make OpenVMS port work (Brett Cameron). * Corrected Reference Manual to note that ZMQ_LINGER socket option may be set at any time, not just before connecting/binding (Pieter Hintjens). * Fix to C++ binding to properly close sockets (Guido Goldstein). * Removed obsolete assert from pgm_socket.cpp (Martin Sustrik). Changes ------- * Removed stand-alone devices (/devices subdirectory) from distribution. These undocumented programs remain available in older packages (Pieter Hintjens). * OpenPGM default rate raised to 40mbps by default (Steven McCoy). * ZMQ_DEALER and ZMQ_ROUTER macros provided to ease upgrade to 0MQ/3.0. These are scheduled to replace ZMQ_XREQ and ZMQ_XREP (Pieter Hintjens). * Added man page for zmq_device(3) which was hereto undocumented (Pieter Hintjens). * Removed zmq_queue(3), zmq_forwarder(3), zmq_streamer(3) man pages (Pieter Hintjens). OpenPGM Integration ------------------- * Upgraded OpenPGM to version 5.1.114 (Steven McCoy, Mikko Koppanen). * Build system now calls OpenPGM build process directly, allowing easier future upgrades of OpenPGM (Mikko Koppanen). * Build system allows configuration with arbitrary versions of OpenPGM (./configure --with-pgm=libpgm-x.y.z) (Mikko Koppanen). * OpenPGM uses new PGM_ODATA_MAX_RTE controlling original data instead of PGM_TXW_MAX_RTE covering entire channel (Steven McCoy). Building -------- * 0MQ builds properly on FreeBSD (Mikko Koppanen). 0MQ version 2.1.2 (rc2), released on 2011/03/06 =============================================== Bug fixes --------- * 0MQ now correctly handles durable inproc sockets; previously it ignored explicit identities on inproc sockets. * Various memory leaks were fixed. * OpenPGM sender/receiver creation fixed. 0MQ version 2.1.1 (rc1), released on 2011/02/23 =============================================== New functionality ----------------- * New socket option ZMQ_RECONNECT_IVL_MAX added, allows for exponential back-off strategy when reconnecting. * New socket option ZMQ_RECOVERY_IVL_MSEC added, as a fine-grained counterpart to ZMQ_RECOVERY_IVL (for multicast transports). * If memory is exhausted, 0MQ warns with an explicit message before aborting the process. * Size of inproc HWM and SWAP is sum of peers' HWMs and SWAPs (Douglas Greager, Martin Sustrik). Bug fixes --------- * 0MQ no longer asserts in mailbox.cpp when multiple peers connect with the same identity. * 0MQ no longer asserts when rejecting an oversized message. * 0MQ no longer asserts in pipe.cpp when the swap fills up. * zmq_poll now works correctly with an empty poll set. * Many more. Building -------- * 0MQ now builds correctly on CentOS, Debian 6, and SunOS/gcc3. * Added WithOpenPGM configuration into MSVC builds. Known issues ------------ * OpenPGM integration is still not fully stable. 0MQ version 2.1.0 (Beta), released on 2010/12/01 ================================================ New functionality ----------------- * New semantics for zmq_close () and zmq_term () ensure that all messages are sent before the application terminates. This behaviour may be modified using the new ZMQ_LINGER socket option; for further details refer to the reference manual. * The new socket options ZMQ_FD and ZMQ_EVENTS provide a way to integrate 0MQ sockets into existing poll/event loops. * Sockets may now be migrated between OS threads, as long as the application ensures that a full memory barrier is issued. * The 0MQ ABI exported by libzmq.so has been formalised; DSO symbol visibility is used on supported platforms to ensure that only public ABI symbols are exported. The library ABI version has been set to 1.0.0 for this release. * OpenPGM has been updated to version 5.0.92. This version no longer depends on GLIB, and integration with 0MQ should be much improved. * zmq_poll() now honors timeouts precisely, and no longer returns if no events are signaled. * Blocking calls now return EINTR if interrupted by the delivery of a signal; this also means that language bindings which previously had problems with handling SIGINT/^C should now work correctly. * The ZMQ_TYPE socket option was added; this allows retrieval of the socket type after creation. * Added a ZMQ_VERSION macro to zmq.h for compile-time API version detection. * The ZMQ_RECONNECT_IVL and ZMQ_BACKLOG socket options have been added. Bug fixes --------- * Forwarder and streamer devices now handle multi-part messages correctly. * 0MQ no longer asserts when malformed data is received on the wire. * 0MQ internal timers now work correctly if the TSC jumps backwards. * The internal signalling functionality (mailbox) has been improved to automatically resize socket buffers on POSIX systems. * Many more. Building -------- * 0MQ now builds correctly with many more non-GCC compilers (Sun Studio, Intel ICC, CLang). * AIX and HP-UX builds should work now. * FD_SETSIZE has been set to 1024 by default for MSVC builds. * Windows builds using GCC (MinGW) now work out of the box. Distribution ------------ * A simple framework for regression tests has been added, along with a few basic self-tests. The tests can be run using "make check". zeromq-2.2.0.orig/acinclude.m40000664000000000000000000007454711732125604014702 0ustar rootrootdnl ############################################################################## dnl # LIBZMQ_CONFIG_LIBTOOL # dnl # Configure libtool. Requires AC_CANONICAL_HOST # dnl ############################################################################## AC_DEFUN([LIBZMQ_CONFIG_LIBTOOL], [{ AC_REQUIRE([AC_CANONICAL_HOST]) # Libtool configuration for different targets case "${host_os}" in *mingw32*|*cygwin*) # Disable static build by default AC_DISABLE_STATIC ;; *) # Everything else with static enabled AC_ENABLE_STATIC ;; esac }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_ICC([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using ICC # dnl # Adapted from http://software.intel.com/en-us/forums/showthread.php?t=67984 # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_ICC], [AC_CACHE_CHECK([whether we are using Intel _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __INTEL_COMPILER error if not ICC #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_SUN_STUDIO([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using Sun Studio # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_SUN_STUDIO], [AC_CACHE_CHECK([whether we are using Sun Studio _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if !defined(__SUNPRO_CC) && !defined(__SUNPRO_C) error if not sun studio #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_CLANG([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_CLANG], [AC_CACHE_CHECK([whether we are using clang _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#ifndef __clang__ error if not clang #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_GCC4([action-if-found], [action-if-not-found]) # dnl # Check if the current language is compiled using clang # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_GCC4], [AC_CACHE_CHECK([whether we are using gcc >= 4 _AC_LANG compiler], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler], [_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#if (!defined __GNUC__ || __GNUC__ < 4) error if not gcc4 or higher #endif ]])], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler="no" ; $2]) ])]) dnl ############################################################################## dnl # LIBZMQ_CHECK_DOC_BUILD # dnl # Check whether to build documentation and install man-pages # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_DOC_BUILD], [{ # Allow user to disable doc build AC_ARG_WITH([documentation], [AS_HELP_STRING([--without-documentation], [disable documentation build even if asciidoc and xmlto are present [default=no]])]) if test "x$with_documentation" = "xno"; then libzmq_build_doc="no" libzmq_install_man="no" else # Determine whether or not documentation should be built and installed. libzmq_build_doc="yes" libzmq_install_man="yes" # Check for asciidoc and xmlto and don't build the docs if these are not installed. AC_CHECK_PROG(libzmq_have_asciidoc, asciidoc, yes, no) AC_CHECK_PROG(libzmq_have_xmlto, xmlto, yes, no) if test "x$libzmq_have_asciidoc" = "xno" -o "x$libzmq_have_xmlto" = "xno"; then libzmq_build_doc="no" # Tarballs built with 'make dist' ship with prebuilt documentation. if ! test -f doc/zmq.7; then libzmq_install_man="no" AC_MSG_WARN([You are building an unreleased version of 0MQ and asciidoc or xmlto are not installed.]) AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.]) fi fi # Do not install man pages if on mingw if test "x$libzmq_on_mingw32" = "xyes"; then libzmq_install_man="no" fi fi AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$libzmq_build_doc]) AC_MSG_CHECKING([whether to install manpages]) AC_MSG_RESULT([$libzmq_install_man]) AM_CONDITIONAL(BUILD_DOC, test "x$libzmq_build_doc" = "xyes") AM_CONDITIONAL(INSTALL_MAN, test "x$libzmq_install_man" = "xyes") }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_LANG_COMPILER([action-if-found], [action-if-not-found]) # dnl # Check that compiler for the current language actually works # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_LANG_COMPILER], [{ # Test that compiler for the current language actually works AC_CACHE_CHECK([whether the _AC_LANG compiler works], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works], [AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="yes" ; $1], [libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works="no" ; $2]) ]) if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_compiler_works" != "xyes"; then AC_MSG_ERROR([Unable to find a working _AC_LANG compiler]) fi }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_COMPILERS # dnl # Check compiler characteristics. This is so that we can AC_REQUIRE checks # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_COMPILERS], [{ # For that the compiler works and try to come up with the type AC_LANG_PUSH([C]) LIBZMQ_CHECK_LANG_COMPILER LIBZMQ_CHECK_LANG_ICC LIBZMQ_CHECK_LANG_SUN_STUDIO LIBZMQ_CHECK_LANG_CLANG LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C]) AC_LANG_PUSH(C++) LIBZMQ_CHECK_LANG_COMPILER LIBZMQ_CHECK_LANG_ICC LIBZMQ_CHECK_LANG_SUN_STUDIO LIBZMQ_CHECK_LANG_CLANG LIBZMQ_CHECK_LANG_GCC4 AC_LANG_POP([C++]) # Set GCC and GXX variables correctly if test "x$GCC" = "xyes"; then if test "xyes" = "x$libzmq_cv_c_intel_compiler"; then GCC="no" fi fi if test "x$GXX" = "xyes"; then if test "xyes" = "x$libzmq_cv_cxx_intel_compiler"; then GXX="no" fi fi }]) dnl ############################################################################ dnl # LIBZMQ_CHECK_LANG_FLAG([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl ############################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG], [{ AC_REQUIRE([AC_PROG_GREP]) AC_MSG_CHECKING([whether _AC_LANG compiler supports $1]) libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" case "x[]_AC_LANG_ABBREV" in xc) libzmq_cv_check_lang_flag_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" ;; xcxx) libzmq_cv_check_lang_flag_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $1" ;; *) AC_MSG_WARN([testing compiler characteristic on an unknown language]) ;; esac AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], # This hack exist for ICC, which outputs unknown options as remarks # Remarks are not turned into errors even with -Werror on [if ($GREP 'ignoring unknown' conftest.err || $GREP 'not supported' conftest.err) >/dev/null 2>&1; then eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no" else eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="yes" fi], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)="no"]) case "x[]_AC_LANG_ABBREV" in xc) CFLAGS="$libzmq_cv_check_lang_flag_save_CFLAGS" ;; xcxx) CPPFLAGS="$libzmq_cv_check_lang_flag_save_CPPFLAGS" ;; *) # nothing to restore ;; esac # Restore the werror flag ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [AC_MSG_RESULT(yes) ; $2], [AC_MSG_RESULT(no) ; $3]) }]) dnl #################################################################################### dnl # LIBZMQ_CHECK_LANG_FLAG_PREPEND([flag], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given flag. Works for C and C++ # dnl # This macro prepends the flag to CFLAGS or CPPFLAGS accordingly # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_[FLAG]=yes/no # dnl #################################################################################### AC_DEFUN([LIBZMQ_CHECK_LANG_FLAG_PREPEND], [{ LIBZMQ_CHECK_LANG_FLAG([$1]) case "x[]_AC_LANG_ABBREV" in xc) AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CFLAGS="$1 $CFLAGS"; $2], $3) ;; xcxx) AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_flag_$1)[ = "xyes"], [CPPFLAGS="$1 $CPPFLAGS"; $2], $3) ;; esac }]) dnl ############################################################################## dnl # LIBZMQ_CHECK_ENABLE_DEBUG([action-if-found], [action-if-not-found]) # dnl # Check whether to enable debug build and set compiler flags accordingly # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_ENABLE_DEBUG], [{ # Require compiler specifics AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) # This flag is checked also in AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], [Enable debugging information [default=no]])]) AC_MSG_CHECKING(whether to enable debugging information) if test "x$enable_debug" = "xyes"; then # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_c_intel_compiler" = "xyes" -o \ "x$libzmq_cv_c_clang_compiler" = "xyes"; then CFLAGS="-g -O0 " elif test "x$libzmq_cv_c_sun_studio_compiler" = "xyes"; then CFLAGS="-g0 " fi # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_cxx_intel_compiler" = "xyes" -o \ "x$libzmq_cv_cxx_clang_compiler" = "xyes"; then CPPFLAGS="-g -O0 " CXXFLAGS="-g -O0 " # Sun studio elif test "x$libzmq_cv_cxx_sun_studio_compiler" = "xyes"; then CPPFLAGS="-g0 " CXXFLAGS="-g0 " fi if test "x$ZMQ_ORIG_CFLAGS" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi if test "x$ZMQ_ORIG_CPPFLAGS" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi if test "x$ZMQ_ORIG_CXXFLAGS" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi }]) dnl ############################################################################## dnl # LIBZMQ_WITH_GCOV([action-if-found], [action-if-not-found]) # dnl # Check whether to build with code coverage # dnl ############################################################################## AC_DEFUN([LIBZMQ_WITH_GCOV], [{ # Require compiler specifics AC_REQUIRE([LIBZMQ_CHECK_COMPILERS]) AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no], [With GCC Code Coverage reporting.])], [ZMQ_GCOV="$withval"]) AC_MSG_CHECKING(whether to enable code coverage) if test "x$ZMQ_GCOV" = "xyes"; then if test "x$GXX" != "xyes"; then AC_MSG_ERROR([--with-gcov=yes works only with GCC]) fi CFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CFLAGS="${CFLAGS} ${ZMQ_ORIG_CFLAGS}" fi CPPFLAGS="-g -O0 -fprofile-arcs -ftest-coverage" if test "x${ZMQ_ORIG_CPPFLAGS}" != "xnone"; then CPPFLAGS="${CPPFLAGS} ${ZMQ_ORIG_CPPFLAGS}" fi CXXFLAGS="-fprofile-arcs" if test "x${ZMQ_ORIG_CXXFLAGS}" != "xnone"; then CXXFLAGS="${CXXFLAGS} ${ZMQ_ORIG_CXXFLAGS}" fi LIBS="-lgcov ${LIBS}" fi AS_IF([test "x$ZMQ_GCOV" = "xyes"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ############################################################################## dnl # AC_ZMQ_CHECK_WITH_FLAG([flags], [macro]) # dnl # Runs a normal autoconf check with compiler flags # dnl ############################################################################## AC_DEFUN([LIBZMQ_CHECK_WITH_FLAG], [{ libzmq_check_with_flag_save_CFLAGS="$CFLAGS" libzmq_check_with_flag_save_CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS $1" CPPFLAGS="$CPPFLAGS $1" # Execute the macro $2 CFLAGS="$libzmq_check_with_flag_save_CFLAGS" CPPFLAGS="$libzmq_check_with_flag_save_CPPFLAGS" }]) dnl ############################################################################## dnl # LIBZMQ_LANG_WALL([action-if-found], [action-if-not-found]) # dnl # How to define -Wall for the current compiler # dnl # Sets libzmq_cv_[]_AC_LANG_ABBREV[]__wall_flag variable to found style # dnl ############################################################################## AC_DEFUN([LIBZMQ_LANG_WALL], [{ AC_MSG_CHECKING([how to enable additional warnings for _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-v" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="-Wall" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag="+w" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl #################################################################### dnl # LIBZMQ_LANG_STRICT([action-if-found], [action-if-not-found]) # dnl # Check how to turn on strict standards compliance # dnl #################################################################### AC_DEFUN([LIBZMQ_LANG_STRICT], [{ AC_MSG_CHECKING([how to enable strict standards compliance in _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-Xc" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-pedantic" elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-strict-ansi" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag="-compat=5" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_strict_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl ######################################################################## dnl # LIBZMQ_LANG_WERROR([action-if-found], [action-if-not-found]) # dnl # Check how to turn warnings to errors # dnl ######################################################################## AC_DEFUN([LIBZMQ_LANG_WERROR], [{ AC_MSG_CHECKING([how to turn warnings to errors in _AC_LANG compiler]) libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="" # C compilers case "x[]_AC_LANG_ABBREV" in xc) # GCC, clang and ICC if test "x$GCC" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; xcxx) # GCC, clang and ICC if test "x$GXX" = "xyes" -o "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-Werror" # Sun studio elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag="-errwarn=%all" fi ;; *) ;; esac # Call the action if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag" != "x"; then AC_MSG_RESULT([$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag]) $1 else AC_MSG_RESULT([not found]) $2 fi }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_LANG_PRAGMA([pragma], [action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports given pragma # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_PRAGMA], [{ # Need to know how to enable all warnings LIBZMQ_LANG_WALL AC_MSG_CHECKING([whether _AC_LANG compiler supports pragma $1]) # Save flags libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save=$ac_[]_AC_LANG_ABBREV[]_werror_flag ac_[]_AC_LANG_ABBREV[]_werror_flag="yes" if test "x[]_AC_LANG_ABBREV" = "xc"; then libzmq_cv_check_lang_pragma_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then libzmq_cv_check_lang_pragma_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $libzmq_cv_[]_AC_LANG_ABBREV[]_wall_flag" else AC_MSG_WARN([testing compiler characteristic on an unknown language]) fi AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[#pragma $1]])], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="yes" ; AC_MSG_RESULT(yes)], [eval AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)="no" ; AC_MSG_RESULT(no)]) if test "x[]_AC_LANG_ABBREV" = "xc"; then CFLAGS="$libzmq_cv_check_lang_pragma_save_CFLAGS" elif test "x[]_AC_LANG_ABBREV" = "xcxx"; then CPPFLAGS="$libzmq_cv_check_lang_pragma_save_CPPFLAGS" fi ac_[]_AC_LANG_ABBREV[]_werror_flag=$libzmq_cv_[]_AC_LANG_ABBREV[]_werror_flag_save # Call the action as the flags are restored AS_IF([eval test x$]AS_TR_SH(libzmq_cv_[]_AC_LANG_ABBREV[]_supports_pragma_$1)[ = "xyes"], [$2], [$3]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_LANG_VISIBILITY([action-if-found], [action-if-not-found]) # dnl # Check if the compiler supports dso visibility # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_LANG_VISIBILITY], [{ libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="" if test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_intel_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_clang_compiler" = "xyes" -o \ "x$libzmq_cv_[]_AC_LANG_ABBREV[]_gcc4_compiler" = "xyes"; then LIBZMQ_CHECK_LANG_FLAG([-fvisibility=hidden], [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-fvisibility=hidden"]) elif test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_sun_studio_compiler" = "xyes"; then LIBZMQ_CHECK_LANG_FLAG([-xldscope=hidden], [libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag="-xldscope=hidden"]) fi AC_MSG_CHECKING(whether _AC_LANG compiler supports dso visibility) AS_IF([test "x$libzmq_cv_[]_AC_LANG_ABBREV[]_visibility_flag" != "x"], [AC_MSG_RESULT(yes) ; $1], [AC_MSG_RESULT(no) ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) # dnl # Check if SOCK_CLOEXEC is supported # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_SOCK_CLOEXEC], [{ AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported) AC_TRY_RUN([/* SOCK_CLOEXEC test */ #include #include int main (int argc, char *argv []) { int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); return (s == -1); } ], [AC_MSG_RESULT(yes) ; libzmq_cv_sock_cloexec="yes" ; $1], [AC_MSG_RESULT(no) ; libzmq_cv_sock_cloexec="no" ; $2], [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"] ) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_KQUEUE([action-if-found], [action-if-not-found]) # dnl # Checks kqueue polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_KQUEUE], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include #include #include ], [[ struct kevent t_kev; kqueue(); ]] )], [libzmq_cv_have_poller_kqueue="yes" ; $1], [libzmq_cv_have_poller_kqueue="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_EPOLL([action-if-found], [action-if-not-found]) # dnl # Checks epoll polling system can actually run # dnl # For cross-compile, only requires that epoll can link # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_EPOLL], [{ AC_RUN_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct epoll_event t_ev; int r; r = epoll_create(10); return(r < 0); ]] )], [libzmq_cv_have_poller_epoll="yes" ; $1], [libzmq_cv_have_poller_epoll="no" ; $2], [ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct epoll_event t_ev; epoll_create(10); ]] )], [libzmq_cv_have_poller_epoll="yes" ; $1], [libzmq_cv_have_poller_epoll="no" ; $2]) ]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_DEVPOLL([action-if-found], [action-if-not-found]) # dnl # Checks devpoll polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_DEVPOLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct pollfd t_devpoll; int fd = open("/dev/poll", O_RDWR); ]] )], [libzmq_cv_have_poller_devpoll="yes" ; $1], [libzmq_cv_have_poller_devpoll="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_POLL([action-if-found], [action-if-not-found]) # dnl # Checks poll polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_POLL], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #include ], [[ struct pollfd t_poll; poll(&t_poll, 1, 1); ]] )], [libzmq_cv_have_poller_poll="yes" ; $1], [libzmq_cv_have_poller_poll="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER_SELECT([action-if-found], [action-if-not-found]) # dnl # Checks select polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER_SELECT], [{ AC_LINK_IFELSE( [AC_LANG_PROGRAM( [ #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif ], [[ fd_set t_rfds; struct timeval tv; FD_ZERO(&t_rfds); FD_SET(0, &t_rfds); tv.tv_sec = 5; tv.tv_usec = 0; select(1, &t_rfds, NULL, NULL, &tv); ]] )], [libzmq_cv_have_poller_select="yes" ; $1], [libzmq_cv_have_poller_select="no" ; $2]) }]) dnl ################################################################################ dnl # LIBZMQ_CHECK_POLLER([action-if-found], [action-if-not-found]) # dnl # Choose polling system # dnl ################################################################################ AC_DEFUN([LIBZMQ_CHECK_POLLER], [{ # Allow user to disable doc build AC_ARG_WITH([poller], [AS_HELP_STRING([--with-poller], [choose polling system manually. valid values are kqueue, epoll, devpoll, poll or select [default=autodetect]])]) AC_MSG_CHECKING([for suitable polling system]) case "${with_poller}" in kqueue|epoll|devpoll|poll|select) # User has chosen polling system libzmq_cv_poller="${with_poller}" ;; *) # try to find suitable polling system. the order of testing is: # kqueue -> epoll -> devpoll -> poll -> select for subsystem in kqueue epoll devpoll poll select; do case "${subsystem}" in kqueue) LIBZMQ_CHECK_POLLER_KQUEUE([libzmq_cv_poller=$subsystem], []) ;; epoll) LIBZMQ_CHECK_POLLER_EPOLL([libzmq_cv_poller=$subsystem], []) ;; devpoll) LIBZMQ_CHECK_POLLER_DEVPOLL([libzmq_cv_poller=$subsystem], []) ;; poll) LIBZMQ_CHECK_POLLER_POLL([libzmq_cv_poller=$subsystem], []) ;; select) LIBZMQ_CHECK_POLLER_SELECT([libzmq_cv_poller=$subsystem], []) ;; esac if test "x${libzmq_cv_poller}" != "x"; then break fi done ;; esac libzmq_cv_poller_flag=`echo "ZMQ_FORCE_${libzmq_cv_poller}" | tr a-z A-Z` AS_IF([test "x${libzmq_cv_poller}" != "x"], [AC_MSG_RESULT([using $libzmq_cv_poller]) ; $1], [AC_MSG_RESULT(no suitable polling system found) ; $2]) }]) zeromq-2.2.0.orig/ChangeLog0000664000000000000000000220714411741762444014265 0ustar rootroot# Generated by Makefile. Do not edit. commit 8daada4bdc41bfe9da9e3c93c8b0f6c04a6cb0ec Author: Pieter Hintjens Date: Tue Apr 10 20:30:31 2012 +0200 gcc_421_char_traits.hpp was missing from tarballs src/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit fb64b8801cd02776e1524aedc41083f9bf876e4d Merge: 2bdb487 f2a8fa1 Author: Pieter Hintjens Date: Wed Apr 4 04:36:54 2012 -0700 Merge pull request #47 from pieterh/master Bumped version for next release (2.2.1) commit f2a8fa1de6d92c5264ff19e3ed05af115069edc0 Author: Pieter Hintjens Date: Wed Apr 4 12:26:45 2012 +0100 Bumped version number to 2.2.1 for next release include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2bdb487abbe69984ec264ddcb785e032e1b0419f Merge: bfd04c5 0b2f5cb Author: Pieter Hintjens Date: Wed Apr 4 04:11:29 2012 -0700 Merge pull request #46 from pieterh/master Preparing for release 2.2.0 commit 0b2f5cbac93b674e6282cc85222b64cf6a17950a Author: Pieter Hintjens Date: Wed Apr 4 12:06:28 2012 +0100 Fixed man pages for release 2.2.0 * Fixed new entries for getsockopt/setsockopt SNDTIMEO and RCVTIMEO * Removed individual authorship from man page footers doc/zmq.txt | 3 +- doc/zmq_bind.txt | 3 +- doc/zmq_close.txt | 3 +- doc/zmq_connect.txt | 3 +- doc/zmq_cpp.txt | 3 +- doc/zmq_device.txt | 16 +---------- doc/zmq_errno.txt | 3 +- doc/zmq_getsockopt.txt | 67 ++++++++++++++++++++++----------------------- doc/zmq_init.txt | 3 +- doc/zmq_inproc.txt | 3 +- doc/zmq_ipc.txt | 3 +- doc/zmq_msg_close.txt | 3 +- doc/zmq_msg_copy.txt | 3 +- doc/zmq_msg_data.txt | 3 +- doc/zmq_msg_init.txt | 3 +- doc/zmq_msg_init_data.txt | 3 +- doc/zmq_msg_init_size.txt | 3 +- doc/zmq_msg_move.txt | 3 +- doc/zmq_msg_size.txt | 3 +- doc/zmq_pgm.txt | 4 +- doc/zmq_poll.txt | 3 +- doc/zmq_recv.txt | 3 +- doc/zmq_send.txt | 3 +- doc/zmq_setsockopt.txt | 67 ++++++++++++++++++++++----------------------- doc/zmq_socket.txt | 3 +- doc/zmq_strerror.txt | 3 +- doc/zmq_tcp.txt | 3 +- doc/zmq_term.txt | 3 +- doc/zmq_version.txt | 4 +- 29 files changed, 95 insertions(+), 135 deletions(-) commit 87cce25bd9b31a192297bc4213f45107f5a1b796 Author: Pieter Hintjens Date: Wed Apr 4 11:53:58 2012 +0100 Updated product version to 2.2.0 include/zmq.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 33af4869733de3f646daf2bafc242f813fb927f4 Author: Pieter Hintjens Date: Wed Apr 4 11:53:02 2012 +0100 Updated ABI version to 1.1.0 configure.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit b0d95774000b930125f24450f9e080b9e8b63a0c Author: Pieter Hintjens Date: Wed Apr 4 11:50:50 2012 +0100 Updated NEWS for version 2.2.0 NEWS | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit bfd04c5b867890b4d6a563f2a7d95b5d183e84ba Merge: 6ab8ef0 1e5c6fa Author: Pieter Hintjens Date: Tue Apr 3 05:27:13 2012 -0700 Merge pull request #45 from jhawk28/master Fix issue 349 commit 1e5c6fa0077dcd5767bc557fbccaf383dee98339 Author: Joshua Foster Date: Sun Apr 1 20:44:26 2012 -0400 Fix issue 349 https://zeromq.jira.com/browse/LIBZMQ-349 Add the send/recv socket options from 3.1.0. .gitignore | 1 + NEWS | 2 + doc/zmq_getsockopt.txt | 32 ++++++++++++ doc/zmq_setsockopt.txt | 32 ++++++++++++ include/zmq.h | 4 +- src/options.cpp | 39 +++++++++++++++- src/options.hpp | 4 ++ src/socket_base.cpp | 8 ++-- tests/Makefile.am | 4 +- tests/test_timeo.cpp | 125 ++++++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 244 insertions(+), 7 deletions(-) commit 6ab8ef084242299a9b8ada00b500126e465f6618 Author: Pieter Hintjens Date: Tue Mar 20 14:48:45 2012 -0500 Updated NEWS for issue 342 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 6f3967176b1d3b6f0f586cc92848f9f6e80ee912 Merge: 24f1175 4b8ace2 Author: Pieter Hintjens Date: Tue Mar 20 12:47:19 2012 -0700 Merge pull request #42 from yisding/master missing algorithm include commit 24f1175d942323697bff6ed1690ffbdcf2f33631 Merge: 25c7cd0 48f70a8 Author: Chuck Remes Date: Tue Mar 20 09:40:20 2012 -0700 Merge pull request #44 from pieterh/master Fixed issue LIBZMQ-293 - libzmq doesn't follow ZMTP/1.0 spec commit 48f70a88a31245667fccd5227d60cac34a06855f Author: Pieter Hintjens Date: Tue Mar 20 11:28:36 2012 -0500 Fixed issue #293 - libzmq doesn't follow ZMTP/1.0 spec NEWS | 4 +++- src/encoder.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit 25c7cd0691b77770a4b85a13964e22d2274da4b7 Author: Pieter Hintjens Date: Tue Mar 20 11:05:26 2012 -0500 Updated for issue 332 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 033907f2b810f8476c300c169e0fa6b912a56e22 Author: Pieter Hintjens Date: Thu Feb 16 12:14:56 2012 -0600 Updated NEWS for PR #36 NEWS | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit e4d7ad2643ac4e5391ae3939d3e19b6b0a05830f Merge: ec3e95a ba61dde Author: Pieter Hintjens Date: Tue Mar 20 09:02:55 2012 -0700 Merge pull request #43 from jlopex/master Fixes issue LIBZMQ-332 commit ba61dde6730aa79f05450a8b56b22dbf528eb57c Author: Javier Lopez Date: Mon Mar 19 19:13:56 2012 -0700 Fixes zeromq 2.1 not compiling on Android According to the libc documentation S_IWRITE is only for BSD compatibility: http://www.gnu.org/s/hello/manual/libc/Permission-Bits.html This patch adds a check to determine the target platform and use correct file access definition in each case: - For Linux and Android S_IWUSR is used. - For other platforms S_IWRITE is used. Signed-off-by: Javier Lopez src/options.cpp | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) commit 4b8ace2e68b2a50caad1b6204335aa00720c1c8e Author: Yi Ding Date: Sun Feb 19 15:13:27 2012 -0600 Add algorithm include for std::swap include/zmq.hpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ec3e95a67e9fba9542e45aeadd5bd9fc22ea6dfa Merge: 71dc626 dbf1db2 Author: Pieter Hintjens Date: Thu Feb 16 10:16:29 2012 -0800 Merge pull request #40 from gitfoxi/master Backport some build fixes for old-ass Linux from libzmq development. commit 71dc626e82100e9be7a61d92f1f9e51aa50fa40c Merge: 80b2764 ec070c5 Author: Pieter Hintjens Date: Thu Feb 16 10:15:37 2012 -0800 Merge pull request #38 from jtzl/master updated INSTALL documentation as per pull request #37 commit 80b27649bc1d00fde72b98d79d9f407dfee0c30a Merge: e23eb9d 5361000 Author: Pieter Hintjens Date: Thu Feb 16 10:13:26 2012 -0800 Merge pull request #36 from gimaker/trie-pruning Backport fix to prune the trie from zmq3 (LIBZMQ-305) commit e23eb9dd2a66104f54ed8517aee56161d0382061 Author: Pieter Hintjens Date: Thu Feb 16 12:10:34 2012 -0600 Updated NEWS for PR #39 NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit de1c5fd75d28af7fc9b849f5c79c89c2ccc9fbb3 Author: Pieter Hintjens Date: Sun Dec 18 19:23:54 2011 -0600 Prepared for 2.1.12 NEWS | 7 +++++++ include/zmq.h | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) commit 8123b18284b1dadf4a72b7d6e644471539239282 Merge: 9bea035 2b148ac Author: Pieter Hintjens Date: Thu Feb 16 10:09:10 2012 -0800 Merge pull request #39 from vortechs2000/issue-301 Fix builds on HP-UX 11iv3 when using either gcc or aCC commit 9bea035b96d90fbfeefe248453697c9aaf68594e Merge: 73f167e 1bff796 Author: Pieter Hintjens Date: Tue Feb 14 09:10:39 2012 -0800 Merge pull request #41 from thesamet/master Prevent unused variable warning in presence of assertions. commit 1bff796edb408aafcc9096849fd41209afa20d66 Author: Nadav Samet Date: Mon Feb 13 22:09:13 2012 -0800 Prevent unused variable warning in presence of assertions. include/zmq.hpp | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) commit dbf1db2253cac6cf06488e2739068be135983682 Author: m <415fox@gmail.com> Date: Sat Jan 28 13:30:52 2012 -0800 Backport ./configure --with-poller from libzmq development. If you've been configuring the poller using: CPPFLAGS=-DZMQ_FORCE_POLL ./configure Now you're going to want to say: ./configure --with-poller=poll acinclude.m4 | 190 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ configure.in | 5 +- 2 files changed, 194 insertions(+), 1 deletions(-) commit 34da56118ee70ce594662960cdac90ca55f87ed0 Author: 415fox@gmail.com <415fox@gmail.com> Date: Sat Jan 28 12:37:56 2012 -0800 Fix: Whitespace and comment. src/clock.cpp | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 4a90c1027731ccad41cf44294c92f1ad1c8eb7ba Author: 415fox@gmail.com <415fox@gmail.com> Date: Fri Jan 27 12:40:56 2012 -0800 Fix: runtime patch for when system has clock_gettime but does not support CLOCK_MONOTONIC. src/clock.cpp | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) commit 9631d910082fa302c3f3d45fbac189139747b933 Author: 415fox@gmail.com <415fox@gmail.com> Date: Sat Jan 28 12:24:14 2012 -0800 Source char_traits from GCC C++ Library directly to clarify license. http://gcc.gnu.org/onlinedocs/libstdc++/ Previously borrowed code from id3lib was considered shady. Placed in its own file for style reasons. src/blob.hpp | 96 +--------------------------------- src/gcc_421_char_traits.hpp | 119 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+), 93 deletions(-) commit 1050ffe01a159dd4fdf0880932b55439c8dad36f Author: 415fox@gmail.com <415fox@gmail.com> Date: Fri Jan 27 12:24:14 2012 -0800 Fix basic_string not implemented in stdc++ 3 src/blob.hpp | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 94 insertions(+), 0 deletions(-) commit 7a55220be42c7e0ead23a29e26caddac76110577 Author: 415fox@gmail.com <415fox@gmail.com> Date: Fri Jan 27 12:23:32 2012 -0800 Fix bad combination of gcc3, -Werror and private destructor. src/ctx.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 536100053cd3bb28d9d8be33b2e48a60d3d225ee Author: Staffan Gimåker Date: Thu Jan 26 14:18:03 2012 +0100 Fix segfault bug when pruning the trie. Signed-off-by: Staffan Gimåker src/trie.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 2b148acd46db833b8c2b880622d0f77bb5e1d89c Author: AJ Lewis Date: Tue Jan 17 11:20:32 2012 -0600 Patch from Mikko Koppanen for #LIBZMQ-301 Add the '-Ae' flag when using aCC Check if CLOCK_MONOTONIC defined before using it - if not, use gethrtime() Signed-off-by: AJ Lewis configure.in | 2 ++ src/clock.cpp | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit ec070c59343d2991f1bbeb3613c4ae88a55c580f Author: Jtzl Forshizl Date: Tue Jan 17 14:07:51 2012 -0500 clarifying installation documentation for users building from repo INSTALL | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit e954cb49732facaa627dff617d214a5b5cab90e5 Author: AJ Lewis Date: Tue Jan 17 10:33:55 2012 -0600 Change peer_identity_size (in all cases) in the command_t structure to be a size_t instead of an unsigned char. The peer_identity_size field in the attach and bind substructure is used to generate a C++ base_string object from an unsigned char *, and that object expects a size_t, not an unsigned char. If an unsigned char is used, the HPUX aCC compiler gets confused and can't figure out which constructor to use. Signed-off-by: AJ Lewis src/command.hpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 75bc614d55a36f76cfdadbf44b094cbd132b11dd Author: Staffan Gimåker Date: Wed Jan 4 11:31:32 2012 +0100 Backport fix to prune the trie from zmq3. Signed-off-by: Staffan Gimåker src/trie.cpp | 24 ++++++++++++++++++++++-- src/trie.hpp | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) commit 73f167eeb5ce9d26678399a574918f9813976024 Author: Pieter Hintjens Date: Sun Dec 18 19:11:17 2011 -0600 Updated NEWS for 2.1.11 NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1e49dda4da68c92b410c93065a9dac908bef4cf6 Author: Pieter Hintjens Date: Tue Dec 6 14:21:17 2011 +0100 Updated NEWS for issue 290 NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 354faeb8360c434600b6c5e34dc1c249991bc014 Merge: 04b2ef2 1f1b454 Author: Pieter Hintjens Date: Mon Dec 5 08:18:28 2011 -0800 Merge pull request #35 from mika-fischer/libzmq-290 Use monotonic clock for clock_t commit 1f1b4543750d9ec882cc83c3e0f49b568c57bbf5 Author: Mika Fischer Date: Fri Dec 2 09:43:44 2011 +0100 Use monotonic clock for clock_t This makes clock_t insensitive to the system clock being reset by NTP or the sysadmin, which could previously cause long hangs for instance in zmq_poll. configure.in | 4 ++-- src/clock.cpp | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) commit 04b2ef208d9fc9bea382fcfb2d0eb3efa36d5f9f Author: Pieter Hintjens Date: Wed Nov 30 17:14:18 2011 -0600 Reverted commit 1fb107, which was causing memory violations NEWS | 2 +- src/xrep.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) commit 0919e99c394c426685e74154fea06ed04b50d5ba Author: Pieter Hintjens Date: Wed Nov 30 14:01:43 2011 -0600 Wasn't compiling... what happened to xrep.cpp? src/xrep.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d6cd256584f65764795d82aac0f7850a9cd920de Author: Pieter Hintjens Date: Wed Nov 30 14:01:22 2011 -0600 Fixed issue 254 NEWS | 2 ++ src/tcp_socket.cpp | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) commit 4212c4b6dd11971c3dc9f6b2426f787939cc0c04 Author: Pieter Hintjens Date: Sun Nov 27 09:11:15 2011 -0600 Revert "Fixes duplicated variable error" This reverts commit 26da87062080a9247401efd1a85f747c59365db1. src/xrep.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 35df57cda6861cac31710ad2a10fae4c97c0e63c Author: Martin Sustrik Date: Mon Nov 21 08:11:33 2011 +0100 Phillip Kovacs added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1fb107166f67091c4e1e20a0e511e78e4bf13c7b Merge: d3a1ba6 26da870 Author: Pieter Hintjens Date: Sat Nov 19 15:52:02 2011 -0800 Merge pull request #28 from gsandoval/master Fixes memory leak in XREP xsend commit d3a1ba6ae4a0e3939fb9e48935ac341504cd513d Author: Pieter Hintjens Date: Sat Nov 19 17:50:59 2011 -0600 Added Botond Ballo to authors AUTHORS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 9861b49161aba728151e06bcd50c0ec7bb11121c Merge: ad47cc5 0ceb637 Author: Pieter Hintjens Date: Sat Nov 19 15:48:53 2011 -0800 Merge pull request #33 from botond-ballo/master C++11 move constructor and move assignment operator for zmq::socket_t and zmq::context_t commit 0ceb637b379c65b49d0a5b572e2b0715fcfb3531 Author: Botond Ballo Date: Sat Nov 19 18:00:25 2011 -0500 Fixed indentation of preprocessor directives Fixed indentation of preprocessor directives to it's consistent with other headers. Signed-off-by: Botond Ballo include/zmq.hpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 573614acf14936772fbc4edee5b2c791a8ab4283 Author: Botond Ballo Date: Sat Nov 19 17:57:00 2011 -0500 Fixed indentation of preprocessor directives. Fixed indentation of preprocessor directives to make it consistent with other headers. Signed-off-by: Botond Ballo include/zmq.hpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 315e563eddc856cdeb062b07c780a476aca954e5 Author: Botond Ballo Date: Sat Nov 19 17:44:17 2011 -0500 C++11 move constructor/assignment operator for socket_t and context_t Added a C++11 move constructor and move assignment operator to zmq::socket_t and zmq::context_t. These functions are only enabled if the compiler supports C++11 rvalue references. Currently the code can detect rvalue reference support for the following compilers: GCC, MSVC, clang. Signed-off-by: Botond Ballo include/zmq.hpp | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) commit ad47cc55cf39660ce533e7921fe259d32d4c4a49 Author: Martin Sustrik Date: Sat Nov 19 10:06:06 2011 +0100 Stuart Webster added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit bed61c78946e5719bfbd1477ded6c577fe811163 Author: Stuart Webster Date: Sat Nov 19 10:02:23 2011 +0100 Line-ending conversion rules for hg-git users and enabled use of .gitignore by hg-git users Mercurial does not have built-in support for converting line-endings. This is a settings file for hg eol (http://mercurial.selenic.com/wiki/EolExtension), an extension that replicates the behaviour of git with core.autocrlf=true. Mercurial uses Python regex syntax by default in its .hgignore files. Adding this line to .gitignore overrides that setting, so hg-git users can just create a hardlink to it (e.g "mklink /H .hgignore .gitignore" on Windows) to use it. Signed-off-by: Stuart Webster .gitignore | 1 + .hgeol | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) commit a247c7d422c86cd78ef6f5b8dad8fbfd9a00aeea Author: Pieter Hintjens Date: Thu Nov 17 11:20:21 2011 -0600 Updated NEWS for issue 281 NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 561a9d2d8022d76166e1de981543337a783f6076 Merge: 69bc977 c4dabba Author: Pieter Hintjens Date: Thu Nov 17 09:16:43 2011 -0800 Merge pull request #32 from mika-fischer/libzmq-281 Work around for LIBZMQ-281 commit c4dabba55f71d2648d9196cd5ef3b2c7238ab254 Author: Mika Fischer Date: Thu Nov 17 13:33:55 2011 +0100 Work around for LIBZMQ-281 The problem is that other threads might still be in mailbox::send() when it is destroyed. So as a workaround, we just acquire the mutex in the destructor. Therefore the running send will finish before the mailbox is destroyed. Signed-off-by: Mika Fischer src/mailbox.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 69bc97726e0ec0ffb509eaf4f50e86616544677f Author: Pieter Hintjens Date: Wed Nov 16 11:42:08 2011 -0600 Fixed erroneous ifdef -- backport 83975c1 src/ip.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5819d702ff48af12d02276cb79eef0c2068d0dc3 Author: Pieter Hintjens Date: Sat Nov 5 20:34:28 2011 +0100 Added AJ Lewis to AUTHORS AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4c7e6d6156d1225f00701ba460c062524e5a474d Author: Pieter Hintjens Date: Fri Nov 4 21:09:47 2011 +0100 Updated NEWS NEWS | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 533a94ba0741e54de832140bdffff53d944441c9 Merge: 6e5a3e9 1afd7a0 Author: Pieter Hintjens Date: Fri Nov 4 12:59:40 2011 -0700 Merge pull request #30 from vortechs2000/master Get zeromq compiling on AIX 6.1 commit 1afd7a088400b39fd3309ff996ffbf9e567463ff Author: AJ Lewis Date: Thu Nov 3 12:10:35 2011 -0500 Combine the existing freebsd/netbsd section with the new HP-UX DCE section Using a couple #ifdefs, we can combine the freebsd/netbsd uuid section with the HP-UX DEC section in uuid.cpp. Signed-off-by: AJ Lewis src/uuid.cpp | 39 +++++++++++---------------------------- 1 files changed, 11 insertions(+), 28 deletions(-) commit 357a6e9f05110e241a1682f841b886b88e442263 Author: AJ Lewis Date: Thu Nov 3 11:57:52 2011 -0500 Implement DCE uuid calls properly Create HPUX & LIBDCEKT specific sections similar to BSD section. It's possible that these could be merged, but I'm not sure if it would be as readable because there are some type differences that might make things difficult. Signed-off-by: AJ Lewis src/uuid.cpp | 37 +++++++++++++++++++++++++------------ src/uuid.hpp | 5 +++++ 2 files changed, 30 insertions(+), 12 deletions(-) commit 857c7f91d1e3c5c82408b9d932e117145678b814 Author: AJ Lewis Date: Thu Nov 3 11:37:41 2011 -0500 Use DCE library on HP-UX to handle UUID generation This is the initial dumb implementation - it just replaces RAND_bytes in the final uuid case rather than handling uuid_create() as done in the BSD case. It passes the self tests, but it's probably not the correct way to do it. You can also use the openssl method my using the '--without-dce' flag to configure. Signed-off-by: AJ Lewis configure.in | 9 ++++++++- src/uuid.cpp | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) commit e5742c20cb076a1867ca7d42668ac1a53aab6b58 Merge: f32cf6d 6e5a3e9 Author: AJ Lewis Date: Thu Nov 3 11:35:22 2011 -0500 Merge remote-tracking branch 'upstream/master' commit 6e5a3e9358373d28123d3b19e91f5a6ff7486073 Author: Pieter Hintjens Date: Fri Oct 28 05:43:35 2011 +0900 Updated NEWS NEWS | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 4cf638a2502a6d344c9e25ef5252b2d45613f7de Author: Bernd Prager Date: Thu Oct 27 17:11:28 2011 +0200 Missing bracket added Signed-off: Martin Sustrik src/zmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8c502692dad0a29e0b98e895b3b04f3d783b5b42 Author: Pieter Hintjens Date: Fri Oct 28 05:38:05 2011 +0900 Updated NEWS NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit b75c06c34f991d96a3b21d48b74efc029df7c800 Author: Martin Sustrik Date: Thu Oct 27 11:51:23 2011 +0200 Paul Betts added to the AUTHORS file Signed-off-by: Martin Sustrik Conflicts: AUTHORS AUTHORS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 19c865d3d7d6a4157205b4036e95e45955459a0b Author: Paul Betts Date: Thu Oct 27 11:48:58 2011 +0200 Enable exceptions raising on assert on Win32 This patch changes the Win32 version to call RaiseException instead of abort (which eventually calls TerminateProcess). This allows crash dumps to be sent correctly instead of the process disappearing. Signed-off-by: Paul Betts src/err.cpp | 13 +++++++++++++ src/err.hpp | 26 ++++++++++++++------------ 2 files changed, 27 insertions(+), 12 deletions(-) commit b40d7c18ad1a3210a49da088b65060f784d17009 Author: Pieter Hintjens Date: Fri Oct 28 05:33:13 2011 +0900 Updated NEWS for issue 261 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 99e7b6a44ee81d1807a5c8a577eea366e4d7275f Author: Martin Sustrik Date: Thu Oct 27 09:41:48 2011 +0200 Bug in kqueue poller fixed (issue 261) Signed-off-by: Martin Sustrik src/kqueue.cpp | 25 +++++++++++++++++-------- 1 files changed, 17 insertions(+), 8 deletions(-) commit b2974da2ba800d2c2b5eb76e1123e95ec63fedf4 Author: Pieter Hintjens Date: Fri Oct 28 05:32:02 2011 +0900 Revert "Applied workaround for issue 261" This reverts commit ddc75f9e54f1fc95a057e935c51c0c22e53df6e7. NEWS | 7 +++---- src/kqueue.cpp | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) commit 686f9f53641899d2e4863526aa52fe47c6fb6bc0 Author: Mikko Koppanen Date: Thu Oct 27 20:37:06 2011 +0100 Fix issue LIBZMQ-273 NEWS | 3 +++ acinclude.m4 | 22 ++++++++++++++++++++++ configure.in | 5 +++++ src/ip.cpp | 4 ++-- 4 files changed, 32 insertions(+), 2 deletions(-) commit f32cf6d4991bf7a334fa8350157d51fb5469ed50 Author: AJ Lewis Date: Thu Oct 27 08:42:11 2011 -0500 Get zeromq compiling on AIX 6.1 Includes platform.hpp in device.cpp and then adds the same check for platforms found in zmq.cpp to include poll.h. Without this, device.cpp fails to compile with: device.cpp: In function 'int zmq::device(zmq::socket_base_t*, zmq::socket_base_t*)': device.cpp:46: error: 'struct zmq_pollitem_t' has no member named 'reqevents' device.cpp:47: error: 'struct zmq_pollitem_t' has no member named 'rtnevents' device.cpp:50: error: 'struct zmq_pollitem_t' has no member named 'reqevents' device.cpp:51: error: 'struct zmq_pollitem_t' has no member named 'rtnevents' device.cpp:67: error: 'struct zmq_pollitem_t' has no member named 'rtnevents' device.cpp:92: error: 'struct zmq_pollitem_t' has no member named 'rtnevents' gmake[1]: *** [libzmq_la-device.lo] Error 1 Signed-off-by: AJ Lewis src/device.cpp | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit 26da87062080a9247401efd1a85f747c59365db1 Author: Guillermo Sandoval Date: Mon Oct 24 16:14:43 2011 -0500 Fixes duplicated variable error src/xrep.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 826d61244360d703f38cfc59ee643a177fb8b65e Author: Guillermo Sandoval Date: Mon Oct 24 16:10:12 2011 -0500 Calls zmq_msg_close regardless of the message is send or not. So it fixes memory leak in XREP src/xrep.cpp | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit daac034503589ed7dabe77fdecb5f1a360ced638 Merge: db69361 c3af879 Author: Guillermo Sandoval Date: Mon Oct 24 16:08:33 2011 -0500 Merge branch 'master' of github.com:gsandoval/zeromq2-1 commit db69361650acb476269623e01b6f548a549365fa Author: Guillermo Sandoval Date: Mon Oct 24 15:14:08 2011 -0500 Fixes memory leak in XREP sockets, occurring when the message was successfully sent. src/xrep.cpp | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit c3af87950559ce87c5f5798ec4c950a6ea5e7e55 Author: Guillermo Sandoval Date: Mon Oct 24 15:14:08 2011 -0500 Fixes memory leak in XREP sockets, occurring when the message was successfully sent. src/xrep.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 808c3b9ff6756566d7da3a8f2ae5f626d9fd1b13 Author: Pieter Hintjens Date: Wed Oct 12 06:52:31 2011 -0500 Updated NEWS for issue 269 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 5f248ef1a63f36e0932db122b73e7f4ce4cf7cd0 Author: Pieter Hintjens Date: Wed Oct 12 05:51:39 2011 -0500 Revert "Added diagnostics for issue 254" This reverts commit 80b0041ea1685ed49c222d237b4c9c49bd495b64. src/tcp_socket.cpp | 10 ++-------- 1 files changed, 2 insertions(+), 8 deletions(-) commit 3014e0f87129695c5230ffbc5b68cdf007878de2 Author: Pieter Hintjens Date: Wed Oct 5 15:50:35 2011 +0200 Clarified doc to say 'round-robined' instead of 'load-balanced' doc/zmq_socket.txt | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit b71462bf750cf00210669921e32fdd2f85d40eb8 Author: Pieter Hintjens Date: Wed Oct 5 14:34:35 2011 +0200 Updated NEWS for OpenPGM updated NEWS | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit 77c8c7f11865b1e1b8c4e11cb5ef6297bc6b774e Author: Steven McCoy Date: Tue Oct 4 09:39:55 2011 +0200 New upstream OpenPGM maintenance release 5.1.118. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz | Bin 1054630 -> 0 bytes foreign/openpgm/libpgm-5.1.118~dfsg.tar.gz | Bin 0 -> 1046589 bytes 3 files changed, 1 insertions(+), 1 deletions(-) commit 0bbc1755387b743aaa086bdc268bcb65fab90af3 Author: Pieter Hintjens Date: Mon Oct 3 07:42:08 2011 -0500 Updated version to 2.1.11 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ab64a395a01293453da606f08e0983ae8bbeb210 Author: Pieter Hintjens Date: Mon Oct 3 07:24:15 2011 -0500 Updated news for 2.1.10 release NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ddc75f9e54f1fc95a057e935c51c0c22e53df6e7 Author: Pieter Hintjens Date: Wed Sep 28 08:37:41 2011 -0500 Applied workaround for issue 261 NEWS | 7 ++++--- src/kqueue.cpp | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) commit 80b0041ea1685ed49c222d237b4c9c49bd495b64 Author: Pieter Hintjens Date: Fri Sep 16 10:33:24 2011 -0500 Added diagnostics for issue 254 src/tcp_socket.cpp | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) commit 4fc2b0fee7cd98ef4d1b69ce079539773bb5b76b Author: Pieter Hintjens Date: Fri Sep 16 10:33:10 2011 -0500 Whitespace fixes src/tcp_connecter.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit e7f29bfccb915d129bc55b9ff1b48b1a7c2e6661 Author: Pieter Hintjens Date: Tue Sep 13 10:15:31 2011 -0500 Fixed issue 252 NEWS | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit fffd7701a5bece99767b6e10e2cafbe7670c5f2f Author: Pieter Hintjens Date: Tue Sep 13 10:13:52 2011 -0500 Fixed issue 252 src/req.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 3e1aa20233c8bc4d29fecf9e74f6ee6857cdca44 Author: Pieter Hintjens Date: Tue Sep 6 08:02:27 2011 -0500 Fixed issue 250 NEWS | 2 ++ src/ip.cpp | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) commit 930c3ef246a5f2a58a614778a9512d61d222de16 Author: Pieter Hintjens Date: Sun Sep 4 10:58:07 2011 +0200 Fixed windows build src/err.hpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit afb68fd07be76bd037761d7b54416f7d29255866 Author: Pieter Hintjens Date: Fri Sep 2 16:09:50 2011 +0200 Updated NEWS for issue 218 Signed-off-by: Pieter Hintjens NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 3d91c037657c74c79dfa49f1781eb633bf31de98 Author: Pieter Hintjens Date: Fri Sep 2 16:08:46 2011 +0200 Fixed issue 218 Signed-off-by: Pieter Hintjens src/ip.cpp | 49 +++++++++++++++++++++++++++++++++++++++---------- src/ip.hpp | 2 ++ src/signaler.cpp | 6 +++--- src/tcp_connecter.cpp | 6 +++--- src/tcp_listener.cpp | 2 +- 5 files changed, 48 insertions(+), 17 deletions(-) commit 9fcbf166da89f73b010950b264f4573b25804e5e Author: Pieter Hintjens Date: Fri Sep 2 11:53:25 2011 +0200 Updated NEWS for issue 140 fix NEWS | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 6c07e8d94453fbabe818a639c8d6021aa95f14c4 Author: Pieter Hintjens Date: Fri Sep 2 11:51:11 2011 +0200 Fixed issue 140 src/options.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) commit 66d69d7d6393d6d097c9a89e20c061e61167a091 Author: Pieter Hintjens Date: Tue Aug 30 14:09:30 2011 +0200 Updated for issue 207 NEWS | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit a41271a0c1840729f4a439b0bd240ca78af04f02 Merge: c514fb9 81602d4 Author: Pieter Hintjens Date: Tue Aug 30 13:52:49 2011 +0200 Merge branch 'issue-207' commit 81602d41aae0cbc284e3d13d7bd7b30357dd8083 Author: Pieter Hintjens Date: Tue Aug 30 13:52:42 2011 +0200 Fixed issue 207 src/socket_base.cpp | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) commit c514fb93902fc8f9423d888b5d70bde87b357cd8 Author: Pieter Hintjens Date: Tue Aug 30 13:11:12 2011 +0200 Updated for 2.1.9 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 392c3771c22d0dfe793cc9c4ee5c27d18d38d428 Author: Pieter Hintjens Date: Mon Aug 29 20:25:11 2011 +0200 Updated NEWS for 2.1.9 NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bb7f41144b513ebf07698ade91c6d6c4e20bec77 Author: Pieter Hintjens Date: Mon Aug 29 12:24:45 2011 +0200 Fixed NEWS to reflect RC status of 2.1.8 NEWS | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit 4df43be69c3f25a4a5f96d379a59d6c6d6f214fa Author: Martin Sustrik Date: Wed Aug 17 18:41:02 2011 +0200 Fix the PGM support on win64 On win64 the size of file descriptor is not the same as size of int. The bug in PGM transport caused a runtime error because of this. The problem is fixed now. Signed-off-by: Martin Sustrik NEWS | 2 ++ src/pgm_receiver.cpp | 4 ++-- src/pgm_sender.cpp | 8 ++++---- src/pgm_socket.cpp | 8 ++++---- src/pgm_socket.hpp | 7 ++++--- 5 files changed, 16 insertions(+), 13 deletions(-) commit 024c4c91098913c7488abde75e9ef0d3fee7e195 Author: Pieter Hintjens Date: Wed Aug 17 16:40:09 2011 +0200 Fixed compile error on win32 src/zmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 323138b81ca71e036200d666b95b96c9b6e58696 Author: Pieter Hintjens Date: Tue Aug 16 17:45:39 2011 +0200 Updated NEWS for Android build NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7b22dccf2fed4cd057876912991fdd61954d6dbc Author: Mikko Koppanen Date: Mon Aug 15 19:09:04 2011 +0200 Added Android support Signed-off-by: Mikko Koppanen configure.in | 6 ++++++ src/ip.cpp | 2 +- src/swap.cpp | 2 +- src/thread.cpp | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) commit 591e5887e6e32675a7520eac67621416f13bec35 Author: Martin Sustrik Date: Sun Aug 14 14:23:16 2011 +0200 Fixed issue 238 NEWS | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit ebfdfdf298525c993b8827fe6c7b6f753c56ca52 Author: Martin Sustrik Date: Sun Aug 14 14:23:16 2011 +0200 select version zmq_poll reports invalid FDs Till now, passing invalid file descriptor to zmq_poll() caused asseration. Now it returns error. Signed-off-by: Martin Sustrik src/zmq.cpp | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) commit d6fbb80a19056cad02ee32e465b12cb0ba29c419 Author: Pieter Hintjens Date: Sat Aug 13 00:27:13 2011 +0200 Fixed issue 239 NEWS | 3 +++ src/swap.cpp | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) commit 317435e2835b41d98a885883631d024422f5c9ff Author: Pieter Hintjens Date: Thu Aug 11 16:54:50 2011 +0200 usleep is void on Android src/zmq.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 7239640d0282902af047d391b4a41fb5cc914bd1 Author: wroberts Date: Wed Aug 10 13:23:37 2011 -0400 Added an ndk-build clean command to clean script and fixed usleep error. - Fixed incorrect directory removal in clean script builds/android/clean.sh | 2 +- src/zmq.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit eeca373616e347e947ff73f1cf8c11f7b53fc1a8 Author: Pieter Hintjens Date: Wed Aug 10 18:18:15 2011 +0200 Updated NEWS for Android NEWS | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 880e5c324031bc390bc88d07f5137ce31d1c8c69 Author: Pieter Hintjens Date: Wed Aug 10 17:58:16 2011 +0200 Fixed use of ANDROID macro src/thread.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 98b96e7d8fd60605ad1498cd540b07dd7040f168 Author: Pieter Hintjens Date: Wed Aug 10 17:51:34 2011 +0200 Whitespace and comment changes builds/android/build.sh | 35 ++++++++++++++++++++++------------- builds/android/clean.sh | 15 ++++++++++----- 2 files changed, 32 insertions(+), 18 deletions(-) commit f2b76414f70d462e7863e4d79f61227d7315cf9d Author: Pieter Hintjens Date: Wed Aug 10 17:13:40 2011 +0200 Added William Roberts to AUTHORS AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 7f2a522a85a2379120ad6d809be56b9f34e3b89b Author: wroberts Date: Tue Aug 9 19:24:11 2011 -0400 Finished with clean android build builds/android/Android.mk | 6 ++---- builds/android/build.sh | 5 +++++ builds/android/clean.sh | 14 +++++++++++--- 3 files changed, 18 insertions(+), 7 deletions(-) commit 62a8d76aa32cc9579811f32d06cbc6ae0a00dbb2 Author: wroberts Date: Tue Aug 9 18:47:59 2011 -0400 Android wip builds/android/Android.mk | 42 ++ builds/android/Application.mk | 1 + builds/android/build.sh | 38 ++ builds/android/clean.sh | 13 + builds/android/include/platform.hpp | 1 + builds/android/include/platform_android.hpp | 229 +++++++++ builds/android/uuid/clear.c | 43 ++ builds/android/uuid/compare.c | 55 +++ builds/android/uuid/copy.c | 45 ++ builds/android/uuid/gen_uuid.c | 680 +++++++++++++++++++++++++++ builds/android/uuid/gen_uuid_nt.c | 92 ++++ builds/android/uuid/isnull.c | 48 ++ builds/android/uuid/pack.c | 69 +++ builds/android/uuid/parse.c | 79 +++ builds/android/uuid/unpack.c | 63 +++ builds/android/uuid/unparse.c | 76 +++ builds/android/uuid/uuid.h | 103 ++++ builds/android/uuid/uuidP.h | 59 +++ builds/android/uuid/uuid_time.c | 171 +++++++ builds/android/uuid/uuidd.h | 54 +++ 20 files changed, 1961 insertions(+), 0 deletions(-) commit ad6bf4aa3e77d8aec72951ac88e0e916c6e63a0d Author: Pieter Hintjens Date: Tue Aug 9 20:48:04 2011 +0200 Provisional Android support, from Ghislain Putois AUTHORS | 1 + builds/android/Makefile | 10 ++++++++++ src/ip.cpp | 20 ++++++++++---------- src/swap.cpp | 6 +++--- src/thread.cpp | 10 ++++++---- 5 files changed, 30 insertions(+), 17 deletions(-) commit 9b2c16cb42fd559cfac1c86f420392a2e4cb7b2e Author: Pieter Hintjens Date: Sat Jul 30 17:26:42 2011 +0200 Fixed issue 236 NEWS | 11 +++++++++++ src/socket_base.cpp | 4 ++++ 2 files changed, 15 insertions(+), 0 deletions(-) commit b7d1b669ce9c3f27202b8daf46425766a877de3e Author: Pieter Hintjens Date: Thu Jul 28 14:07:25 2011 +0200 Debian packaging wasn't distributed NEWS | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) commit 764c4f5a8fa2f21d0f755811ba8b4c38c24e7ae5 Author: Pieter Hintjens Date: Thu Jul 28 13:52:55 2011 +0200 Updated version number for next release include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3c913026c72dd83e2d6ffbb6d9866a748502ffcf Author: Pieter Hintjens Date: Thu Jul 28 13:44:40 2011 +0200 Updated NEWS for 2.1.8 release NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 9d9fb596ab0eaa00da36f79b442d40fd42dfe4eb Merge: 3cb929e 59a84ab Author: Pieter Hintjens Date: Fri Jul 22 11:38:32 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 3cb929e46affd5ebf8c456acba594bae5c106cc8 Author: Martin Sustrik Date: Thu Jul 21 23:35:26 2011 +0200 mailbox::recv correctly passes EINTR to the caller This bug caused signal during blocking call to assert. Signed-off-by: Martin Sustrik NEWS | 3 +++ src/mailbox.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit 59a84abbfbb3be79d8f765da95de23ebdac16630 Merge: 5227717 1b9bc37 Author: Pieter Hintjens Date: Wed Jul 20 16:40:12 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 1b9bc37ff76826069de846fe0c3220b78b357e72 Author: Pieter Hintjens Date: Wed Jul 20 13:12:18 2011 +0200 Fixed build for MSVC builds/msvc/libzmq/libzmq.vcproj | 4 ++++ src/signaler.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit d897a2b45b422ff87da6007b06c6147e535491dd Author: Pieter Hintjens Date: Tue Jul 19 23:08:02 2011 +0200 Fixed build for Windows (signaler.cpp) src/signaler.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 8dd8c71dab33bfd903e05d238b2e8ec507c23c7e Author: Martin Sustrik Date: Mon Jul 18 14:29:20 2011 +0200 Fixed email addresses in the MAITAINERS file Signed-off-by: Martin Sustrik MAINTAINERS | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit b69aee1b5e5aee9bdcab75aa1b5af88bfc7b0339 Author: Pieter Hintjens Date: Mon Jul 18 13:39:51 2011 +0200 Avoid SIGPIPE errors on FreeBSD MAINTAINERS | 8 ++++---- src/tcp_socket.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) commit 846769d809dea727bb6aeb58155aeb9afb357bce Author: Martin Sustrik Date: Mon Jul 18 09:41:26 2011 +0200 Signaler timeout bug on Windows fixed Signed-off-by: Martin Sustrik src/signaler.cpp | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) commit b613c297897cfca15024d493e181f4f1973b1abe Author: Pieter Hintjens Date: Mon Jul 18 11:53:58 2011 +0200 Avoid SIGPIPE errors on FreeBSD src/tcp_socket.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5227717f9b8ccb8cf89967f470e017884edbd10f Author: Pieter Hintjens Date: Fri Jul 15 13:43:20 2011 +0200 ROUTER can talk to ZMQ_REP, DEALER to ZMQ_REQ doc/zmq_socket.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e496d49f57d6b3a377c11b6d5a58f175200ddbde Author: Pieter Hintjens Date: Fri Jul 15 07:08:00 2011 +0200 Updated NEWS for issue 230 NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 5fd65d8f62e4c6e70b23a3e8f0195526b03a2e4f Merge: a8c9eed 61233d0 Author: Pieter Hintjens Date: Fri Jul 15 07:06:42 2011 +0200 Merge branch 'issue230' commit a8c9eedc031ef68d01b5515ff1108bb7f5ada3ac Merge: d17cae2 2c89920 Author: Pieter Hintjens Date: Thu Jul 14 23:29:15 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit d17cae20c5365fe2695b5e9027d8b91916eb9174 Author: Pieter Hintjens Date: Thu Jul 14 22:32:45 2011 +0200 Backported fix for issue 231 NEWS | 4 + src/Makefile.am | 2 + src/config.hpp | 7 + src/ctx.cpp | 2 +- src/io_thread.cpp | 2 +- src/mailbox.cpp | 366 ++++------------------------------------ src/mailbox.hpp | 26 ++- src/reaper.cpp | 2 +- src/signaler.cpp | 340 +++++++++++++++++++++++++++++++++++++ src/signaler.hpp | 63 +++++++ src/socket_base.cpp | 75 ++++++--- src/socket_base.hpp | 6 +- tests/test_shutdown_stress.cpp | 2 +- 13 files changed, 529 insertions(+), 368 deletions(-) commit 2c899206691f528aa21ed52a4eb52ea7d59436cd Author: Pieter Hintjens Date: Thu Jul 14 22:32:45 2011 +0200 Backported fix for issue 231 src/Makefile.am | 2 + src/config.hpp | 7 + src/ctx.cpp | 2 +- src/io_thread.cpp | 2 +- src/mailbox.cpp | 366 ++++------------------------------------ src/mailbox.hpp | 26 ++- src/reaper.cpp | 2 +- src/signaler.cpp | 340 +++++++++++++++++++++++++++++++++++++ src/signaler.hpp | 63 +++++++ src/socket_base.cpp | 75 ++++++--- src/socket_base.hpp | 6 +- tests/test_shutdown_stress.cpp | 2 +- 12 files changed, 525 insertions(+), 368 deletions(-) commit 61233d00877dfb0322bb1a1fd3d7916a1e779d9b Author: Pieter Hintjens Date: Thu Jul 14 22:09:45 2011 +0200 Fixed issue 230 src/tcp_socket.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit a5972520e9961eaf6f6948036c99dbfd03812c1e Author: Pieter Hintjens Date: Wed Jul 13 18:10:54 2011 +0200 Fixed issue 228, backported from 3.0 NEWS | 2 ++ src/rep.cpp | 2 +- src/xrep.cpp | 4 ---- 3 files changed, 3 insertions(+), 5 deletions(-) commit 647dca9650d54637a0e763216825875d1ac915d1 Author: Martin Sustrik Date: Mon Jul 11 16:05:04 2011 +0200 zmq_bind(3) and zmq_connect(3) describe EINVAL error Signed-off-by: Martin Sustrik doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) commit 89fc94cc7e3bb7f23c27dcc57877ec582f4af790 Author: Pieter Hintjens Date: Tue Jul 12 15:47:01 2011 +0200 Updated NEWS NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 994dbe48e74ddfa30a66c46430e878e60dfdd61e Author: Pieter Hintjens Date: Tue Jul 12 15:45:38 2011 +0200 Removed debian packaging, it's now at http://packages.debian.org/source/sid/zeromq debian/README.Debian | 4 -- debian/changelog | 24 ---------- debian/compat | 1 - debian/control | 76 -------------------------------- debian/copyright | 105 -------------------------------------------- debian/libzmq-dev.install | 5 -- debian/libzmq-dev.manpages | 2 - debian/libzmq0.install | 1 - debian/libzmq0.manpages | 5 -- debian/rules | 92 -------------------------------------- debian/source/format | 1 - debian/source/options | 1 - debian/zeromq-bin.install | 3 - debian/zeromq-bin.manpages | 3 - 14 files changed, 0 insertions(+), 323 deletions(-) commit d27374c8346cdde9b0e77fb625249df6d185c6e0 Author: Martin Sustrik Date: Mon Jul 4 09:27:50 2011 +0200 License text in autogen.sh fixed autogen.sh incorrectly referred to the license as GPL. Changed to LGPL. Signed-off-by: Martin Sustrik autogen.sh | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit c35a14beaba8d60e473f15d9978b075d33423a55 Author: Martin Sustrik Date: Thu Jun 30 00:05:03 2011 +0200 Testing for errors from pthread_* functions fixed pthread_* functions return the error number rather than setting errno. This was not accounter for till now. Signed-off-by: Martin Sustrik src/thread.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 257859d1175d361eb9064dc94d8ad80bed6eec58 Author: Martin Sustrik Date: Tue Jun 28 10:22:27 2011 +0200 Packaging for MSVC build fixed MSVC project files for inproc_lat and inproc_thr were not packaged during make dist phase. Signed-off-by: Martin Sustrik builds/msvc/Makefile.am | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit a26c5bfe99dcc574e4899cc7472bffbc092511f5 Author: Carl Clemens Date: Sun Jun 26 16:19:45 2011 +0200 Typo in zmq_msg_size(3) fixed Signed-off-by: Carl Clemens AUTHORS | 1 + doc/zmq_msg_size.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit fa6b54fccc281ed5f7d2d7b4f60c8f5f3f019167 Merge: 21ea666 2008917 Author: Pieter Hintjens Date: Sun Jun 19 10:31:58 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 21ea66635f5bc202ca64299d9f70687d224d55fc Author: Steven McCoy Date: Fri Jun 17 15:02:48 2011 -0400 Refactor Windows versioning and WinSock usage. Signed-off-by: Steven McCoy include/zmq.h | 2 +- src/ctx.cpp | 12 +++-- src/select.cpp | 9 ++-- src/windows.hpp | 152 +++++++++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 138 insertions(+), 37 deletions(-) commit 20089170eabc1614d4b3e946ae9a363cfa8d3e47 Author: Martin Sustrik Date: Tue Jun 14 09:58:18 2011 +0200 Fixed issue 223 - ENETUNREACH is a valid error from connect This patch fixed the JIRA issue 223 Signed-off-by: Martin Sustrik NEWS | 4 ++++ src/tcp_connecter.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) commit 0a533915b4cb2d3910ee3f128e882376e340f87b Author: Pieter Hintjens Date: Mon Jun 13 11:45:06 2011 +0200 Revert "Fix scope on Windows includes." This reverts commit c55e8b47b63ba69b7e240edd8270629f99a00b0d. src/ctx.cpp | 8 ++------ src/select.cpp | 2 +- src/select.hpp | 2 +- src/windows.hpp | 5 +++-- 4 files changed, 7 insertions(+), 10 deletions(-) commit c55e8b47b63ba69b7e240edd8270629f99a00b0d Author: Steven McCoy Date: Sun Jun 12 19:37:11 2011 +0200 Fix scope on Windows includes. Fix windows.h included before winsock2.h. Remove definition of _WINSOCKAPI_. Signed-off-by: Steven McCoy src/ctx.cpp | 8 ++++++-- src/select.cpp | 2 +- src/select.hpp | 2 +- src/windows.hpp | 5 ++--- 4 files changed, 10 insertions(+), 7 deletions(-) commit 69bce48516554cb1f2ac5e52ebb59632ae967c48 Author: Pieter Hintjens Date: Thu Jun 9 19:55:21 2011 +0200 Fixed NEWS for broken 2.1.6 release NEWS | 42 ++++++++++++++++++++---------------------- 1 files changed, 20 insertions(+), 22 deletions(-) commit 71012227f8615b398f755a82f73a70c61ba4fc55 Merge: 143b64b 47245e1 Author: Pieter Hintjens Date: Thu May 26 11:07:51 2011 -0700 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 2f6bc9ce9260a3234a1f1de5c63956b081695f40 Merge: 6a8b691 47245e1 Author: Pieter Hintjens Date: Mon May 23 12:53:30 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 47245e189c81aa083824d732c238d64d5ea32fce Merge: dae5a6c f94a700 Author: Pieter Hintjens Date: Mon May 23 03:47:04 2011 -0700 Merge pull request #19 from grk/patch-1 Fix overflow of megabits on 32bit machines. commit 6a8b691a3117e8d925ee29392c6463568f37108c Author: Pieter Hintjens Date: Fri May 20 17:22:42 2011 +0200 Prepared for 2.1.8 NEWS | 10 ++++++++++ include/zmq.h | 2 +- 2 files changed, 11 insertions(+), 1 deletions(-) commit f94a700626d2d7fc48fce2f0400c764416483e88 Author: Grzesiek Kolodziejczyk Date: Thu May 12 03:46:08 2011 -0700 Fix overflow of megabits on 32bit machines. perf/local_thr.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c35f65a82f1dace3a0b9afc5185dc3efc35595b5 Author: Pieter Hintjens Date: Thu May 12 12:07:51 2011 +0200 Updated NEWS for 2.1.7 NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 143b64bf5ccd59227135cf151a4dc3ed60384360 Merge: 6bb9e7b dae5a6c Author: Pieter Hintjens Date: Tue May 10 08:05:23 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit dae5a6cb9e589e2471558dc86c55202558e918c2 Author: Martin Sustrik Date: Sun May 8 09:03:49 2011 +0200 Async connect doesn't fail on WSAENETDOWN Signed-off-by: Martin Sustrik NEWS | 9 +++- src/err.cpp | 112 ++++++++++++++++++++++++++----------------------- src/err.hpp | 12 +++++ src/tcp_connecter.cpp | 10 ++-- 4 files changed, 82 insertions(+), 61 deletions(-) commit 46738270c22c134b8bbd7546ba4c6864b42f4c75 Author: Martin Sustrik Date: Sat Apr 9 09:46:59 2011 +0200 Missing ENOTSOCK added on Win32 Signed-off-by: Martin Sustrik include/zmq.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 6bb9e7b55db32090763c7f4a43bda8be24f29fd3 Author: Pieter Hintjens Date: Sat May 7 09:03:38 2011 +0200 Fixed spelling errors in man pages doc/zmq_getsockopt.txt | 2 +- doc/zmq_pgm.txt | 4 ++-- doc/zmq_setsockopt.txt | 2 +- doc/zmq_tcp.txt | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit 52318cf705f9b0a73e88b8296d10291f7ba22a86 Merge: c42d156 141a001 Author: Pieter Hintjens Date: Sat May 7 07:23:21 2011 +0200 Updated NEWS commit c42d156fb94b5131d385f08ff93659ffd2944e21 Author: Pieter Hintjens Date: Sat May 7 07:20:10 2011 +0200 Updated NEWS NEWS | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 141a001b046a1206336642b7aa401cbd5e82b826 Author: Pieter Hintjens Date: Fri May 6 17:09:36 2011 +0200 Updated news for issue 211 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 9a08c71d7d63544d55620391d12fab4269e3a4df Author: Pieter Hintjens Date: Fri May 6 17:03:18 2011 +0200 Fixed issue 211 - REP assert on missing envelope src/rep.cpp | 21 ++++++++++++++------- src/xrep.cpp | 12 +++++++++++- src/xrep.hpp | 1 + 3 files changed, 26 insertions(+), 8 deletions(-) commit ddffe5db3351fbaff6086157e6a351e935d37d2e Author: Martin Sustrik Date: Fri May 6 15:51:56 2011 +0200 Current pipe pointer in XREP out of range -- fixed. Signed-off-by: Martin Sustrik src/xrep.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 96861b9d405663d71926b21843220481ebd33062 Author: Martin Sustrik Date: Sat Apr 9 09:35:34 2011 +0200 Run-time checking for context & socket validity added Signed-off-by: Martin Sustrik NEWS | 3 +++ doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 4 ++-- doc/zmq_connect.txt | 4 ++-- doc/zmq_getsockopt.txt | 4 ++-- doc/zmq_recv.txt | 4 ++-- doc/zmq_send.txt | 4 ++-- doc/zmq_setsockopt.txt | 4 ++-- doc/zmq_term.txt | 2 +- src/ctx.cpp | 9 +++++++++ src/ctx.hpp | 6 ++++++ src/socket_base.cpp | 9 +++++++++ src/socket_base.hpp | 6 ++++++ src/zmq.cpp | 32 ++++++++++++++++---------------- 14 files changed, 64 insertions(+), 31 deletions(-) commit 24a669f96d44acd03e03212e8ad5c32ffa756f53 Author: Martin Sustrik Date: Wed May 4 12:43:23 2011 +0200 Tore Halvorsen added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4536f014071dd85c5520057f902e288c65e3cd2b Author: Tore Halvorsen Date: Wed May 4 12:41:10 2011 +0200 Accessing an iterator after it is accessed is not valid. Moving the erase after the access and check agains current_id. src/xrep.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8e740d555b5b4383995cb3d81ff44c1e7add2da4 Author: Pieter Hintjens Date: Wed May 4 15:52:26 2011 +0200 Clarified zmq_poll man page that timeout resolution is 1msec NEWS | 1 + doc/zmq_poll.txt | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit 71cb36d04bd74ca82aca3868e665831733995be7 Author: Pieter Hintjens Date: Tue May 3 17:30:21 2011 +0200 Fixed issue 206 NEWS | 2 ++ src/decoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) commit 0fc54c9d14c8ff137e2b8aff6e472dcefb3a0c02 Author: Pieter Hintjens Date: Mon May 2 20:09:11 2011 +0200 Updated NEWS NEWS | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 16b725ddc978633b6349eb9353263c076ad9b702 Author: Martin Sustrik Date: Mon May 2 19:28:51 2011 +0200 Current inpipe remains unchaged in XREP when other pipe terminates When an inpipe terminated within XREP, it was erased from the array and thus current_in (which is an index) pointed to a different element in the array. This caused problems when we were in the middle of reading a multipart message. Signed-off-by: Martin Sustrik src/xrep.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit c688f7536ea1a2f4f8d82fcc40f962bea230dd9e Author: Pieter Hintjens Date: Sat Apr 30 09:13:28 2011 +0200 Another fix to PUB sockets with multipart messages src/dist.cpp | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) commit 10f0e7c71ed31530d3a56f9ae99ef926bfcb1090 Author: Pieter Hintjens Date: Sat Apr 30 07:37:17 2011 +0200 Updated NEWS for issue 191 NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 24e56e19a82035950dd721bb9d970294f508737e Merge: 33018b3 b6befaa Author: Pieter Hintjens Date: Sat Apr 30 07:36:30 2011 +0200 Merge branch 'issue191' commit b6befaad5d9ac6c4ccb13b1668b14696d7016c01 Author: Pieter Hintjens Date: Sat Apr 30 07:36:16 2011 +0200 Message atomicity in pub sockets fixed - issue 191 src/dist.cpp | 4 +++- src/dist.hpp | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) commit 33018b30287777bf19ac292e38861b0c4b7e2599 Author: Pieter Hintjens Date: Fri Apr 29 09:24:16 2011 +0200 Updated NEWS NEWS | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit 7dc87c59ded306970763c928ff0c4c350e2a2453 Author: Martin Sustrik Date: Fri Apr 29 07:23:30 2011 +0200 WSAENETUNREACH is a valid networking error Till now, 0MQ asserted on Windows when connect () returned WSAENETUNREACH. Signed-off-by: Martin Sustrik src/tcp_connecter.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit be403bf2ba1b61355cd0d2f8f6609408b71cde99 Author: Pieter Hintjens Date: Fri Apr 29 09:22:29 2011 +0200 Downstreamed patch for issue 191 src/dist.cpp | 70 ++++++++++++++++++++++++++++++--------------------------- src/dist.hpp | 17 +++++++------ 2 files changed, 46 insertions(+), 41 deletions(-) commit 0ec42592f31faa5e98faa38961ee736d892e0783 Author: Pieter Hintjens Date: Tue Apr 26 19:57:16 2011 +0200 Bumped version number for 2.1.7 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ee185e241ec2a3091b9200cd5615cfa4f66e7a07 Author: Pieter Hintjens Date: Tue Apr 26 19:45:25 2011 +0200 Set version number for 2.1.6 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d23534614452c954e7f64052ef232fd176e8897c Author: Pieter Hintjens Date: Tue Apr 26 19:44:36 2011 +0200 Fixed NEWS for 2.1.6 NEWS | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) commit ca24a1baa512751c54a89ab7eb5f815522d77b13 Author: Pieter Hintjens Date: Tue Apr 26 19:22:24 2011 +0200 Moved tests off 5555 (conflict with Eclipse) Signed-off-by: Pieter Hintjens tests/test_pair_tcp.cpp | 2 +- tests/test_reqrep_tcp.cpp | 2 +- tests/test_shutdown_stress.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 6f653e39d7a0ade569bc7e78679930a11640de4e Author: Martin Sustrik Date: Fri Apr 22 07:51:24 2011 +0200 Assert during SUB socket termination fixed. Fair queueing algorithm was checking whether the current pipe is not closed in the middle of reading a multipart message. However, this is OK when the socket is closing down. Signed-off-by: Martin Sustrik src/fq.cpp | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit fa6541c34e9c9496ad3fe83758773965862e272d Author: Pieter Hintjens Date: Tue Apr 26 10:01:56 2011 +0200 Ignore generated RHAT spec file .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 32915f8cadc30a62524ff6fe1c70158934704117 Author: Mikko Koppanen Date: Wed Apr 20 21:55:48 2011 +0100 Backport spec file changes from upstream Makefile.am | 1 - builds/redhat/zeromq.spec | 139 ------------------------------------------ builds/redhat/zeromq.spec.in | 139 ++++++++++++++++++++++++++++++++++++++++++ configure.in | 3 +- 4 files changed, 141 insertions(+), 141 deletions(-) commit 43307455e352769189d427f260c4b48a3a19f7ce Author: Pieter Hintjens Date: Wed Apr 20 19:39:57 2011 +0200 Fixed bad commit of message validity checking include/zmq.h | 2 +- include/zmq.hpp | 2 +- src/socket_base.cpp | 12 ++++++------ src/zmq.cpp | 40 +++++++++++++++++++++++++++++++--------- 4 files changed, 39 insertions(+), 17 deletions(-) commit 205533ac79e6634650c9b77c41ef934084a84619 Author: Pieter Hintjens Date: Wed Apr 20 16:17:56 2011 +0200 Updated for 2.1.6 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a347a957ecf3dcbf300fd4513d8aad967a492395 Author: Pieter Hintjens Date: Wed Apr 20 16:12:15 2011 +0200 Fixed error in zmq_msg_t checking, reverted to 2.1.5 include/zmq.h | 2 +- src/socket_base.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit bee9cd8aa40cf82bdb45b88e6d9fc9ef123c118e Author: Pieter Hintjens Date: Wed Apr 20 12:39:21 2011 +0200 Updated for 2.1.6 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fd089736bcaa196106f516b87b8e8b906ffa8f63 Author: Pieter Hintjens Date: Wed Apr 20 12:31:17 2011 +0200 Updated news for 2.1.5 NEWS | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit f5043dff3ec0c1ea4619c89de8186a6d54938d5d Merge: c27e9d1 8b13301 Author: Pieter Hintjens Date: Wed Apr 20 12:29:28 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit c27e9d16ad964f3b4252df890a3ec56c1c8ff6d7 Author: Martin Sustrik Date: Tue Apr 19 08:08:15 2011 +0200 Message validity is checked in the runtime Signed-off-by: Martin Sustrik doc/zmq_msg_close.txt | 3 ++- doc/zmq_msg_copy.txt | 3 ++- doc/zmq_msg_move.txt | 3 ++- doc/zmq_recv.txt | 2 ++ doc/zmq_send.txt | 2 ++ include/zmq.h | 1 + src/req.cpp | 2 +- src/socket_base.cpp | 14 ++++++++++++++ src/xrep.cpp | 2 +- 9 files changed, 27 insertions(+), 5 deletions(-) commit 8b13301225b0ee34397af53a4c824a5bf05388ba Author: Martin Sustrik Date: Mon Apr 18 09:11:45 2011 +0200 zmq_socket(3) describes the EMFILE error code Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 2b07aaad62cfa218fcbc2f586fce94c1f9fc7284 Author: Martin Sustrik Date: Fri Apr 15 08:03:26 2011 +0200 zmq_send(3) manpage improved Signed-off-by: Martin Sustrik doc/zmq_send.txt | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 91bfeaf9b9ef1e0370fae31b14b4be3d8b02eff5 Author: Martin Sustrik Date: Fri Apr 15 07:59:28 2011 +0200 Error handling for accept on Cygwin fixed Signed-off-by: Martin Sustrik src/tcp_listener.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 6ee55af86870e102cf9dab77e7ed217068c8c4d4 Merge: 5a87743 1b55cf2 Author: Pieter Hintjens Date: Thu Apr 7 22:56:19 2011 +0200 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 5a8774373279ec9517b89ac21a945ca65fda20d2 Author: Pieter Hintjens Date: Thu Apr 7 22:56:09 2011 +0200 Reduced stress of shutdown tests tests/test_shutdown_stress.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1b55cf2705b04caa0fc8152e1684389d91e557f0 Author: Mikko Koppanen Date: Tue Apr 5 12:00:30 2011 +0100 Fix Win32 builds src/tcp_socket.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 5fe4e9cea8af2c9d5f22d53b92ae202c03ce9c33 Author: Mikko Koppanen Date: Mon Apr 4 22:52:02 2011 +0200 Make pkg-config dependency conditional Signed-off-by: Mikko Koppanen autogen.sh | 6 ------ configure.in | 13 ++++++++----- 2 files changed, 8 insertions(+), 11 deletions(-) commit 28cdcaa8f323e05f7ebb3873c62ed1fd7839136f Author: Martin Sustrik Date: Mon Apr 4 13:12:46 2011 +0200 Another error handling issue on Win32 solved Signed-off-by: Martin Sustrik perf/inproc_lat.cpp | 2 +- perf/inproc_thr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 08066dcf6511faddf54ede3dd28bf14bf5f89201 Author: Martin Sustrik Date: Mon Apr 4 12:49:39 2011 +0200 Issue with error checking on Win32 platform fixed Signed-off-by: Martin Sustrik src/thread.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6f9cb01eab130589d9c97062847a293b7605d429 Author: Martin Sustrik Date: Mon Apr 4 12:12:06 2011 +0200 Unreferenced variable removed Signed-off-by: Martin Sustrik src/tcp_socket.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 5436832fdfe12c51c869e2cd59722b2be21a5a2a Author: Pieter Hintjens Date: Mon Apr 4 10:50:51 2011 +0200 Fixed RPM source spec builds/redhat/zeromq.spec | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c493a44a2c1f2eb4e9e2aa37929b16170d849975 Author: Pieter Hintjens Date: Mon Apr 4 10:36:24 2011 +0200 Fixed bad packaging for zmq_device builds/redhat/zeromq.spec | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 122b9a48247d12258710bde53d4298da03661a01 Author: Robert G. Jakabosky Date: Sun Apr 3 20:44:02 2011 +0200 Add note about thread-safety to zmq_msg_init_data() manpage. Signed-off-by: Robert G. Jakabosky doc/zmq_msg_init_data.txt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 2ec3fdeff4c9b0d825cc5f1192abf3362b0bf771 Author: Pieter Hintjens Date: Sun Apr 3 14:28:07 2011 +0200 Backported inproc perf tests to 2.x api perf/inproc_lat.cpp | 16 ++++++++-------- perf/inproc_thr.cpp | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) commit 4929636cea946892870921162388ecdf39f5267a Author: Mikko Koppanen Date: Sun Apr 3 12:51:12 2011 +0100 Fix merge conflicts acinclude.m4 | 6 +++--- configure.in | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) commit 6641ed81d2d2215f6b0d2aafa30c455eafe00c29 Author: Pieter Hintjens Date: Sun Apr 3 10:37:12 2011 +0200 Updated NEWS NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 7a5f33ed180303c45b83e224bebaa4d734687fbf Author: Martin Sustrik Date: Sun Apr 3 07:36:02 2011 +0200 Git ignores .gcno files Signed-off-by: Martin Sustrik .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 1e3ccf94c3b964ebb5b85c76775489ed73d881d1 Author: Mikko Koppanen Date: Sun Apr 3 07:34:14 2011 +0200 Additional gcov changes Signed-off-by: Mikko Koppanen acinclude.m4 | 32 +++++++++++++++++++++----------- 1 files changed, 21 insertions(+), 11 deletions(-) commit 9014b40901bf87c322f69e656ff77c99e34cf1d1 Author: Mikko Koppanen Date: Sat Apr 2 22:49:41 2011 +0200 Added code coverage checking Signed-off-by: Mikko Koppanen acinclude.m4 | 8 ++++---- configure.in | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) commit cd299055643ef160e87b7a339cb30aa0bb2eab98 Author: Mikko Koppanen Date: Sat Apr 2 22:50:46 2011 +0200 Large rename: AC_ZMQ_ to LIBZMQ_ and ac_zmq_ to libzmq_. Fixes "warning suspicious cache-id" Signed-off-by: Mikko Koppanen acinclude.m4 | 366 +++++++++++++++++++++++++++++++-------------------------- configure.in | 86 +++++++------- 2 files changed, 243 insertions(+), 209 deletions(-) commit 45f95648b825257f5426263643547a7df9c304b7 Author: Mikko Koppanen Date: Sat Apr 2 22:48:52 2011 +0200 Add option to build with system opepgm Signed-off-by: Mikko Koppanen autogen.sh | 6 ++++++ configure.in | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) commit c54e54b1c32c602d9a188d4f2318f72d4f3b21f9 Author: Pieter Hintjens Date: Sat Apr 2 20:17:38 2011 +0200 Updated NEWS for patches NEWS | 28 +++++++++++++++++++++++----- 1 files changed, 23 insertions(+), 5 deletions(-) commit b4c4648fef62b6aceaad1ab3d47764b9f3c06e47 Author: Martin Sustrik Date: Sat Apr 2 19:32:44 2011 +0200 Project location on github changed in README file Signed-off-by: Martin Sustrik README | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 006b72e73d34edda48a477d62042b3b73dfe5166 Author: Pieter Hintjens Date: Sat Apr 2 09:22:41 2011 +0200 Fixed memory leak with threads on win32 Signed-off-by: Pieter Hintjens src/thread.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit b65071324288ff5b5c1bfa2439d547a11c40b687 Author: Martin Sustrik Date: Sat Apr 2 09:50:35 2011 +0200 inproc perf tests now work on Windows Signed-off-by: Martin Sustrik builds/msvc/inproc_lat/inproc_lat.vcproj | 174 ++++++++++++++++++++++++++++++ builds/msvc/inproc_thr/inproc_thr.vcproj | 174 ++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 40 ++++--- perf/inproc_lat.cpp | 46 ++++++++- perf/inproc_thr.cpp | 46 ++++++++- 5 files changed, 458 insertions(+), 22 deletions(-) commit 6da2436ea8944dc8625ccaa005eddc69c5a8942b Author: Martin Sustrik Date: Fri Apr 1 11:55:10 2011 +0200 inproc_lat and inproc_thr added to .gitignore Signed-off-by: Martin Sustrik .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e1926d84698cdc2a331123c7d3f6c0d2aa8d8cfd Author: Martin Sustrik Date: Fri Apr 1 11:53:51 2011 +0200 PGM wire format specification improved in zmq_pgm(7) Signed-off-by: Martin Sustrik doc/zmq_pgm.txt | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 1fb5a3ee6e07cdbdef31a5dd1abaf8799a88b1a7 Author: Martin Sustrik Date: Thu Mar 31 23:16:14 2011 +0200 Robert G. Jakabosky added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 0e528fb7029234f490d77ab7d382d47413f85c4e Author: Robert G. Jakabosky Date: Thu Mar 31 23:14:38 2011 +0200 Adding thread latency/throughput perf. examples. Signed-off-by: Robert G. Jakabosky perf/Makefile.am | 8 ++- perf/inproc_lat.cpp | 190 +++++++++++++++++++++++++++++++++++++++++++++++ perf/inproc_thr.cpp | 204 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 401 insertions(+), 1 deletions(-) commit 51d6e1d47d3a2cf13358b83d312236317a53f435 Author: Pieter Hintjens Date: Wed Mar 30 14:45:29 2011 +0200 Udated version for next release include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5684d43eb3a03cb863f920015c5fa52f73977ec8 Author: Pieter Hintjens Date: Wed Mar 30 14:21:58 2011 +0200 Fixed whitespace error doc/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3420eb7304ec05e2d7f36ac6f811abf2d0ba8bff Author: Pieter Hintjens Date: Wed Mar 30 14:09:19 2011 +0200 Updated NEWS for 2.1.4 NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e621c48ba04fe5dbe77f416bed185a60273e5be0 Author: Pieter Hintjens Date: Mon Mar 28 20:52:22 2011 +0200 Restored HTML man pages output doc/Makefile.am | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit a18d55633378e6949a4dd619ade3bd434ec3614e Author: Pieter Hintjens Date: Sat Mar 26 09:53:06 2011 +0100 Added missing HWP/inproc change to 2.1.1 notes NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 20e6dc44164bea5b247225dac8dcbf7630314f72 Merge: 1a8d95d 55d6932 Author: Mikko Koppanen Date: Wed Mar 23 14:21:02 2011 +0000 Merge branch 'master' of https://github.com/zeromq/zeromq2-1 commit 1a8d95da9eae484df2c3b6879b3c6f76b48a98cb Author: Mikko Koppanen Date: Wed Mar 23 14:20:57 2011 +0000 Fix make dist Makefile.am | 7 ++++++- configure.in | 3 +++ foreign/openpgm/Makefile.am | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) commit 55d6932031da03d1321e728a376a64217ecf0d61 Author: Pieter Hintjens Date: Wed Mar 23 11:45:38 2011 +0100 Upgraded OpenPGM to 5.1.115 NEWS | 5 +++++ foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz | Bin 1051807 -> 0 bytes foreign/openpgm/libpgm-5.1.115~dfsg.tar.gz | Bin 0 -> 1054630 bytes 3 files changed, 5 insertions(+), 0 deletions(-) commit f392d73332d5642f17a85ffe337c7f45217f4124 Author: Steven McCoy Date: Wed Mar 23 14:55:00 2011 +0800 OpenPGM 5.1.115 to fix assertion with messages smaller than an IP header length. Signed-off-by: Steven McCoy configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4c988d321a60279bf324140c539b6e586d5c29d2 Author: Pieter Hintjens Date: Tue Mar 22 22:31:30 2011 +0100 Prepared for 2.1.4 release NEWS | 11 +++++++++++ include/zmq.h | 2 +- 2 files changed, 12 insertions(+), 1 deletions(-) commit 34b7f54b0fa6e7884a76792633ca66f176d25906 Merge: b10138f 91bdf04 Author: Pieter Hintjens Date: Tue Mar 22 22:29:12 2011 +0100 Merge branch 'openpgm-no-artifact' of https://github.com/mkoppanen/zeromq2-1 into mkoppanen-openpgm-no-artifact commit 91bdf04ac5d70c265efe44ae9462c403ec8a93e7 Author: Mikko Koppanen Date: Tue Mar 22 09:21:05 2011 +0000 Make sure that OpenPGM artifacts are not installed during ZeroMQ installation and remove unnecessary OpenPGM build defines .gitignore | 1 + Makefile.am | 2 +- configure.in | 53 +++--------------------------------------- foreign/openpgm/Makefile.am | 6 +++++ 4 files changed, 12 insertions(+), 50 deletions(-) commit b10138f6ec803b9b616c483a7792fb5ed4e9ccc6 Author: Pieter Hintjens Date: Mon Mar 21 21:08:23 2011 +0100 Fixed RHAT packaging for removed devices builds/redhat/zeromq.spec | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) commit 3c0180fbda42d04659268e50241ca75c1668d01e Author: Pieter Hintjens Date: Mon Mar 21 14:05:48 2011 +0100 Fixed error in OpenPGM news NEWS | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 31d8b7f74daa3f094347876db2774112d80611fe Author: Pieter Hintjens Date: Mon Mar 21 10:08:42 2011 +0100 Fixed 'documentation' in MAINTAINERS MAINTAINERS | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) commit a4c98d20c29b48d35af3e438e763ee915e63e790 Author: Pieter Hintjens Date: Mon Mar 21 10:07:03 2011 +0100 Removed MSVC builds for standalone devices builds/msvc/Makefile.am | 6 +- builds/msvc/msvc.sln | 15 -- builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 176 ------------------------ builds/msvc/zmq_queue/zmq_queue.vcproj | 176 ------------------------ builds/msvc/zmq_streamer/zmq_streamer.vcproj | 176 ------------------------ 5 files changed, 1 insertions(+), 548 deletions(-) commit bcd6ab81fa440287172081b19667f26a202d5f1c Author: Pieter Hintjens Date: Mon Mar 21 09:58:10 2011 +0100 Updated NEWS for v2.1.3 NEWS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f42399ef8788c0f5367bd22f1e82f7944d7c3e37 Author: Martin Sustrik Date: Sun Mar 20 20:52:54 2011 +0100 Message atomicity bug in load-balancer fixed If the peer getting the message have disconnected in the middle of multiplart message, the remaining part of the message went to a different peer. This patch fixes the issue. Signed-off-by: Martin Sustrik NEWS | 5 ++++- src/lb.cpp | 25 ++++++++++++++++++++++++- src/lb.hpp | 3 +++ 3 files changed, 31 insertions(+), 2 deletions(-) commit 2294c87d2c670e95595553d3fb7a13264216a540 Author: Pieter Hintjens Date: Sun Mar 20 17:27:43 2011 +0100 Fixed README git and man page URIs README | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 795b9482ba3aa76b994f428f6ec549ac56438110 Author: Pieter Hintjens Date: Sun Mar 20 17:17:26 2011 +0100 Removed HTML generation of man pages doc/Makefile.am | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) commit 2bae7f7dec5468f9102983d218944d7d557ea9a4 Author: Pieter Hintjens Date: Sun Mar 20 17:09:27 2011 +0100 Removed stand-alone devices Makefile.am | 4 +- NEWS | 4 + configure.in | 2 - devices/Makefile.am | 3 - devices/zmq_forwarder/Makefile.am | 8 -- devices/zmq_forwarder/zmq_forwarder.cpp | 124 ------------------------------- devices/zmq_queue/Makefile.am | 8 -- devices/zmq_queue/zmq_queue.cpp | 123 ------------------------------ devices/zmq_streamer/Makefile.am | 8 -- devices/zmq_streamer/zmq_streamer.cpp | 123 ------------------------------ 10 files changed, 6 insertions(+), 401 deletions(-) commit d736cea05f9eb3e63c0ecb37ea78d4bff81ddfcf Author: Martin Sustrik Date: Sun Mar 20 11:50:51 2011 +0100 Message atomicity problem solved in PUB socket When new peer connects to a PUB socket while it is in the middle of sending of multi-part messages, it gets just the remaining part of the message, i.e. message atomicity is broken. This patch drops the tail part of the message and starts sending to the peer only when new message is started. Signed-off-by: Martin Sustrik NEWS | 3 +++ src/dist.cpp | 44 +++++++++++++++++++++++++++++++++++++++----- src/dist.hpp | 15 +++++++++++++++ 3 files changed, 57 insertions(+), 5 deletions(-) commit 6e3c38ab2d85eaf46ad9e218914e29f9984a54c2 Author: Pieter Hintjens Date: Sun Mar 20 10:26:20 2011 +0100 Clarified scope of ZMQ_PAIR sockets Signed-off-by: Pieter Hintjens doc/zmq_socket.txt | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) commit 8402e324296d5d0d8a3734ad67d27e879496d6e0 Author: Mikko Koppanen Date: Fri Mar 18 07:56:11 2011 +0000 Updated openpgm to libpgm-5.1.114~dfsg NEWS | 2 +- foreign/openpgm/libpgm-5.1.113~dfsg.tar.gz | Bin 473717 -> 0 bytes foreign/openpgm/libpgm-5.1.114~dfsg.tar.gz | Bin 0 -> 1051807 bytes 3 files changed, 1 insertions(+), 1 deletions(-) commit 84131c004431520f2f62e0cc45e253c13575e6da Author: Pieter Hintjens Date: Thu Mar 17 11:13:50 2011 +0100 Fixed documentation issues (GH-173) doc/zmq_setsockopt.txt | 4 ++-- doc/zmq_socket.txt | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit eeefe8fad4f2a2b20c9cc005220722b2af075c69 Author: Martin Sustrik Date: Wed Mar 16 13:48:40 2011 +0100 Incorrect errno reported from tcp_listener_t::set_address Signed-off-by: Martin Sustrik src/tcp_listener.cpp | 20 ++++++++++++++++---- 1 files changed, 16 insertions(+), 4 deletions(-) commit ab1fc89b84221407ee93d0f9a87405222d336a60 Author: Steven McCoy Date: Thu Mar 17 12:10:58 2011 +0800 Add path support for asciidoc and xmlto. Signed-off-by: Steven McCoy NEWS | 2 +- configure.in | 5 +++++ doc/Makefile.am | 10 +++++----- 3 files changed, 11 insertions(+), 6 deletions(-) commit 6f12503c57a47cb491c4bf6281f843b2b04f7cf6 Author: Steven McCoy Date: Thu Mar 17 12:09:25 2011 +0800 Add silent rules to documentation generators. Signed-off-by: Steven McCoy doc/Makefile.am | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 976b79e38946e6a573a6567c9a4e405f5438da6f Author: Steven McCoy Date: Thu Mar 17 12:07:45 2011 +0800 Add silent rules to Automake. Signed-off-by: Steven McCoy configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 046fea6c410295471e78f219ed077e41c63f3275 Author: Steven McCoy Date: Thu Mar 17 12:06:58 2011 +0800 Bootstrapping OpenPGM Autoconf system no longer required. Signed-off-by: Steven McCoy configure.in | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit be4c3afd386576932abb25deff765af378095ff4 Author: Steven McCoy Date: Thu Mar 17 12:06:36 2011 +0800 Bump OpenPGM to 5.1.114. Signed-off-by: Steven McCoy configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit e713118fce2db84a067af81c43eaf5273860e741 Author: Steven McCoy Date: Thu Mar 17 12:04:03 2011 +0800 Add support for OpenPGM on OSX by pulling in RFC 3768 compatibility header. Signed-off-by: Steven McCoy src/pgm_socket.hpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 37483e1b772e73de60444da5b4413a52e4269124 Author: Steven McCoy Date: Thu Mar 17 12:03:19 2011 +0800 Revert workaround for OpenPGM defining bool as fixed upstream. Signed-off-by: Steven McCoy src/pgm_socket.hpp | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 2a7c74c71d02d5f6a93ae3c6c6aa99473a97492b Author: Jon Dyte Date: Wed Mar 16 09:54:03 2011 +0100 reset socket state when identity message cannot be written to xrep Signed-off-by: Jon Dyte src/xrep.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit c10add3c0895546deec4adbaa0561c8a9ebb493b Author: Pieter Hintjens Date: Tue Mar 15 12:45:26 2011 +0100 Fixed zmq::version style to match rest of API include/zmq.hpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit adf31a5e057926e4c9ea04e01048e071979edb1b Author: Pieter Hintjens Date: Tue Mar 15 10:51:21 2011 +0100 Fixed Makefile for docs doc/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d085436c3e18b2e533c2379b99ea9d29ce9a4e51 Author: Martin Sustrik Date: Mon Mar 14 20:29:00 2011 +0100 FreeBSD complation error fixed There was an error in pgm_receiver wrt strict aliasing. Signed-off-by: Martin Sustrik NEWS | 5 +++++ src/pgm_receiver.cpp | 5 ++++- 2 files changed, 9 insertions(+), 1 deletions(-) commit 74507887ee55faf12b5ac53399b9e3e815fe526d Merge: 58e8f1d 1c31ed6 Author: Pieter Hintjens Date: Tue Mar 15 10:41:30 2011 +0100 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit 58e8f1d3682c2351917b168c05c1f4f47ae2b810 Author: Pieter Hintjens Date: Tue Mar 15 10:39:04 2011 +0100 Added zmq::version method to C++ API Signed-off-by: Pieter Hintjens include/zmq.hpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 1c31ed6671f5cfa769ed2b03e680e1f57b83e996 Author: Martin Sustrik Date: Mon Mar 14 07:11:30 2011 +0100 Remove obsolete assert from pgm_socket.cpp Signed-off-by: Martin Sustrik NEWS | 2 ++ src/pgm_socket.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletions(-) commit 56743e499bdc7cd03eff692439b2c16913fba830 Author: Pieter Hintjens Date: Sun Mar 13 18:08:08 2011 +0100 Added ROUTER/DEALER socket aliases NEWS | 3 +++ include/zmq.h | 2 +- 2 files changed, 4 insertions(+), 1 deletions(-) commit 2f4d85fd1779d6bc9a506356d7a52ec43533a379 Author: Pieter Hintjens Date: Sun Mar 13 18:07:30 2011 +0100 Fixes to man pages - Added missing man page for zmq_device(3) - Removed man pages for undocumented zmq_queue(1), zmq_forwarder(1), zmq_streamer(1) Signed-off-by: Pieter Hintjens NEWS | 44 ++++++++++++++-------------- doc/Makefile.am | 2 +- doc/zmq.txt | 20 ++++--------- doc/zmq_bind.txt | 2 +- doc/zmq_close.txt | 2 +- doc/zmq_connect.txt | 2 +- doc/zmq_cpp.txt | 2 +- doc/zmq_device.txt | 72 ++++++++++++++++++++++++++++++++++++-------- doc/zmq_errno.txt | 2 +- doc/zmq_forwarder.txt | 33 -------------------- doc/zmq_getsockopt.txt | 2 +- doc/zmq_init.txt | 2 +- doc/zmq_inproc.txt | 2 +- doc/zmq_ipc.txt | 2 +- doc/zmq_msg_close.txt | 2 +- doc/zmq_msg_copy.txt | 2 +- doc/zmq_msg_data.txt | 2 +- doc/zmq_msg_init.txt | 2 +- doc/zmq_msg_init_data.txt | 2 +- doc/zmq_msg_init_size.txt | 2 +- doc/zmq_msg_move.txt | 2 +- doc/zmq_msg_size.txt | 2 +- doc/zmq_pgm.txt | 2 +- doc/zmq_poll.txt | 2 +- doc/zmq_queue.txt | 33 -------------------- doc/zmq_recv.txt | 2 +- doc/zmq_send.txt | 2 +- doc/zmq_setsockopt.txt | 2 +- doc/zmq_socket.txt | 2 +- doc/zmq_streamer.txt | 33 -------------------- doc/zmq_strerror.txt | 2 +- doc/zmq_tcp.txt | 2 +- doc/zmq_term.txt | 2 +- doc/zmq_version.txt | 2 +- 34 files changed, 115 insertions(+), 176 deletions(-) commit 46aa3f6f4a8328025fb5d13c33ff68770200be43 Author: Pieter Hintjens Date: Wed Aug 4 14:41:43 2010 +0200 Added man page for the zmq_device method doc/zmq_device.txt | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+), 0 deletions(-) commit af3f1fb864dfe842f76322e744e809dd1647b281 Author: Pieter Hintjens Date: Sun Mar 13 07:44:34 2011 +0100 Updated man page for ZMQ_ROUTER, ZMQ_DEALER doc/zmq_socket.txt | 38 ++++++++++++++++++++++---------------- 1 files changed, 22 insertions(+), 16 deletions(-) commit 42c672aa781c3230ce2240f205eb924074c25a1c Author: Pieter Hintjens Date: Sun Mar 13 06:54:57 2011 +0100 Defined ZMQ_DEALER and ZMQ_ROUTER NEWS | 9 +++++++-- include/zmq.h | 6 ++++-- 2 files changed, 11 insertions(+), 4 deletions(-) commit 6ff5b7f7abfa4830949631c131f752fdb5635ad2 Author: Pieter Hintjens Date: Sun Mar 13 06:54:36 2011 +0100 Restored multicast loop by default src/options.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 63b842610872d364a5103739dab4827f6bf91ce1 Author: guidog Date: Fri Mar 11 12:20:36 2011 +0100 Added missing close method w/ check if socket is already closed. Signed-off-by: guidog NEWS | 2 ++ include/zmq.hpp | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit 79fe799e1b4f06249f9d6ff97f5ed34e93a6c007 Author: Pieter Hintjens Date: Fri Mar 11 11:45:04 2011 +0100 Updated NEWS NEWS | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 1de4d5b5653ee7e78511006ea72266edee7cce89 Author: Pieter Hintjens Date: Fri Mar 11 11:44:51 2011 +0100 Fixed doc of ZMQ_LINGER socket option doc/zmq_setsockopt.txt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit b62dd40f356037f8507e21e181690064afbe90ce Author: Steven McCoy Date: Fri Mar 11 17:49:31 2011 +0800 Use new PGM_ODATA_MAX_RTE controlling original data instead of PGM_TXW_MAX_RTE covering entire channel. Signed-off-by: Steven McCoy NEWS | 17 +++++++++++++---- src/pgm_socket.cpp | 6 +++--- 2 files changed, 16 insertions(+), 7 deletions(-) commit b66bf4d75d4974422f0a0313fdc38aa2b2dda58b Author: Steven McCoy Date: Fri Mar 11 17:48:33 2011 +0800 Bump default rate to 40mbps, disable multicast loop. Signed-off-by: Steven McCoy src/options.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 75cc68c04efad96e8dbfeedaea1595ad082fccfe Author: Mikko Koppanen Date: Thu Mar 10 19:57:35 2011 +0000 Delete old openpgm package NEWS | 11 +++++++++++ foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 444700 -> 0 bytes 2 files changed, 11 insertions(+), 0 deletions(-) commit 8e389b0a20079ea604f2876639781e593e3f56ad Author: Mikko Koppanen Date: Thu Mar 10 19:56:34 2011 +0000 Use OpenPGM autoconf Makefile.am | 6 +- configure.in | 84 ++++++++----------------- foreign/openpgm/libpgm-5.1.113~dfsg.tar.gz | Bin 0 -> 473717 bytes src/Makefile.am | 97 +--------------------------- 4 files changed, 31 insertions(+), 156 deletions(-) commit 946b81bf79d028445686e1d77260c5ed0eac4f15 Author: Brett Cameron Date: Tue Mar 8 14:39:52 2011 +0100 Different fixes to make OpenVMS port work. Signed-off-by: Martin Sustrik AUTHORS | 2 +- NEWS | 2 ++ src/ip.cpp | 16 ++++++++++------ src/ip.hpp | 2 -- src/semaphore.hpp | 2 ++ src/stdint.hpp | 10 +--------- 6 files changed, 16 insertions(+), 18 deletions(-) commit 1dc25322b7361c342d310246b10b99ed5022be84 Author: Martin Sustrik Date: Wed Mar 9 16:34:37 2011 +0100 Windows build fixed Compilation of ip.cpp have failed because EPROTONOSUPPORT was undefined. Including zmq.h should help as the error code is defined there. Signed-off-by: Martin Sustrik NEWS | 3 +++ src/ip.cpp | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) commit 2ddb106601460e3fa5bec2de93f374b0e1af6a5f Author: Steven McCoy Date: Tue Mar 8 18:32:00 2011 +0800 Re-add PGM_TXW_MAX_RTE in order to have rate limiting. Signed-off-by: Steven McCoy NEWS | 10 ++++++++++ src/pgm_socket.cpp | 5 ++++- 2 files changed, 14 insertions(+), 1 deletions(-) commit 515945929dd92779176a20452a38b4d193fc2453 Author: Pieter Hintjens Date: Sun Mar 6 10:39:11 2011 +0100 Updated version number to 2.1.3 include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0b694448f9b32f7528eb93443c2a94b6bb4fd8ed Author: Pieter Hintjens Date: Sun Mar 6 10:38:32 2011 +0100 Updated NEWS for 2.1.2 NEWS | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) commit 01923856da74d07877f5e773ea6d0397339f5a55 Author: Martin Sustrik Date: Thu Mar 3 12:37:11 2011 +0100 Bug caused by interaction of REQ/REP routing and HWM fixed. Signed-off-by: Martin Sustrik src/xrep.cpp | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) commit c31d090860c21a27e69035acc42360dc8e27da87 Author: Martin Sustrik Date: Thu Mar 3 12:15:08 2011 +0100 Documentation wrt thread-safety cleaned up. Signed-off-by: Martin Sustrik doc/zmq_init.txt | 5 +++++ doc/zmq_socket.txt | 13 +++---------- 2 files changed, 8 insertions(+), 10 deletions(-) commit 1096070ce2bb789abd9b210f0c2234e247259ce3 Merge: b7a20bd 5856387 Author: Pieter Hintjens Date: Wed Mar 2 19:36:05 2011 +0100 Merge branch 'master' of github.com:zeromq/zeromq2-1 commit b7a20bd3716d045565fa1a5b2bfd8c973be7af0e Author: Martin Sustrik Date: Wed Mar 2 16:30:40 2011 +0100 The copyrights in file headers updated. Signed-off-by: Martin Sustrik autogen.sh | 8 +++++--- builds/msvc/platform.hpp | 3 ++- devices/zmq_forwarder/zmq_forwarder.cpp | 3 ++- devices/zmq_queue/zmq_queue.cpp | 3 ++- devices/zmq_streamer/zmq_streamer.cpp | 3 ++- include/zmq.h | 1 + include/zmq.hpp | 3 ++- include/zmq_utils.h | 3 ++- perf/local_lat.cpp | 3 ++- perf/local_thr.cpp | 3 ++- perf/remote_lat.cpp | 3 ++- perf/remote_thr.cpp | 3 ++- src/array.hpp | 3 ++- src/atomic_counter.hpp | 3 ++- src/atomic_ptr.hpp | 3 ++- src/blob.hpp | 3 ++- src/clock.cpp | 3 ++- src/clock.hpp | 3 ++- src/command.cpp | 3 ++- src/command.hpp | 3 ++- src/config.hpp | 3 ++- src/connect_session.cpp | 3 ++- src/connect_session.hpp | 3 ++- src/ctx.cpp | 3 ++- src/ctx.hpp | 3 ++- src/decoder.cpp | 3 ++- src/decoder.hpp | 3 ++- src/device.cpp | 3 ++- src/device.hpp | 3 ++- src/devpoll.cpp | 3 ++- src/devpoll.hpp | 3 ++- src/dist.cpp | 3 ++- src/dist.hpp | 3 ++- src/encoder.cpp | 3 ++- src/encoder.hpp | 3 ++- src/epoll.cpp | 3 ++- src/epoll.hpp | 3 ++- src/err.cpp | 3 ++- src/err.hpp | 3 ++- src/fd.hpp | 3 ++- src/fq.cpp | 3 ++- src/fq.hpp | 3 ++- src/i_engine.hpp | 3 ++- src/i_inout.hpp | 3 ++- src/i_poll_events.hpp | 3 ++- src/io_object.cpp | 3 ++- src/io_object.hpp | 3 ++- src/io_thread.cpp | 3 ++- src/io_thread.hpp | 3 ++- src/ip.cpp | 3 ++- src/ip.hpp | 3 ++- src/kqueue.cpp | 3 ++- src/kqueue.hpp | 3 ++- src/lb.cpp | 3 ++- src/lb.hpp | 3 ++- src/likely.hpp | 3 ++- src/mailbox.cpp | 3 ++- src/mailbox.hpp | 3 ++- src/msg_content.hpp | 3 ++- src/mutex.hpp | 3 ++- src/named_session.cpp | 3 ++- src/named_session.hpp | 3 ++- src/object.cpp | 3 ++- src/object.hpp | 3 ++- src/options.cpp | 3 ++- src/options.hpp | 3 ++- src/own.cpp | 3 ++- src/own.hpp | 3 ++- src/pair.cpp | 3 ++- src/pair.hpp | 3 ++- src/pgm_receiver.cpp | 3 ++- src/pgm_receiver.hpp | 3 ++- src/pgm_sender.cpp | 3 ++- src/pgm_sender.hpp | 3 ++- src/pgm_socket.cpp | 3 ++- src/pgm_socket.hpp | 3 ++- src/pipe.cpp | 3 ++- src/pipe.hpp | 3 ++- src/poll.cpp | 3 ++- src/poll.hpp | 3 ++- src/poller.hpp | 3 ++- src/poller_base.cpp | 3 ++- src/poller_base.hpp | 3 ++- src/pub.cpp | 3 ++- src/pub.hpp | 3 ++- src/pull.cpp | 3 ++- src/pull.hpp | 3 ++- src/push.cpp | 3 ++- src/push.hpp | 3 ++- src/reaper.cpp | 3 ++- src/reaper.hpp | 3 ++- src/rep.cpp | 3 ++- src/rep.hpp | 3 ++- src/req.cpp | 3 ++- src/req.hpp | 3 ++- src/select.cpp | 3 ++- src/select.hpp | 3 ++- src/semaphore.hpp | 3 ++- src/session.cpp | 3 ++- src/session.hpp | 3 ++- src/socket_base.cpp | 3 ++- src/socket_base.hpp | 3 ++- src/stdint.hpp | 3 ++- src/sub.cpp | 3 ++- src/sub.hpp | 3 ++- src/swap.cpp | 3 ++- src/swap.hpp | 3 ++- src/tcp_connecter.cpp | 3 ++- src/tcp_connecter.hpp | 3 ++- src/tcp_listener.cpp | 3 ++- src/tcp_listener.hpp | 3 ++- src/tcp_socket.cpp | 3 ++- src/tcp_socket.hpp | 3 ++- src/thread.cpp | 3 ++- src/thread.hpp | 3 ++- src/transient_session.cpp | 3 ++- src/transient_session.hpp | 3 ++- src/trie.cpp | 3 ++- src/trie.hpp | 3 ++- src/uuid.cpp | 3 ++- src/uuid.hpp | 3 ++- src/windows.hpp | 3 ++- src/wire.hpp | 3 ++- src/xpub.cpp | 3 ++- src/xpub.hpp | 3 ++- src/xrep.cpp | 3 ++- src/xrep.hpp | 3 ++- src/xreq.cpp | 3 ++- src/xreq.hpp | 4 +++- src/xsub.cpp | 3 ++- src/xsub.hpp | 3 ++- src/ypipe.hpp | 3 ++- src/yqueue.hpp | 3 ++- src/zmq.cpp | 3 ++- src/zmq_connecter.cpp | 3 ++- src/zmq_connecter.hpp | 3 ++- src/zmq_engine.cpp | 3 ++- src/zmq_engine.hpp | 3 ++- src/zmq_init.cpp | 3 ++- src/zmq_init.hpp | 3 ++- src/zmq_listener.cpp | 3 ++- src/zmq_listener.hpp | 3 ++- tests/test_hwm.cpp | 3 ++- tests/test_pair_inproc.cpp | 3 ++- tests/test_pair_ipc.cpp | 3 ++- tests/test_pair_tcp.cpp | 3 ++- tests/test_reqrep_inproc.cpp | 3 ++- tests/test_reqrep_ipc.cpp | 3 ++- tests/test_reqrep_tcp.cpp | 3 ++- tests/test_shutdown_stress.cpp | 3 ++- tests/testutil.hpp | 3 ++- 151 files changed, 305 insertions(+), 152 deletions(-) commit 58563871a84907cbde5f31f215e94d7bd2ad8908 Author: Martin Sustrik Date: Tue Mar 1 16:08:40 2011 +0100 Explicit identities bug in inproc transport fixed. The identity of bound socket was not used. Instead, transient identity was generated. Signed-off-by: Martin Sustrik src/socket_base.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0629aaf0ef46cdb6a57ddc7b91b647d9d57519c3 Author: Martin Sustrik Date: Sat Feb 26 08:42:20 2011 +0100 Memory leak in PUB/XPUB sockets fixed. Signed-off-by: Martin Sustrik src/xpub.cpp | 14 ++++++-------- src/xpub.hpp | 4 ---- src/xsub.cpp | 7 ++----- src/xsub.hpp | 4 ---- 4 files changed, 8 insertions(+), 21 deletions(-) commit ded079782173389357e6fa1023833d15d0cf4240 Author: Martin Sustrik Date: Fri Feb 25 08:58:01 2011 +0100 Socket with no owner objects is deallocated immediately Till now the deallocation of such socket was delayed till zmq_term() thus creating a "leak". Signed-off-by: Martin Sustrik src/reaper.cpp | 7 ++++--- src/socket_base.cpp | 24 ++++++++++++++---------- src/socket_base.hpp | 4 ++++ 3 files changed, 22 insertions(+), 13 deletions(-) commit 929d26d9d75148a0dfb0463a53ce71ea781e5b7d Author: Pieter Hintjens Date: Thu Feb 24 17:23:51 2011 +0100 Bumped version to 2.1.2 include/zmq.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b233204dc3dc6eacc51d45d75926743b72d2616b Author: Martin Sustrik Date: Thu Feb 24 16:57:53 2011 +0100 Minor patch to zmq_getsockopt(3) man page Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f4c1040ddcb579ca53fb34ef0ef83b130424070d Author: Martin Sustrik Date: Wed Feb 23 11:48:49 2011 +0100 Incorrect PGM sender/receiver creation fixed Signed-off-by: Martin Sustrik src/connect_session.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit f7ce56b801fcec2c0bea28ffe4edba26f319edaa Author: Pieter Hintjens Date: Wed Feb 23 10:51:07 2011 +0100 Updated release notes for version 2.1.1 NEWS | 581 +++++------------------------------------------------------------- 1 files changed, 42 insertions(+), 539 deletions(-) commit 43e8868875e1d5287979e5b9060a9b16be45cc79 Author: Martin Sustrik Date: Tue Feb 22 16:23:36 2011 +0100 Added explicit error message in case of memory exhaustion Signed-off-by: Martin Sustrik src/connect_session.cpp | 6 +++--- src/ctx.cpp | 6 +++--- src/decoder.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/err.hpp | 20 +++++++++++++------- src/io_thread.cpp | 2 +- src/ip.cpp | 2 +- src/kqueue.cpp | 2 +- src/object.cpp | 4 ++-- src/pgm_receiver.cpp | 1 + src/pgm_sender.cpp | 2 +- src/pgm_socket.cpp | 3 ++- src/pipe.cpp | 8 ++++---- src/reaper.cpp | 2 +- src/session.cpp | 2 -- src/socket_base.cpp | 6 +++--- src/swap.cpp | 13 ++++++++----- src/trie.cpp | 6 +++--- src/yqueue.hpp | 4 ++-- src/zmq.cpp | 8 ++++---- src/zmq_connecter.cpp | 2 +- src/zmq_init.cpp | 6 +++--- src/zmq_listener.cpp | 2 +- 24 files changed, 61 insertions(+), 52 deletions(-) commit 98ccff1a24a056aef15372b131eee1c1bf8f62ca Author: Mikko Koppanen Date: Mon Feb 21 23:40:48 2011 +0100 Fixes build on at least CentOS 5 Signed-off-by: Mikko Koppanen builds/redhat/zeromq.spec | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) commit 0eea93526d210372c23041d50f4b401a94e3a006 Author: Martin Sustrik Date: Mon Feb 21 17:49:12 2011 +0100 Fix for memory leak caused by long identities Signed-off-by: Martin Sustrik src/zmq_init.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 5c0931121ba1854766599b6b7dbd1a7937febd6d Author: Martin Sustrik Date: Mon Feb 21 11:22:54 2011 +0100 Computation of buffer size for PGM fixed. Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 41 +++++++++++++++++++++++++++++------------ src/pgm_socket.hpp | 3 +++ 2 files changed, 32 insertions(+), 12 deletions(-) commit 12486fecc4f8d9a3bed37cf3d732b1250b075e24 Author: Martin Sustrik Date: Fri Feb 18 17:57:59 2011 +0100 Fix MSVC and SunStudio builds with OpenPGM Signed-off-by: Martin Sustrik src/pgm_socket.hpp | 5 +++++ src/zmq.cpp | 6 ++++++ 2 files changed, 11 insertions(+), 0 deletions(-) commit 17e2ca71b4f6db76a4848d366defa36f1b19bdd7 Author: Martin Sustrik Date: Fri Feb 18 14:15:10 2011 +0100 Logging of duplicit identities added Signed-off-by: Martin Sustrik src/ctx.cpp | 12 ++++++++++-- src/ctx.hpp | 3 ++- src/object.cpp | 8 ++++++-- src/object.hpp | 2 +- src/session.cpp | 1 + 5 files changed, 20 insertions(+), 6 deletions(-) commit 1f536b2d3820ba5435086a77ad34d86a432b94c7 Author: Martin Sustrik Date: Thu Feb 17 14:20:19 2011 +0100 Init object is child of listener This means that all the handshaking while accepting incoming connection is done exclusively in I/O threads, thus it won't overload the application thread's mailbox. Signed-off-by: Martin Sustrik src/zmq_listener.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 28f3e87fc6c8c5c7046234bf9a08ae62f26d7f3a Author: Martin Sustrik Date: Thu Feb 17 10:33:38 2011 +0100 Add delay before reconnecting So far ZMQ_RECONNECT_IVL delay was used only when TCP connect failed. Now it is used even if connect succeeds and the peer closes the connection afterwards. Signed-off-by: Martin Sustrik src/config.hpp | 3 --- src/connect_session.cpp | 9 +++++---- src/connect_session.hpp | 2 +- src/zmq_connecter.cpp | 4 ++-- src/zmq_connecter.hpp | 2 +- 5 files changed, 9 insertions(+), 11 deletions(-) commit fbe5d859f461b0deaa6083fdee077e01e9b47b91 Author: Michael Compton Date: Tue Feb 15 09:33:19 2011 +0100 Added note regarding setting sockopt before bind/connect Signed-off-by: Michael Compton AUTHORS | 1 + doc/zmq_setsockopt.txt | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit ba26cc9938c33fe0837322ea34bcd438f9b7d207 Author: Martin Sustrik Date: Sun Feb 13 10:07:10 2011 +0100 Build problem with OpenPGM and MSVC fixed Signed-off-by: Martin Sustrik src/zmq.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 14a0e147b2b89fc7fed92c7d9c806b6c53380400 Author: Pieter Hintjens Date: Sat Feb 12 18:36:21 2011 +0100 Fixed win32 issue with WSAStartup - ctx constructor was calling mailbox_t constructor implicitly - moved WSAStartup and WSACleanup to be outside constructor/destructor Signed-off-by: Pieter Hintjens src/ctx.cpp | 17 ----------------- src/zmq.cpp | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 17 deletions(-) commit e94790006ea6f4c64cc1df1c193aa1cf89a75100 Author: Martin Sustrik Date: Wed Feb 9 22:33:57 2011 +0100 reaper added to MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 5b82b1ba30d136655c72f116ee2e372ded453952 Author: Martin Sustrik Date: Wed Feb 9 22:23:21 2011 +0100 Reaper thread waits for commands rather them retrieving them periodically Signed-off-by: Martin Sustrik src/command.hpp | 5 ++++ src/object.cpp | 20 ++++++++++++++++ src/object.hpp | 2 + src/reaper.cpp | 64 +++++++++++++++++--------------------------------- src/reaper.hpp | 13 +++------- src/socket_base.cpp | 53 ++++++++++++++++++++++++++++------------- src/socket_base.hpp | 21 +++++++++++++--- 7 files changed, 106 insertions(+), 72 deletions(-) commit 80ac398bba928fa7f245d2e107071677a13185cf Author: Martin Sustrik Date: Wed Feb 9 15:32:15 2011 +0100 Initial implementation of reaper thread. Reaper thread destroys the socket asynchronously. zmq_term() can be interrupted by a signal (EINTR). zmq_socket() will return ETERM after zmq_term() was called. Signed-off-by: Martin Sustrik doc/zmq_socket.txt | 3 +- doc/zmq_term.txt | 2 + src/Makefile.am | 2 + src/command.hpp | 15 +++++- src/ctx.cpp | 158 +++++++++++++++++++++++--------------------------- src/ctx.hpp | 43 +++++++------- src/io_thread.cpp | 2 +- src/io_thread.hpp | 3 + src/object.cpp | 42 ++++++++++++-- src/object.hpp | 8 +- src/reaper.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++ src/reaper.hpp | 81 ++++++++++++++++++++++++++ src/socket_base.cpp | 18 +++--- src/socket_base.hpp | 8 ++- 14 files changed, 394 insertions(+), 130 deletions(-) commit 889424e675eecd9d9c7d1121456401d5c43029a5 Author: Martin Sustrik Date: Tue Feb 8 16:19:37 2011 +0100 max_sockets honoured precisely The internal log socket was subtracted from the number of available sockets. So, if max_sockets was set to 100, you could create only 99 sockets. Fixed. Signed-off-by: Martin Sustrik src/ctx.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 5dcbc34396bb4d256916fafcbb2ddd646ad179e6 Author: Martin Sustrik Date: Tue Feb 8 14:46:27 2011 +0100 zmq_poll with no fds behaves decently Signed-off-by: Martin Sustrik src/zmq.cpp | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) commit 908b39bf8309044913a34c632cd432958dcf6960 Author: Mikko Koppanen Date: Mon Feb 7 15:06:20 2011 +0100 m4_esyscmd_s doesnt seem to be portable across different systems Signed-off-by: Mikko Koppanen configure.in | 2 +- version.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c8e5be87d82e73cfc8a6655d2c2b6779f7c223a5 Author: Martin Sustrik Date: Sat Feb 5 15:04:15 2011 +0100 test-hwm added to .gitignore Signed-off-by: Martin Sustrik .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 4efead1bbb8f3d2b84ad8e1fc88b65bc621f987f Author: Chris Rempel Date: Sat Feb 5 14:42:21 2011 +0100 Fixed autogen.sh warnings on Debian 6 systems. Signed-off-by: Chris Rempel Please enter the commit message for your changes. Lines starting AUTHORS | 1 + configure.in | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit 042e34a5d99a9d39b0680d063878f13f5d7e7337 Author: Thijs Terlouw Date: Fri Feb 4 16:44:13 2011 +0100 operator void* () added to context_t. Makes it possible to share the context from C++ to C. Signed-off-by: Thijs Terlouw include/zmq.hpp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 3f758ab2f45a07e3e77af4f1b32dc876f5a151ad Author: Martin Sustrik Date: Thu Feb 3 09:59:54 2011 +0100 Don't use RLIMIT_NOFILES in devpoll_t. The patch allows for running 0MQ on Solaris and HP-UX even though ulimit for max number of file descriptors is set to unlimited. Signed-off-by: Martin Sustrik src/devpoll.cpp | 20 ++++++++++---------- src/devpoll.hpp | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) commit ca1acc340c256a35f0db58805bba7cb337d9a5a3 Author: Martin Sustrik Date: Thu Feb 3 08:46:04 2011 +0100 RLIMIT_NOFILE not used in poll_t anymore The problem was that RLIMIT_NOFILE can be set to RLIM_INIFINITY (and that appears to be default on AIX) which caused 0MQ to fail. Signed-off-by: Martin Sustrik src/poll.cpp | 20 ++++++++++---------- src/poll.hpp | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) commit 1e0302633ea10766d21b2a70d62e6f16440c18d4 Author: Mikko Koppanen Date: Sun Jan 30 12:43:17 2011 +0100 Added WithOpenPGM configuration into MSVC builds Signed-off-by: Mikko Koppanen builds/msvc/libzmq/libzmq.vcproj | 77 ++++++++++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 17 ++++++++ 2 files changed, 94 insertions(+), 0 deletions(-) commit 72d320366f2a1076ced81f4e871c7affbb9ffb9d Author: Mikko Koppanen Date: Sun Jan 30 11:51:30 2011 +0100 Added test for HWM Signed-off-by: Mikko Koppanen tests/Makefile.am | 5 +++- tests/test_hwm.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 1 deletions(-) commit 1b15eba9a9718adfeea5cecf499b8247596f6c71 Author: Martin Sustrik Date: Fri Jan 28 07:50:21 2011 +0100 Fixed the problem of subscription forwarding and PGM interaction Signed-off-by: Martin Sustrik src/socket_base.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit f7f1dfc86dd649edbd789a5d157d74721338c912 Author: Thijs Terlouw Date: Wed Jan 26 07:01:06 2011 +0100 ZMQ_RECONNECT_IVL_MAX socket option added It allows for exponential back-off strategy when reconnecting. Signed-off-by: Thijs Terlouw AUTHORS | 1 + doc/zmq_getsockopt.txt | 23 ++++++++++++++++++- doc/zmq_setsockopt.txt | 24 ++++++++++++++++++-- include/zmq.h | 3 +- src/options.cpp | 22 +++++++++++++++++++ src/options.hpp | 6 ++++- src/zmq_connecter.cpp | 55 +++++++++++++++++++++++++++++++++-------------- src/zmq_connecter.hpp | 12 ++++++++- 8 files changed, 120 insertions(+), 26 deletions(-) commit 8e61a11b398c95d829f24c388737eb122405c97b Author: Mikko Koppanen Date: Thu Jan 20 22:13:01 2011 +0100 Do not execute ipc tests under MinGW Signed-off-by: Mikko Koppanen tests/Makefile.am | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 8561a55d2ca3f99ef7d122cf621b2379924152a5 Author: Mikko Koppanen Date: Thu Jan 20 22:12:25 2011 +0100 Remove unnecessary visibility pragmas Signed-off-by: Mikko Koppanen src/zmq.cpp | 9 --------- 1 files changed, 0 insertions(+), 9 deletions(-) commit c91bf25645b27fb903886093b27fa153c60be2fd Author: Dhammika Pathirana Date: Thu Jan 20 07:52:40 2011 +0100 Fix handle connection reset during session init Patch to handle nmap version probes. Signed-off-by: Dhammika Pathirana src/decoder.hpp | 4 ++++ src/zmq_engine.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit 56bdba592cf336b2bd4241a2b8e331cd38a089e4 Author: Martin Sustrik Date: Tue Jan 18 15:57:45 2011 +0100 Fix cppcheck warnings: Prefer prefix ++/-- operators for non-primitive types. Signed-off-by: Martin Sustrik src/ctx.cpp | 6 +++--- src/epoll.cpp | 4 ++-- src/kqueue.cpp | 2 +- src/own.cpp | 2 +- src/pgm_receiver.cpp | 2 +- src/poller_base.cpp | 2 +- src/select.cpp | 4 ++-- src/xrep.cpp | 8 ++++---- 8 files changed, 15 insertions(+), 15 deletions(-) commit b262f2fe9ba02a6d2749e286eaadc65d489600c9 Author: Martin Sustrik Date: Mon Jan 17 14:51:01 2011 +0100 Typo fixed in zmq_send(3) man page. Signed-off-by: Martin Sustrik doc/zmq_send.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 667b247e322e2f0e99b680170a1d004f124b0568 Author: Steven McCoy Date: Mon Jan 17 14:45:24 2011 +0100 Cancel pending timers when decoder for PGM stalls Otherwise the timer event can raise an input event causing assertion on unprocessed data. Signed-off-by: Steven McCoy src/pgm_receiver.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit a249d152003d7a7ebf048c2a9a0307abc1adb704 Author: Martin Sustrik Date: Sat Jan 15 20:16:00 2011 +0100 Fix MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 59fa0c9b46a7f8291c68564ad71ef97dd0bae69e Author: Martin Sustrik Date: Fri Jan 14 12:41:12 2011 +0100 Gerard Toonstra added to the authors file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit a348d94c09ab93a19a57ec22a86782e45f1d06ac Author: Martin Sustrik Date: Fri Jan 14 12:38:07 2011 +0100 Fair queueing of subscriptions added to XPUB socket Signed-off-by: Martin Sustrik src/xpub.cpp | 19 ++++++++++++++++--- src/xpub.hpp | 6 ++++++ 2 files changed, 22 insertions(+), 3 deletions(-) commit 58c9830d90fc39727cec88e48f8985a499aa0ee7 Author: Martin Sustrik Date: Fri Jan 14 12:25:54 2011 +0100 XSUB socket has a subscription distributor Signed-off-by: Martin Sustrik src/xsub.cpp | 7 +++++-- src/xsub.hpp | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 8eae7d8507b1c96aec28bca20a157bb7537c3eb8 Author: Martin Sustrik Date: Fri Jan 14 12:05:10 2011 +0100 'message distribution mechanism' separated from XPUB socket Signed-off-by: Martin Sustrik src/Makefile.am | 2 + src/dist.cpp | 161 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/dist.hpp | 76 ++++++++++++++++++++++++++ src/xpub.cpp | 119 ++-------------------------------------- src/xpub.hpp | 23 ++------- 5 files changed, 249 insertions(+), 132 deletions(-) commit 18f29ded6a83875c27395d254c25e3d152ae1cc6 Author: Martin Sustrik Date: Thu Jan 13 11:44:23 2011 +0100 Make cppcheck not complain about "'operator=' should return something" Signed-off-by: Martin Sustrik src/array.hpp | 4 ++-- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/clock.hpp | 2 +- src/connect_session.hpp | 2 +- src/ctx.hpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.hpp | 2 +- src/fq.hpp | 2 +- src/io_object.hpp | 2 +- src/kqueue.hpp | 2 +- src/lb.hpp | 2 +- src/mailbox.hpp | 2 +- src/mutex.hpp | 2 +- src/named_session.hpp | 2 +- src/object.hpp | 2 +- src/own.hpp | 2 +- src/pair.hpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.hpp | 2 +- src/pipe.hpp | 4 ++-- src/poll.hpp | 2 +- src/poller_base.hpp | 2 +- src/pub.hpp | 2 +- src/pull.hpp | 2 +- src/push.hpp | 2 +- src/rep.hpp | 2 +- src/req.hpp | 2 +- src/select.hpp | 2 +- src/semaphore.hpp | 6 +++--- src/session.hpp | 2 +- src/socket_base.hpp | 2 +- src/sub.hpp | 2 +- src/swap.hpp | 4 ++++ src/tcp_connecter.hpp | 2 +- src/tcp_listener.hpp | 2 +- src/tcp_socket.hpp | 2 +- src/thread.hpp | 2 +- src/transient_session.hpp | 2 +- src/trie.hpp | 2 +- src/xpub.hpp | 2 +- src/xrep.hpp | 2 +- src/xreq.hpp | 2 +- src/xsub.hpp | 2 +- src/ypipe.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq_connecter.hpp | 2 +- src/zmq_engine.hpp | 2 +- src/zmq_init.hpp | 2 +- src/zmq_listener.hpp | 2 +- 52 files changed, 59 insertions(+), 55 deletions(-) commit 70513871082462c957e46986040ebe7b10d64557 Author: Neale Ferguson Date: Wed Jan 12 09:22:25 2011 +0100 Support dynamic generation of C preprocessor definitions for PGM rather than hardcoding them. Signed-off-by: Neale Ferguson AUTHORS | 1 + configure.in | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----- src/Makefile.am | 14 +------------ src/clock.cpp | 5 ++++ 4 files changed, 60 insertions(+), 19 deletions(-) commit 725ebce13ca7871002063c4a254bf532d35ee878 Author: Martin Sustrik Date: Tue Jan 11 21:12:51 2011 +0100 Version bumped to 2.1.1 Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bd0ba6e89a709cc8afbd5a7c3c4f9f533c428249 Author: Martin Sustrik Date: Mon Jan 10 13:53:30 2011 +0100 Size of inproc hwm and swap is sum of peers' hwms and swaps The meat of the patch was contributed by Douglas Creager. Martin Sustrik implemented storing peer options in inproc endpoint repository. Signed-off-by: Martin Sustrik AUTHORS | 1 + src/ctx.cpp | 18 +++++++++--------- src/ctx.hpp | 15 ++++++++++++--- src/object.cpp | 6 +++--- src/object.hpp | 4 ++-- src/socket_base.cpp | 34 +++++++++++++++++++++++++--------- 6 files changed, 52 insertions(+), 26 deletions(-) commit babdf48aacc585d57457da8dec1fb6ce262bf719 Author: Dhammika Pathirana Date: Fri Jan 7 13:28:35 2011 +0100 Fix pipe writer termination Signed-off-by: Dhammika Pathirana src/pipe.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 8e0049e2fb60d31c07786fffe39fdc9c63369dfa Author: Martin Sustrik Date: Fri Jan 7 12:59:48 2011 +0100 Disable sending messages on SUB socket The ability was inherited from XSUB socket. Now it's properly disabled. Signed-off-by: Martin Sustrik src/sub.cpp | 15 ++++++++++++++- src/sub.hpp | 2 ++ 2 files changed, 16 insertions(+), 1 deletions(-) commit 08cd2ce05da74143b6154f7d665756870077c38d Author: Min Ragan-Kelley Date: Thu Jan 6 08:42:57 2011 +0100 resolve "function declaration isn't a prototype" change two declarations in headers to form f(void); instead of f(); which eliminates the warnings when compiling against zeromq Signed-off-by: MinRK AUTHORS | 1 + include/zmq.h | 2 +- include/zmq_utils.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit 472bdcd6b4995d2ab92e97aafa898f083ce1f3ba Author: Martin Sustrik Date: Wed Jan 5 16:57:51 2011 +0100 Return ETERM from getsockopt(ZMQ_EVETS) if zmq_term() was called Signed-off-by: Martin Sustrik src/socket_base.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 95eebbfffaf512d81721697026dbb5434c12c27d Author: Martin Sustrik Date: Mon Jan 3 20:50:24 2011 +0100 sunos/gcc3 compilation issue fixed Signed-off-by: Martin Sustrik src/sub.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 51d2d9b9f82526a9b471dda272c1d54b3d1b1152 Author: Martin Sustrik Date: Mon Dec 20 13:06:36 2010 +0100 Yet one more fix for oversized messages. Signed-off-by: Martin Sustrik src/decoder.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 112d0cd52ec959a6bb4cf02ab03977bc22478246 Author: Martin Sustrik Date: Mon Dec 20 11:47:41 2010 +0100 Fix the segfault when over-sized message is rejected. The in_progress message inside of decoder was left uninitialised in such a case. Signed-off-by: Martin Sustrik src/decoder.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit cbbb1e925d699c8b42b2724740d68839c81684c3 Author: Mikko Koppanen Date: Sat Dec 18 12:13:10 2010 +0100 Fix passing through CFLAGS/CPPFLAGS/CXXFLAGS when using --enable-debug Signed-off-by: Mikko Koppanen acinclude.m4 | 12 ++++++------ configure.in | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) commit d15e881ea02232c3e875699b3c25f43ad2fd093c Author: Martin Sustrik Date: Fri Dec 17 16:30:42 2010 +0100 unplugged engine tries to manipulate the pollset -- fixed Signed-off-by: Martin Sustrik src/zmq_engine.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit b19ee99bb1a2b19a6bf78c7fa2159a85aa608a10 Author: Dhammika Pathirana Date: Fri Dec 17 15:30:56 2010 +0100 fix race condition in session init Signed-off-by: Dhammika Pathirana src/zmq_engine.cpp | 22 +++++++++++++++++++--- src/zmq_engine.hpp | 3 +++ src/zmq_init.cpp | 44 +++++++++++++++++++++++++++----------------- src/zmq_init.hpp | 4 ++++ 4 files changed, 53 insertions(+), 20 deletions(-) commit 27e83cc5258e191a7d5977e202046447df7896b9 Author: Mikko Koppanen Date: Wed Dec 15 20:10:27 2010 +0100 Fixes assertion on pipe.cpp:237 when swap fills up. Fixes swap::full () functionality Signed-off-by: Mikko Koppanen src/lb.cpp | 9 ++++++++- src/pair.cpp | 5 ++++- src/pipe.cpp | 8 ++++---- src/pipe.hpp | 6 +++--- src/swap.cpp | 15 ++++++++++++++- src/swap.hpp | 8 ++++++-- 6 files changed, 39 insertions(+), 12 deletions(-) commit a46980babe076d34347629a54e9635466e6e2a9f Author: Mikko Koppanen Date: Wed Dec 15 14:41:18 2010 +0100 Remove assertions from devices Signed-off-by: Mikko Koppanen devices/zmq_forwarder/zmq_forwarder.cpp | 6 ++++- devices/zmq_queue/zmq_queue.cpp | 6 ++++- devices/zmq_streamer/zmq_streamer.cpp | 6 ++++- src/device.cpp | 33 ++++++++++-------------------- 4 files changed, 26 insertions(+), 25 deletions(-) commit f749f2d21c1b47e6dcd626633acff764a4484b99 Author: Dhammika Pathirana Date: Mon Dec 13 15:40:26 2010 +0100 add basic uri validations Signed-off-by: Dhammika Pathirana src/socket_base.cpp | 50 ++++++++++++++++++++++++++++---------------------- src/socket_base.hpp | 4 ++++ 2 files changed, 32 insertions(+), 22 deletions(-) commit 22b2b9a2b6e1dd18d58ef51f453d2b4777e71be4 Author: Dhammika Pathirana Date: Mon Dec 13 14:18:47 2010 +0100 fix overwriting errno on bind failure Signed-off-by: Dhammika Pathirana src/tcp_listener.cpp | 7 +++++-- src/tcp_listener.hpp | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) commit a9d969a73e303db2f6ddf436740d0bbef7e63dba Author: Martin Sustrik Date: Thu Dec 9 21:44:15 2010 +0100 Bob Beaty added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit fcfad5682ed7a7f5108853d2a7039aedfd9a9ac2 Author: Bob Beaty Date: Thu Dec 9 21:42:58 2010 +0100 Added Recovery Interval in Milliseconds For very high-speed message systems, the memory used for recovery can get to be very large. The corrent limitation on that reduction is the ZMQ_RECOVERY_IVL of 1 sec. I added in an additional option ZMQ_RECOVERY_IVL_MSEC, which is the Recovery Interval in milliseconds. If used, this will override the previous one, and allow you to set a sub-second recovery interval. If not set, the default behavior is to use ZMQ_RECOVERY_IVL. Signed-off-by: Bob Beaty doc/zmq_getsockopt.txt | 20 ++++++++++++++++++++ doc/zmq_setsockopt.txt | 24 ++++++++++++++++++++++++ include/zmq.h | 1 + src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 2 ++ src/pgm_socket.cpp | 32 ++++++++++++++++++-------------- 6 files changed, 83 insertions(+), 14 deletions(-) commit 1d81d2f1d4549c2cd0999c9544b059c29706f260 Author: Mikko Koppanen Date: Tue Dec 7 11:15:51 2010 +0100 tar doesn't accept -C flag on solaris while extracting Signed-off-by: Mikko Koppanen configure.in | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit a3353150f845cf0f6e8f2355d3aad760bfba4b64 Author: Mikko Koppanen Date: Tue Dec 7 11:15:18 2010 +0100 Fix werror flag store/restore Signed-off-by: Mikko Koppanen acinclude.m4 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit aed2eeafdc2fce93738368749b61b36f98ea6cd6 Author: Mikko Koppanen Date: Tue Dec 7 11:14:46 2010 +0100 Fix visibility on rhel4 Signed-off-by: Mikko Koppanen acinclude.m4 | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- configure.in | 16 +++++++--------- 2 files changed, 53 insertions(+), 11 deletions(-) commit 9bb5323a1abce0dcf8ed56734313a5249003d868 Author: Martin Lucina Date: Tue Dec 7 11:10:21 2010 +0100 Clarify zmq_send() operation for ZMQ_PUB sockets Signed-off-by: Martin Lucina doc/zmq_socket.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 73bbcb552d6fbd1b3744a1ee29202a19e4d2f46e Author: Martin Sustrik Date: Mon Dec 6 23:10:50 2010 +0100 MSVC build fixed Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++------------------------ 1 files changed, 8 insertions(+), 24 deletions(-) commit 8d6cafe06696e17afff03adf4b33bd504b55e277 Author: Martin Sustrik Date: Mon Dec 6 22:57:29 2010 +0100 All devices conflated into a single implementation. Signed-off-by: Martin Sustrik src/Makefile.am | 8 +--- src/device.cpp | 130 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/device.hpp | 31 +++++++++++++ src/forwarder.cpp | 60 ------------------------ src/forwarder.hpp | 31 ------------- src/queue.cpp | 130 ----------------------------------------------------- src/queue.hpp | 31 ------------- src/streamer.cpp | 60 ------------------------ src/streamer.hpp | 31 ------------- src/zmq.cpp | 24 ++++------ 10 files changed, 172 insertions(+), 364 deletions(-) commit ec61751e17fe4ceb62cc16750b12df6056c5962a Author: Martin Sustrik Date: Mon Dec 6 22:36:10 2010 +0100 options.type correctly set for PUB/SUB/XPUB/XSUB Signed-off-by: Martin Sustrik src/pub.cpp | 1 + src/sub.cpp | 1 + src/xpub.cpp | 2 +- src/xsub.cpp | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) commit 8a6ff4ccd2ecbbfb7b2fd80fe621b8a05b0f9bbd Author: Martin Sustrik Date: Mon Dec 6 09:44:23 2010 +0100 xup and xsub files added to the MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) commit 2daa0bb49d52aeb1aa60c94505bdad72348e5d8e Author: Martin Sustrik Date: Sun Dec 5 09:48:52 2010 +0100 XSUB accepts (un)subscriptions in form of messages. Signed-off-by: Martin Sustrik src/sub.cpp | 31 +++++++++++++++++++++++++++++++ src/sub.hpp | 4 ++++ src/xsub.cpp | 40 +++++++++++++++++++++++++--------------- src/xsub.hpp | 3 ++- 4 files changed, 62 insertions(+), 16 deletions(-) commit c80e7b80cc726ca7c29493c2553c8d19792bb6e5 Author: Martin Sustrik Date: Sat Dec 4 23:14:38 2010 +0100 XPUB and XSUB socket types added. These are just placeholders. At the moment XPUB behaves th same as PUB and XSUB as SUB. Signed-off-by: Martin Sustrik include/zmq.h | 4 +- src/Makefile.am | 4 + src/pub.cpp | 144 +------------------------------------------ src/pub.hpp | 34 +---------- src/socket_base.cpp | 11 +++- src/sub.cpp | 134 +--------------------------------------- src/sub.hpp | 38 +----------- src/xpub.cpp | 171 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/xpub.hpp | 73 ++++++++++++++++++++++ src/xsub.cpp | 161 ++++++++++++++++++++++++++++++++++++++++++++++++ src/xsub.hpp | 78 +++++++++++++++++++++++ 11 files changed, 506 insertions(+), 346 deletions(-) commit abc8b5e40c55deb96e7674b15629f2affa4eb92a Author: Martin Lucina Date: Wed Dec 1 11:55:56 2010 +0100 Update NEWS file for 2.1.0 release Signed-off-by: Martin Lucina NEWS | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 73 insertions(+), 0 deletions(-) commit 4a3ed39a22655406e17c49fab4912c4681f3d7bf Author: Steven McCoy Date: Wed Dec 1 11:52:05 2010 +0100 Bump OpenPGM to 5.0.92. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 444731 -> 0 bytes foreign/openpgm/libpgm-5.0.92~dfsg.tar.gz | Bin 0 -> 444700 bytes 3 files changed, 1 insertions(+), 1 deletions(-) commit 520d621016691bcb2a0551147aaa38a9891080b3 Author: Martin Lucina Date: Wed Dec 1 11:11:25 2010 +0100 Bump ABI version to 1:0:0 for ZeroMQ 2.1.0 release Signed-off-by: Martin Lucina configure.in | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit b70d628fad5ab97d24473b83fd18997b4e87477d Author: Martin Lucina Date: Wed Dec 1 10:57:37 2010 +0100 Documentation updates for 2.1 - Clarify ZMQ_LINGER, zmq_close (), zmq_term () relationship - New socket options - Clarify thread safety of sockets and migration between threads - Other minor and spelling fixes Signed-off-by: Martin Lucina doc/zmq.txt | 12 ++++- doc/zmq_close.txt | 12 +++-- doc/zmq_errno.txt | 2 +- doc/zmq_getsockopt.txt | 116 ++++++++++++++++++++++++++++++++---------------- doc/zmq_pgm.txt | 6 +- doc/zmq_poll.txt | 11 +++-- doc/zmq_setsockopt.txt | 67 ++++++++++++++++++---------- doc/zmq_socket.txt | 24 +++++++--- doc/zmq_tcp.txt | 6 +- doc/zmq_term.txt | 27 +++++++---- doc/zmq_version.txt | 2 +- 11 files changed, 186 insertions(+), 99 deletions(-) commit 5bb0a339be31064900257e04e2ffd32e80911d63 Author: Mikko Koppanen Date: Wed Dec 1 10:33:07 2010 +0100 Prefix variables with "ac_zmq_" - Added a macro for checking clang compiler - Moved basic compiler checks to a macro - Added a macro for checking if compiler supports a flag - Added --enable-debug flag - Added a macro for running normal autoconf check with compiler flags - Added a macro for checking for verbose flag for different compilers (-Wall) - Added a macro for turning on strict standards compliance - Added a macro for turning warnings to errors - Added a macro for checking if compiler supports given pragma - Most of the flags now go through checks if the compilers supports them rather than enumerating different compilers - Added DSO symbol visibility for sun compiler - Enabled verbose mode for sun compiler - Fixed build for ICC 12.x by adding -wd279 to size_t checks - Removed pkg-config checks as those don't seem to be used anywhere Signed-off-by: Mikko Koppanen acinclude.m4 | 461 ++++++++++++++++++++++++++++++++++++++++++++++----- autogen.sh | 6 - configure.in | 212 +++++++++++------------- include/zmq.h | 14 +- include/zmq_utils.h | 14 +- 5 files changed, 532 insertions(+), 175 deletions(-) commit 17d7e6ede0f907461130302cf4bddcdf9e2737cf Merge: 28db150 289b1f5 Author: Martin Sustrik Date: Wed Dec 1 10:27:24 2010 +0100 Merge branch 'maint' * maint: Remove unnecessary cast in kevent_delete Conflicts: src/kqueue.cpp Signed-off-by: Martin Sustrik commit 289b1f5ced492a2dc62edaba0016abde21093692 Author: Martin Lucina Date: Wed Dec 1 10:25:31 2010 +0100 Remove unnecessary cast in kevent_delete Fixes the build on NetBSD where the compiler complains about casting NULL to (int). Signed-off-by: Martin Lucina src/kqueue.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 28db150aaf7b1cffb996f1b27bc082f75acec261 Author: Steven McCoy Date: Mon Nov 29 10:52:22 2010 +0100 Fix thread thunker scope for MSVC. Signed-off-by: Steven McCoy src/thread.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 325dd2f0914de502ae7687f94927fa98c20380c9 Author: Martin Sustrik Date: Sat Nov 27 22:19:43 2010 +0100 Functions passed to pthread_create are declared as extern "C" So far these were declared as C++ static functions which was incorrect and caused warnings with SunStudio. Signed-off-by: Martin Sustrik src/thread.cpp | 54 ++++++++++++++++++++++----------------- src/thread.hpp | 10 +++--- tests/test_shutdown_stress.cpp | 19 ++++++++------ 3 files changed, 46 insertions(+), 37 deletions(-) commit 0bc2a05d84dc8e496a60d0c8def7689783e08e01 Author: Martin Sustrik Date: Sat Nov 27 12:51:43 2010 +0100 .gitignore modified to ignore test executables Signed-off-by: Martin Sustrik .gitignore | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit c9584096e033850c77c4c3d4ee99e8073f7b26da Author: Martin Lucina Date: Thu Nov 25 17:12:31 2010 +0100 Control symbol exports using -fvisibility On systems using GCC 4.0 or newer which support symbol visibility in shared libraries, use -fvisibility=hidden and only export explict API functions defined in zmq.cpp. We do not enable -fvisibility on MinGW since this uses a separate mechanism (__declspec). Signed-off-by: Martin Lucina configure.in | 12 ++++++++++++ include/zmq.h | 8 ++++++++ include/zmq_utils.h | 6 ++++++ src/Makefile.am | 3 +-- src/zmq.cpp | 8 ++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) commit 734624be760b3c7942eb26bea77fca918cb1540d Author: Martin Sustrik Date: Thu Nov 25 14:05:43 2010 +0100 Typo fixed in a comment. Signed-off-by: Martin Sustrik src/i_engine.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 92618fd99ac19f3169552c25cbabffbe9e983f7f Author: Sebastian Otaegui Date: Thu Nov 25 14:04:53 2010 +0100 Small fix for the rhel6 spec Signed-off-by: Sebastian Otaegui builds/redhat/zeromq.spec | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit a689047de091b2ffbc58cde4a89e98119ae0f599 Merge: ac40680 83d9af9 Author: Martin Sustrik Date: Mon Nov 22 16:07:15 2010 +0100 Merge branch 'maint' * maint: Mikko Koppanen becomes a maintainer of the build system. commit 83d9af99516fc620ffdfa6cd5a226ab70673cb5d Author: Martin Sustrik Date: Mon Nov 22 16:06:20 2010 +0100 Mikko Koppanen becomes a maintainer of the build system. Signed-off-by: Martin Sustrik MAINTAINERS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ac40680ea2f6b32a3c451db1b606524e86a347dd Author: Martin Sustrik Date: Fri Nov 19 12:35:06 2010 +0100 Problem with blob_t initialisation fixed. HP's version of STL doesn't allow for initialisation of basic_string (blob_t) using NULL pointer, while SGI's implementation is OK with that. Fixed. Signed-off-by: Martin Sustrik src/object.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit edf7c18d79b195001d7ed7d05ac30a4d7a64bce1 Author: Mikko Koppanen Date: Fri Nov 19 09:10:26 2010 +0100 Add a check that the compiler actually works. The patch tests that the C and C++ compilers actually exist and work. autoconf seems to default to 'g++' when C++ compiler is not found, which causes the following error (when the compiler isn't there): checking for uuid_generate in -luuid... no configure: error: cannot link with -luuid, install uuid-dev. The config.log contains the real error message "g++ command not found" but the error message shown to the user is misleading. Signed-off-by: Mikko Koppanen acinclude.m4 | 18 ++++++++++++++++++ configure.in | 6 +++++- 2 files changed, 23 insertions(+), 1 deletions(-) commit 945c931daf0c053a9cdbfdbb3ec7d0e90c29fc10 Author: Mikko Koppanen Date: Thu Nov 18 11:51:27 2010 +0100 Run autoupdate on the configure.in I ran autoupdate on the configure.in, which generated most of the patch attached. There is also a small manual fix in which removes the warning "Remember to add LT_INIT to configure.in" which I assume is because AC_PROG_LIBTOOL was called inside a macro. Signed-off-by: Mikko Koppanen acinclude.m4 | 3 --- configure.in | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) commit 72a7b93f124cdaee8082aff218f6497c366f53f9 Author: Mikko Koppanen Date: Wed Nov 17 15:10:43 2010 +0100 Allow building without documentation. Allows building without documentation even if asciidoc and xmlto are installed. This eases up working with the build system because doc generation take quite a while on repeated builds. Signed-off-by: Mikko Koppanen acinclude.m4 | 41 +++++++++++++++++++++++++---------------- 1 files changed, 25 insertions(+), 16 deletions(-) commit c86375831d4002ac58501bacebb3fd12d5c651b8 Author: Mikko Koppanen Date: Wed Nov 17 15:09:06 2010 +0100 Remove unneeded substitutions Couldn't find a place where these substs were actually used Signed-off-by: Mikko Koppanen configure.in | 15 --------------- 1 files changed, 0 insertions(+), 15 deletions(-) commit b83d0a1bc077fdcc481fee40dcf4780669c3f3d2 Author: Mikko Koppanen Date: Wed Nov 17 15:07:59 2010 +0100 Remove unnecessary conditional This conditional is unnecessary as BUILD_PGM can be negated in the test. Signed-off-by: Mikko Koppanen configure.in | 1 - src/Makefile.am | 2 +- 2 files changed, 1 insertions(+), 2 deletions(-) commit 925595259b51dd84711b620afdf02245e537a38f Author: Mikko Koppanen Date: Wed Nov 17 15:06:51 2010 +0100 MinGW32 build fixes After long discussions in IRC we came to conclusion that there is no elegant way to handle static builds with MinGW32. This patch sets AC_DISABLE_STATIC by default on MinGW32 and Cygwin Signed-off-by: Mikko Koppanen acinclude.m4 | 27 +++++++++++++++++++++++++++ configure.in | 19 ++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) commit 3dbd5d58723bdc31eb00a6ebf4f643059a432f8c Author: Mikko Koppanen Date: Wed Nov 17 15:05:01 2010 +0100 Fix mingw32 build MinGW32 defines __int64_t as long long, which causes the build to fail unless -Wno-long-long is used. In addition the shutdown_stress test isn't currently compatible with Win. Signed-off-by: Mikko Koppanen configure.in | 3 ++- tests/Makefile.am | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 34f50a6840fdf638bbd7887aa2438006baeb884d Merge: bd0ecf4 152c64f Author: Martin Sustrik Date: Tue Nov 16 14:26:04 2010 +0100 Merge branch 'maint' * maint: FD_SETSIZE defaults to 1024 in MSVC build Conflicts: builds/msvc/libzmq/libzmq.vcproj Signed-off-by: Martin Sustrik commit bd0ecf478466b27103af92db33ffebc3948f2e4e Author: Martin Sustrik Date: Tue Nov 16 14:15:29 2010 +0100 FD_SETSIZE defaults to 1024 in MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-) commit 152c64f25df9d037e7f51874d2d66724337aad38 Author: Martin Sustrik Date: Tue Nov 16 14:04:55 2010 +0100 FD_SETSIZE defaults to 1024 in MSVC build Signed-off-by: Martin Sustrik builds/msvc/libzmq/libzmq.vcproj | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) commit da3327cf8780ea4d454e0aa8904b5aab3c446b23 Author: Mikko Koppanen Date: Mon Nov 15 17:02:36 2010 +0100 Build refactoring Signed-off-by: Mikko Koppanen acinclude.m4 | 53 ++++++++++++++++++++++++++++++ configure.in | 97 +++++++++++++++++++++++++++++------------------------- src/Makefile.am | 3 +- 3 files changed, 106 insertions(+), 47 deletions(-) commit f77c8ca47ff77af44eab7b4b8538ed49ec428eda Merge: a2500ae ffcb0ba Author: Martin Sustrik Date: Sat Nov 13 18:16:13 2010 +0100 Merge branch 'maint' * maint: Couple of patches for AIX build commit ffcb0baa735538b8b4a0f00799d1185adba2761f Author: Martin Sustrik Date: Sat Nov 13 18:08:18 2010 +0100 Couple of patches for AIX build - RAND_bytes function resides in crypto library - pollfd on AIX used 'reqevents' instead of events and 'retnevents' instead of 'revents' Signed-off-by: Martin Sustrik AUTHORS | 1 + configure.in | 1 + src/zmq.cpp | 23 ++++++++++++++--------- 3 files changed, 16 insertions(+), 9 deletions(-) commit a2500ae3485d6243778b832d22dc6dc02a00f025 Author: Chia-liang Kao Date: Fri Nov 12 19:16:00 2010 +0100 Fix a bug that zmq_poll's select backend spins when timeout=-1, due to ptimeout not properly recalculated after first pass. Signed-off-by: Chia-liang Kao AUTHORS | 1 + src/zmq.cpp | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 16 deletions(-) commit 8abe67357ab905c5c86191c1d9005666f66b6ca0 Merge: c021702 f7123de Author: Martin Sustrik Date: Fri Nov 12 14:47:26 2010 +0100 Merge branch 'maint' * maint: Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal Conflicts: src/socket_base.cpp commit f7123de9434a96794e6a7cd83b398ceb18c9de8b Author: Marc Rossi Date: Fri Nov 12 14:38:25 2010 +0100 Fix socket_t::recv() hang scenario where initial call to process_commands() eats signal Added block boolean var to second process_commands() invocation for blocking sockets instead of always using true. This prevents the process_commands() call from hanging when a message is received with an empty queue after the call to xrecv() but prior to the initial call to process_commands() invoked when ++ticks == inbound_poll_rate. Signed-off-by: Marc Rossi AUTHORS | 1 + src/socket_base.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) commit c0217027ccd2267b05e017af436a842755d044b0 Author: Martin Sustrik Date: Sat Nov 6 08:02:14 2010 +0100 Coding style cleanup in mailbox.cpp Signed-off-by: Martin Sustrik src/mailbox.cpp | 39 +++++++++++++++++++++------------------ 1 files changed, 21 insertions(+), 18 deletions(-) commit 9da84a5239e5356e34d872c2b5af1d19b9c7eb4f Author: Martin Sustrik Date: Fri Nov 5 17:39:51 2010 +0100 signaler renamed to mailbox For historical reasons queue to transfer commands between threads was called 'signaler'. Given that it was used to pass commands rather than signals it was renamed to 'mailbox', see Erlang mailboxes. Signed-off-by: Martin Sustrik MAINTAINERS | 2 +- builds/msvc/libzmq/libzmq.vcproj | 4 +- src/Makefile.am | 4 +- src/ctx.cpp | 14 +- src/ctx.hpp | 6 +- src/io_thread.cpp | 12 +- src/io_thread.hpp | 15 +- src/mailbox.cpp | 378 ++++++++++++++++++++++++++++++++++++++ src/mailbox.hpp | 61 ++++++ src/own.cpp | 2 +- src/signaler.cpp | 366 ------------------------------------ src/signaler.hpp | 61 ------ src/socket_base.cpp | 12 +- src/socket_base.hpp | 10 +- 14 files changed, 479 insertions(+), 468 deletions(-) commit 9cfdb441f45057c7106a101835d65164fce9470a Author: Martin Sustrik Date: Fri Nov 5 16:38:52 2010 +0100 slots renamed to tids Threads were so far identified by integers called 'slots'. This patch renames them to more comprehensible 'tid's (thread IDs). Signed-off-by: Martin Sustrik src/ctx.cpp | 12 ++++++------ src/ctx.hpp | 6 +++--- src/io_thread.cpp | 4 ++-- src/io_thread.hpp | 2 +- src/object.cpp | 14 +++++++------- src/object.hpp | 8 ++++---- src/own.cpp | 4 ++-- src/own.hpp | 2 +- src/pair.cpp | 4 ++-- src/pair.hpp | 2 +- src/pub.cpp | 4 ++-- src/pub.hpp | 2 +- src/pull.cpp | 4 ++-- src/pull.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/rep.cpp | 4 ++-- src/rep.hpp | 2 +- src/req.cpp | 4 ++-- src/req.hpp | 2 +- src/socket_base.cpp | 24 ++++++++++++------------ src/socket_base.hpp | 4 ++-- src/sub.cpp | 4 ++-- src/sub.hpp | 2 +- src/xrep.cpp | 4 ++-- src/xrep.hpp | 2 +- src/xreq.cpp | 4 ++-- src/xreq.hpp | 2 +- 28 files changed, 67 insertions(+), 67 deletions(-) commit 623a9c9f1b53bdda9ad61f58cdc7a286e3e474cd Author: Martin Sustrik Date: Thu Nov 4 21:23:07 2010 +0100 Jacob Rideout added to the AUTGORS file. Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 0ada4f8e30088e6a91fef7a45fd7e5dd7bdb9d1d Author: Jacob Rideout Date: Thu Nov 4 21:21:01 2010 +0100 Fix documentation typos Signed-off-by: Jacob Rideout doc/zmq_getsockopt.txt | 6 +++--- doc/zmq_setsockopt.txt | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) commit 1b39bcd88336ebed002e13a8ac3d4bc104b13718 Author: Martin Lucina Date: Thu Nov 4 17:54:47 2010 +0100 Automatically resize signalling socket buffer if full If the socketpair used by signaler_t fills up, this can lead to deadlock. This patch provides partial resolution by attempting to resize SO_SNDBUF on the writer side, and if that fails we shall at least assert rather than hang. I've also refactored the signaler_t code to make the platform-dependent parts clearer and have tested both the MSG_DONTWAIT and standard POSIX path in recv. The Win32 implementation currently does not implement resizing as I'm not convinced that it's safe, but it will also assert like other platforms if signaler_t::send() cannot succeed. The OpenVMS implementation has been carried forward but is untested. Signed-off-by: Martin Lucina src/config.hpp | 4 - src/signaler.cpp | 403 ++++++++++++++++++++++++++---------------------------- src/signaler.hpp | 18 +-- 3 files changed, 201 insertions(+), 224 deletions(-) commit 756f7df8c8e82a67f033049af47a3f783ad951e1 Author: Martin Sustrik Date: Thu Nov 4 16:11:04 2010 +0100 Previous FD_STSIZE patch reverted. Signed-off-by: Martin Sustrik src/select.cpp | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 2246689c8fcf37cd69bd8098b21dc28a9abbcdeb Author: Martin Sustrik Date: Thu Nov 4 13:12:40 2010 +0100 FD_SETSIZE for internal polling defaults to 1024 If, when compiling 0MQ you don't set FD_SETSIZE, it defaults to 1024 rather than to 64. Signed-off-by: Martin Sustrik src/select.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit b90e621329688c83f21f26bbe0367966a245e607 Author: Martin Sustrik Date: Thu Nov 4 10:01:58 2010 +0100 minor typo fixed Devpoll polling mechanism used ZMQ_HAVE_SOLRIS instead of ZMQ_HAVE_SOLARIS in one case. Fixed. Signed-off-by: Martin Sustrik src/devpoll.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d4a41067d3e873ba4a87c4711ad2f755e7de9157 Author: Martin Sustrik Date: Tue Nov 2 14:27:24 2010 +0100 HP-UX has no OPEN_MAX defined devpoll_t used this constant to determine how many events to retrieve from the poller in one go. The implementation was changed not to depend on this constant. Signed-off-by: Martin Sustrik src/devpoll.cpp | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) commit de93f6359f061d08846cd203ad3ba4fda915e504 Author: Martin Sustrik Date: Tue Nov 2 13:30:20 2010 +0100 crypto library is needed on HP-UX to generate UUIDs Signed-off-by: Martin Sustrik configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit dbcd38252435ff69f1043649a94ec985e7f1ff5b Merge: 0ad71f8 eb83678 Author: Martin Sustrik Date: Mon Nov 1 14:13:36 2010 +0100 Merge branch 'maint' * maint: Add INSTALL to Git, thus making it a normal file commit eb83678b2b5eaca07d6813cab5c7dea493ac4bc8 Author: Martin Lucina Date: Mon Nov 1 14:12:33 2010 +0100 Add INSTALL to Git, thus making it a normal file INSTALL gets added in somewhat magically by automake, or not. Adding it into Git ensures it's always included in the distribution. Signed-off-by: Martin Lucina .gitignore | 1 - INSTALL | 237 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 237 insertions(+), 1 deletions(-) commit 0ad71f88fe5531011c0354f22eeb070b1f729c7d Author: Mikael Helbo Kjaer Date: Mon Nov 1 12:54:58 2010 +0100 select now uses Erase-Remove idiom for retired fds Signed-off-by: Mikael Helbo Kjaer src/select.cpp | 17 ++++++++--------- src/select.hpp | 3 +++ 2 files changed, 11 insertions(+), 9 deletions(-) commit 085b709021c44673d9bf65a5d639e3c2e99703af Author: Martin Sustrik Date: Sat Oct 30 18:17:53 2010 +0200 Documentation for zmq_close and zmq_term fixed. Signed-off-by: Martin Sustrik doc/zmq_close.txt | 12 ++++++------ doc/zmq_term.txt | 21 +++++++++------------ 2 files changed, 15 insertions(+), 18 deletions(-) commit 3d8eb071a2a664d8de1e2e2fa7cb46a4f2764e5e Author: Martin Sustrik Date: Sat Oct 30 16:17:08 2010 +0200 Coding style fixed for pgm_socket Signed-off-by: Martin Sustrik src/pgm_socket.cpp | 211 ++++++++++++++++++++++++++++++++-------------------- src/pgm_socket.hpp | 5 +- 2 files changed, 132 insertions(+), 84 deletions(-) commit b358df9fffd6a4155318356024358b8a1e2b9c9c Author: Martin Sustrik Date: Sat Oct 30 15:08:28 2010 +0200 Name of "GNU Lesser Public License" corrected. Signed-off-by: Martin Sustrik builds/msvc/platform.hpp | 6 ++-- devices/zmq_forwarder/zmq_forwarder.cpp | 6 ++-- devices/zmq_queue/zmq_queue.cpp | 6 ++-- devices/zmq_streamer/zmq_streamer.cpp | 6 ++-- include/zmq.h | 6 ++-- include/zmq.hpp | 6 ++-- include/zmq_utils.h | 6 ++-- perf/local_lat.cpp | 6 ++-- perf/local_thr.cpp | 6 ++-- perf/remote_lat.cpp | 6 ++-- perf/remote_thr.cpp | 6 ++-- src/array.hpp | 6 ++-- src/atomic_counter.hpp | 6 ++-- src/atomic_ptr.hpp | 6 ++-- src/blob.hpp | 6 ++-- src/clock.cpp | 6 ++-- src/clock.hpp | 6 ++-- src/command.cpp | 6 ++-- src/command.hpp | 6 ++-- src/config.hpp | 6 ++-- src/connect_session.cpp | 6 ++-- src/connect_session.hpp | 6 ++-- src/ctx.cpp | 6 ++-- src/ctx.hpp | 6 ++-- src/decoder.cpp | 6 ++-- src/decoder.hpp | 6 ++-- src/devpoll.cpp | 6 ++-- src/devpoll.hpp | 6 ++-- src/encoder.cpp | 6 ++-- src/encoder.hpp | 6 ++-- src/epoll.cpp | 6 ++-- src/epoll.hpp | 6 ++-- src/err.cpp | 6 ++-- src/err.hpp | 6 ++-- src/fd.hpp | 6 ++-- src/forwarder.cpp | 6 ++-- src/forwarder.hpp | 6 ++-- src/fq.cpp | 6 ++-- src/fq.hpp | 6 ++-- src/i_engine.hpp | 6 ++-- src/i_inout.hpp | 6 ++-- src/i_poll_events.hpp | 32 +++++++++++++++--------------- src/io_object.cpp | 6 ++-- src/io_object.hpp | 6 ++-- src/io_thread.cpp | 6 ++-- src/io_thread.hpp | 6 ++-- src/ip.cpp | 6 ++-- src/ip.hpp | 6 ++-- src/kqueue.cpp | 6 ++-- src/kqueue.hpp | 6 ++-- src/lb.cpp | 6 ++-- src/lb.hpp | 6 ++-- src/likely.hpp | 6 ++-- src/msg_content.hpp | 6 ++-- src/mutex.hpp | 6 ++-- src/named_session.cpp | 6 ++-- src/named_session.hpp | 6 ++-- src/object.cpp | 6 ++-- src/object.hpp | 6 ++-- src/options.cpp | 6 ++-- src/options.hpp | 6 ++-- src/own.cpp | 6 ++-- src/own.hpp | 6 ++-- src/pair.cpp | 6 ++-- src/pair.hpp | 6 ++-- src/pgm_receiver.cpp | 6 ++-- src/pgm_receiver.hpp | 6 ++-- src/pgm_sender.cpp | 6 ++-- src/pgm_sender.hpp | 6 ++-- src/pgm_socket.cpp | 6 ++-- src/pgm_socket.hpp | 6 ++-- src/pipe.cpp | 6 ++-- src/pipe.hpp | 6 ++-- src/poll.cpp | 6 ++-- src/poll.hpp | 6 ++-- src/poller.hpp | 6 ++-- src/poller_base.cpp | 6 ++-- src/poller_base.hpp | 6 ++-- src/pub.cpp | 6 ++-- src/pub.hpp | 6 ++-- src/pull.cpp | 6 ++-- src/pull.hpp | 6 ++-- src/push.cpp | 6 ++-- src/push.hpp | 6 ++-- src/queue.cpp | 6 ++-- src/queue.hpp | 6 ++-- src/rep.cpp | 6 ++-- src/rep.hpp | 6 ++-- src/req.cpp | 6 ++-- src/req.hpp | 6 ++-- src/select.cpp | 6 ++-- src/select.hpp | 6 ++-- src/semaphore.hpp | 6 ++-- src/session.cpp | 6 ++-- src/session.hpp | 6 ++-- src/signaler.cpp | 6 ++-- src/signaler.hpp | 6 ++-- src/socket_base.cpp | 6 ++-- src/socket_base.hpp | 6 ++-- src/stdint.hpp | 6 ++-- src/streamer.cpp | 6 ++-- src/streamer.hpp | 6 ++-- src/sub.cpp | 6 ++-- src/sub.hpp | 6 ++-- src/swap.cpp | 6 ++-- src/swap.hpp | 6 ++-- src/tcp_connecter.cpp | 6 ++-- src/tcp_connecter.hpp | 6 ++-- src/tcp_listener.cpp | 6 ++-- src/tcp_listener.hpp | 6 ++-- src/tcp_socket.cpp | 6 ++-- src/tcp_socket.hpp | 6 ++-- src/thread.cpp | 6 ++-- src/thread.hpp | 6 ++-- src/transient_session.cpp | 6 ++-- src/transient_session.hpp | 6 ++-- src/trie.cpp | 6 ++-- src/trie.hpp | 6 ++-- src/uuid.cpp | 13 ++--------- src/uuid.hpp | 6 ++-- src/windows.hpp | 6 ++-- src/wire.hpp | 6 ++-- src/xrep.cpp | 6 ++-- src/xrep.hpp | 6 ++-- src/xreq.cpp | 6 ++-- src/xreq.hpp | 6 ++-- src/ypipe.hpp | 6 ++-- src/yqueue.hpp | 6 ++-- src/zmq.cpp | 6 ++-- src/zmq_connecter.cpp | 6 ++-- src/zmq_connecter.hpp | 6 ++-- src/zmq_engine.cpp | 6 ++-- src/zmq_engine.hpp | 6 ++-- src/zmq_init.cpp | 6 ++-- src/zmq_init.hpp | 6 ++-- src/zmq_listener.cpp | 6 ++-- src/zmq_listener.hpp | 6 ++-- tests/test_pair_inproc.cpp | 6 ++-- tests/test_pair_ipc.cpp | 6 ++-- tests/test_pair_tcp.cpp | 6 ++-- tests/test_reqrep_inproc.cpp | 6 ++-- tests/test_reqrep_ipc.cpp | 6 ++-- tests/test_reqrep_tcp.cpp | 6 ++-- tests/test_shutdown_stress.cpp | 6 ++-- tests/testutil.hpp | 6 ++-- 145 files changed, 448 insertions(+), 455 deletions(-) commit 3d01b929fe5e57311ea62fff4a37abbeaab1b3eb Author: Martin Sustrik Date: Fri Oct 29 08:19:07 2010 +0200 Peter Bourgon added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9384faf7e5f2fb58d976df8b29f979402346207a Author: Peter Bourgon Date: Fri Oct 29 08:16:59 2010 +0200 Add function to zmq::error_t to access errnum Signed-off-by: Peter Bourgon include/zmq.hpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit dace2473f1cfea902dfd3be4a233f4092397d65a Author: Martin Sustrik Date: Thu Oct 28 08:44:53 2010 +0200 Burak Arslan added to the AUTHORS file Signed-off-by: Martin Sustrik AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 3eb935ef6e211d2fa5094ae032777ed319253d11 Author: Burak Arslan Date: Thu Oct 28 08:41:28 2010 +0200 switch to c++-specific headers Signed-off-by: Burak Arslan include/zmq.hpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9a1d4df0fd29e040756bff6302cf9a134074d9b9 Author: Dhammika Pathirana Date: Wed Oct 27 09:37:32 2010 +0200 fix typo, destroy new engine Signed-off-by: Dhammika Pathirana src/session.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 465da7b17eef4c86020a5def41a87977410b965a Author: Dhammika Pathirana Date: Tue Oct 26 16:02:47 2010 +0200 drop connection requests with duplicate peer identity Signed-off-by: Dhammika Pathirana src/session.cpp | 9 +++++++-- src/zmq_init.hpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 401986e6bb565f94d975acaba9504eb6ee3c8598 Author: Martin Sustrik Date: Tue Oct 26 15:35:56 2010 +0200 Build with MSVC2005 fixed To use __rdtsc() function MSVC2005 requires including intrin.h Signed-off-by: Martin Sustrik AUTHORS | 1 + src/clock.cpp | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-) commit e1debf15bbdb0747cffb6013d59fb3f73462a600 Author: Steven McCoy Date: Tue Oct 26 14:24:07 2010 +0200 Update to OpenPGM 5.0.91. Signed-off-by: Steven McCoy configure.in | 2 +- foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 511599 -> 0 bytes foreign/openpgm/libpgm-5.0.91~dfsg.tar.gz | Bin 0 -> 444731 bytes 3 files changed, 1 insertions(+), 1 deletions(-) commit 11af0fcc54d06052bbbf20c64a3ce31000d02f7d Merge: 71bef33 8ef53c0 Author: Martin Sustrik Date: Sat Oct 23 22:12:47 2010 +0200 Merge branch 'maint' * maint: Fixes build on Linux using Sun Studio compiler commit 8ef53c0dc6d625bdeb95b7f9626cf58cf6babfed Author: Mikko Koppanen Date: Fri Oct 15 10:43:22 2010 +0200 Fixes build on Linux using Sun Studio compiler Signed-off-by: Mikko Koppanen configure.in | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 71bef330fc9f09ee070c90d174fc0bcb7783b38d Author: Dhammika Pathirana Date: Sat Oct 23 20:59:54 2010 +0200 handle decoding malformed messages Signed-off-by: Dhammika Pathirana src/decoder.cpp | 26 ++++++++++++++++++-------- src/decoder.hpp | 23 +++++++++++++++++++---- src/zmq_engine.cpp | 26 ++++++++++++++++---------- 3 files changed, 53 insertions(+), 22 deletions(-) commit 8d6979922efff7183ce03b49715472e5b2a6a1df Author: Steven McCoy Date: Sat Oct 23 14:35:02 2010 +0200 Changes for MSVC OpenPGM build. Signed-off-by: Steven McCoy src/pgm_socket.cpp | 1 - src/pgm_socket.hpp | 1 + src/zmq.cpp | 1 + 3 files changed, 2 insertions(+), 1 deletions(-) commit da59f8dd7a7f275eff98e5705767ac89ac503912 Merge: e73c96b 21b0c0b Author: Martin Sustrik Date: Sat Oct 23 13:51:12 2010 +0200 Merge branch 'maint' * maint: SunStudio fixed. commit 21b0c0b4f7896facbfcaf10c8eb777e72a505a45 Author: Martin Sustrik Date: Sat Oct 23 13:49:13 2010 +0200 SunStudio fixed. With SunStudio's implementation of STL basic_string constructor doesn't accept NULL as a parameter even though size of string is set to zero. Fixed. Signed-off-by: Martin Sustrik src/object.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e73c96ba30c5e9ada83592bc2289a56eeadf6155 Author: Martin Sustrik Date: Mon Oct 18 09:11:36 2010 +0200 Minor comment improvement. Signed-off-by: Martin Sustrik src/session.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 0c86f90280d69bd360f7566f9549c904c26d5e42 Author: Martin Sustrik Date: Sun Oct 17 10:26:06 2010 +0200 Minor typo fixed in zmq_getsockopt(3) man page. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a780833683ed1f5bc4a112644836973f8282434b Author: Martin Sustrik Date: Sun Oct 17 10:23:58 2010 +0200 ZMQ_BACKLOG socket option added. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 13 +++++++++++++ doc/zmq_setsockopt.txt | 13 +++++++++++++ include/zmq.h | 1 + src/config.hpp | 4 ---- src/options.cpp | 19 +++++++++++++++++++ src/options.hpp | 3 +++ src/tcp_listener.cpp | 12 +++++++----- src/tcp_listener.hpp | 3 ++- src/zmq_listener.cpp | 2 +- 9 files changed, 59 insertions(+), 11 deletions(-) commit e8e2944f45eab3e22dc46ceac3225a886ca468ad Author: Martin Sustrik Date: Sun Oct 17 09:54:12 2010 +0200 ZMQ_RECONNECT_IVL socket options added. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 15 ++++++++++- doc/zmq_setsockopt.txt | 13 ++++++++++ include/zmq.h | 1 + src/config.hpp | 3 -- src/options.cpp | 59 +++++++++++++++++++++++++++++++++-------------- src/options.hpp | 3 ++ src/zmq_connecter.cpp | 15 ++++++----- src/zmq_connecter.hpp | 2 +- 8 files changed, 80 insertions(+), 31 deletions(-) commit 8b8837688a97c4d05aff01a6dea7ac5a35b21fa2 Author: Martin Sustrik Date: Sat Oct 16 17:56:25 2010 +0200 Couple of bugs in zmq_poll fixed. Signed-off-by: Martin Sustrik src/zmq.cpp | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) commit 72b15a6dae6c199d847ebde5ac73de238f0ebf75 Author: Martin Sustrik Date: Sat Oct 16 16:05:34 2010 +0200 Implementation of zmq_strerror moved from zmq.cpp to err.cpp Signed-off-by: Martin Sustrik src/err.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/err.hpp | 9 ++++++--- src/zmq.cpp | 38 +------------------------------------- 3 files changed, 48 insertions(+), 40 deletions(-) commit 61d38fbeed89d69516b9976c60b7711fefed6411 Author: Martin Sustrik Date: Sat Oct 16 14:48:06 2010 +0200 Bug in low precision clock fixed. Signed-off-by: Martin Sustrik src/clock.cpp | 4 ++-- src/clock.hpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) commit 0a03e86e9547fa7c221b316a5a943467adea3dfd Author: Martin Sustrik Date: Sat Oct 16 10:53:29 2010 +0200 ZMQ_LINGER socket option added. 1. ZMQ_LINGER option can be set/get 2. options are part of own_t base class rather than being declared separately by individual objects 3. Linger option is propagated with "term" command so that the newest value of it is used rather than the stored old one. 4. Session sets the linger timer if needed and terminates as soon as it expires. 5. Corresponding documentation updated. Signed-off-by: Martin Sustrik doc/zmq_getsockopt.txt | 16 ++++++++++++++++ doc/zmq_setsockopt.txt | 16 ++++++++++++++++ include/zmq.h | 1 + src/command.hpp | 1 + src/object.cpp | 7 ++++--- src/object.hpp | 4 ++-- src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/own.cpp | 20 ++++++++++++-------- src/own.hpp | 8 ++++++-- src/pair.cpp | 4 ++-- src/pair.hpp | 2 +- src/pub.cpp | 4 ++-- src/pub.hpp | 2 +- src/pull.cpp | 4 ++-- src/pull.hpp | 2 +- src/push.cpp | 4 ++-- src/push.hpp | 2 +- src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++---- src/session.hpp | 17 ++++++++++++----- src/socket_base.cpp | 4 ++-- src/socket_base.hpp | 6 +----- src/sub.cpp | 4 ++-- src/sub.hpp | 2 +- src/xrep.cpp | 4 ++-- src/xrep.hpp | 2 +- src/xreq.cpp | 4 ++-- src/xreq.hpp | 2 +- src/zmq_connecter.cpp | 5 ++--- src/zmq_connecter.hpp | 4 ---- src/zmq_init.cpp | 3 +-- src/zmq_init.hpp | 4 ---- src/zmq_listener.cpp | 7 +++---- src/zmq_listener.hpp | 6 +----- 34 files changed, 158 insertions(+), 74 deletions(-) commit a1474e305762d32df2b79300d124aac7fa0181c8 Author: Toralf Wittner Date: Sat Oct 16 08:27:57 2010 +0200 Cancel tx_timer_id in pgm_sender_t::out_event(). Signed-off-by: Toralf Wittner AUTHORS | 1 + src/pgm_sender.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 733c6780c557a0eaacdf17961fb8f3841c65f862 Author: Martin Sustrik Date: Sat Oct 16 01:22:18 2010 +0200 Minor code clean-up to keep clang compiler happy. "warning: extra ';' inside a struct or union [-pedantic]" Signed-off-by: Martin Sustrik src/pipe.hpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b95f11aa0a7887f5eb8eb8e2e0f09532bc3604ba Author: Mikko Koppanen Date: Sat Oct 16 01:05:15 2010 +0200 Don't set pedantic to yes if using ICC Signed-off-by: Mikko Koppanen acinclude.m4 | 17 +++++++++++++++++ configure.in | 13 +++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) commit 48b0a901b8056957e36ba52ae4416d656971bb47 Author: Martin Sustrik Date: Sat Oct 16 00:53:50 2010 +0200 Obsolete compile-time option removed. Signed-off-by: Martin Sustrik src/config.hpp | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit ae5a3c8a99a30b54d0b079bbd98be286685056e8 Merge: 18d46c8 710615c Author: Martin Sustrik Date: Sat Oct 16 00:49:01 2010 +0200 Merge branch 'maint' * maint: Version number increased. Conflicts: include/zmq.h Signed-off-by: Martin Sustrik commit 710615cdab8c8e500c259bb27df2af70f5ae8275 Author: Martin Sustrik Date: Sat Oct 16 00:47:31 2010 +0200 Version number increased. Signed-off-by: Martin Sustrik include/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 18d46c81047fc2f8449a5b4ff3e41cc25bd1cfc2 Merge: 027eed4 53d1677 Author: Martin Sustrik Date: Fri Oct 15 19:38:52 2010 +0200 Merge branch 'maint' commit 53d1677c8b0f85e309c6a067b47c80dedcffb5aa Author: Martin Sustrik Date: Fri Oct 15 19:37:41 2010 +0200 Update NEWS for 2.0.10 release Signed-off-by: Martin Sustrik NEWS | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) commit 027eed41b8bf16cb8b2f9f83be1fe286b39e4fd8 Merge: 2e9871c 6e95205 Author: Martin Sustrik Date: Fri Oct 15 17:46:21 2010 +0200 Merge branch 'maint' * maint: Fix memory leak under Windows commit 6e9520533395b19ed6f6a17de6f196aa5e93da9f Author: Taras Shpot Date: Fri Oct 15 17:45:02 2010 +0200 Fix memory leak under Windows The comment about memory ownership in uuid_t::to_string was misleading as on most platforms the buffer is a field of the object; The string allocated in UuidToString() wasn't properly freed with RpcStringFree() Signed-off-by: Taras Shpot AUTHORS | 1 + src/uuid.cpp | 2 ++ src/uuid.hpp | 2 +- 3 files changed, 4 insertions(+), 1 deletions(-) commit 2e9871ce34b5abc60ebc37c1887b76895537d62a Merge: eeb8e7c 5b44025 Author: Martin Lucina Date: Fri Oct 15 17:30:03 2010 +0200 Merge branch 'maint' Conflicts: configure.in Signed-off-by: Martin Lucina commit 5b44025602b6af952fc434a6e7bf8dff65a00be6 Author: Martin Lucina Date: Fri Oct 15 17:27:10 2010 +0200 maint: Upgrade OpenPGM to 2.1.28~dfsg Upgrade OpenPGM to version 2.1.28 for ZeroMQ 2.0.x. Now we also use the DFSG-compliant upstream release tarball. Signed-off-by: Martin Lucina configure.in | 2 +- foreign/openpgm/libpgm-2-1-28~dfsg.tar.gz | Bin 0 -> 340501 bytes foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes 3 files changed, 1 insertions(+), 1 deletions(-) commit eeb8e7c8beef83fe8c23bde888a1081fc9e8e3ec Merge: 7b9e397 3cf01bf Author: Martin Sustrik Date: Fri Oct 15 17:13:36 2010 +0200 Merge branch 'maint' * maint: Makefile.am: Add missing files to distribution, improve maintainer-clean configure.in: Extract API version from zmq.h Added bin directory to ignore list. Conflicts: configure.in include/zmq.h commit 3cf01bf56e66657da795e43f09fa2499b2381dc9 Author: Martin Lucina Date: Fri Oct 15 15:30:10 2010 +0200 Makefile.am: Add missing files to distribution, improve maintainer-clean Add missing files needed for regenerating configure to the distribution; add MAINTAINERS; improve maintainer-clean to produce a really clean tree. Signed-off-by: Martin Lucina Makefile.am | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) commit 3b3df731e60d604794538d0b9f6cb5b802a8745d Author: Martin Lucina Date: Fri Oct 15 15:05:54 2010 +0200 configure.in: Extract API version from zmq.h * Added a version.sh and relevant changes to configure.in to extract the API version from zmq.h at the time autogen.sh is run. * Moved the version macros to be next to zmq_version in zmq.h and improved the comments. * Modified ZMQ_MAKE_VERSION to use (x) instead of plain x when expanding macro parameters. Signed-off-by: Martin Lucina Makefile.am | 1 + configure.in | 8 +++++--- include/zmq.h | 21 +++++++++++---------- version.sh | 21 +++++++++++++++++++++ 4 files changed, 38 insertions(+), 13 deletions(-) commit 7b9e39724eeecf33dde3b0e4fd9f205480afb977 Author: Martin Sustrik Date: Fri Oct 15 11:31:20 2010 +0200 Minor fix in devpoll.hpp Signed-off-by: Martin Sustrik src/devpoll.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 17b0785744287d0897175ed13000fba710c2dc5b Author: Martin Sustrik Date: Fri Oct 15 11:29:20 2010 +0200 Destructor of poller_base_t made virtual. Signed-off-by: Martin Sustrik src/poller_base.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3e74a439c4b7901f3d3607a2d4142266bc1781b4 Author: Mikko Koppanen Date: Fri Oct 15 11:21:56 2010 +0200 Cast execute_timers() result to int Signed-off-by: Mikko Koppanen src/devpoll.cpp | 2 +- src/epoll.cpp | 2 +- src/kqueue.cpp | 2 +- src/poll.cpp | 2 +- src/select.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit b64b50ae218dbbc362eaeb0571a337650f623e3c Author: Martin Sustrik Date: Fri Oct 15 10:58:19 2010 +0200 Timers correctly canceled by PGM engines on shutdown. Signed-off-by: Martin Sustrik src/pgm_receiver.cpp | 10 +++++++--- src/pgm_sender.cpp | 17 ++++++++++++++--- src/pgm_sender.hpp | 3 ++- 3 files changed, 23 insertions(+), 7 deletions(-) commit e288f7a347eb5a2fd38043d930fc67c8e8bcce9b Author: Mikko Koppanen Date: Fri Oct 15 10:43:22 2010 +0200 Fixes build on Linux using Sun Studio compiler Signed-off-by: Mikko Koppanen configure.in | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit e33e4d7650e36af7d09569de21f7f71b5670945c Author: Mikko Koppanen Date: Fri Oct 15 10:38:09 2010 +0200 ICC related qualifier fix Signed-off-by: Mikko Koppanen AUTHORS | 1 + src/pipe.hpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 03a18c27ace49cbcbb0c495e4c575c34b8f862a4 Author: Martin Pales Date: Thu Oct 14 16:31:58 2010 +0200 zmq::clock_t : return correct value in rdtsc() on solaris Function clock_t::rdtsc() now returns correct value when compiled with sunstudio 12 compiler. Signed-off-by: Martin Pales src/clock.cpp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 26d7669464054a4aed3f0ee9643bffa0e01aab5c Author: Gonzalo Diethelm Date: Thu Oct 14 08:02:43 2010 -0300 Added bin directory to ignore list. .gitignore | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b7386f5b5031b2e75fb4370069935d7f6a0eedbb Author: Martin Sustrik Date: Thu Oct 14 12:13:52 2010 +0200 To insert to associateive STL containers value_type used instead of make_pair Signed-off-by: Martin Sustrik src/ctx.cpp | 4 ++-- src/pgm_receiver.cpp | 2 +- src/socket_base.cpp | 2 +- src/xrep.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) commit f9e6d94be56fab6d1d8e281e48bb5d6091562acb Author: Martin Pales Date: Thu Oct 14 12:02:05 2010 +0200 zmq::poller_base_t : workaround for sunstudio compiler in add_timer() A minor workaround to resolve compilation error with sunstudio compiler, which does not yet support member templates for std::multimap. Signed-off-by: Martin Pales src/poller_base.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit cafcdbbe2bc9c78899568bb6cb957b700e12c66b Author: Martin Sustrik Date: Thu Oct 14 09:34:09 2010 +0200 Safety measure in zmq_msg_close implemented zmq_msg_close now empties the message on zmq_msg_close, thus not leaving random data in the structure, that may be mistaken for a valid message. Signed-off-by: Martin Sustrik src/zmq.cpp | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) commit b174ad2c45c746e56b41671a3d68ef496bba6b97 Author: Martin Sustrik Date: Thu Oct 14 09:16:49 2010 +0200 zmq_poll man page fixed to reflect the precise timeout semantics. Signed-off-by: Martin Sustrik doc/zmq_poll.txt | 8 +------- 1 files changed, 1 insertions(+), 7 deletions(-) commit da73b7c6f60f2ea1adc6fbd99e22576b9ce2f316 Author: Martin Pales Date: Thu Oct 14 08:38:11 2010 +0200 zmq::devpoll_t : correct a typo in loop() A minor typo correction to resolve compilation error on Solaris. Signed-off-by: Martin Pales AUTHORS | 1 + src/devpoll.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit e2167cecaefec6557c7a5712fb75e51487ff69a6 Author: Martin Sustrik Date: Wed Oct 13 21:39:20 2010 +0200 Precise timouts in zmq_poll implemented Signed-off-by: Martin Sustrik src/zmq.cpp | 127 +++++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 90 insertions(+), 37 deletions(-) commit 9d96e0037a9d027fd286f771fa2a8db5def485c8 Author: Martin Sustrik Date: Wed Oct 13 10:09:46 2010 +0200 Clean-up of the code related to attaching/detaching engines to sessions. Session base class now handles the engine events exclusively. It notifies derived session types using dedicated "attached" and "detached" events. Couple of bugs was fixed along the way. Signed-off-by: Martin Sustrik src/connect_session.cpp | 9 ++++----- src/connect_session.hpp | 3 ++- src/named_session.cpp | 15 +++++---------- src/named_session.hpp | 5 +---- src/session.cpp | 18 ++++++++---------- src/session.hpp | 12 ++++++------ src/transient_session.cpp | 4 ++++ src/transient_session.hpp | 3 ++- 8 files changed, 32 insertions(+), 37 deletions(-) commit 5ae878b891fa5189f5202f1577d22bdb9ba51f77 Merge: 954d7f7 2568947 Author: Martin Sustrik Date: Wed Oct 13 08:01:13 2010 +0200 Merge branch 'maint' * maint: Add support for RHEL6 in the spec file commit 2568947a71adc0e8ddad54b6054a3b3e532e1613 Author: Sebastian Otaegui Date: Wed Oct 13 07:59:50 2010 +0200 Add support for RHEL6 in the spec file Signed-off-by: Sebastian Otaegui AUTHORS | 1 + builds/redhat/zeromq.spec | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 954d7f743dbc0c159794915c6deadc374dbf64d2 Author: Martin Sustrik Date: Tue Oct 12 17:55:09 2010 +0200 Avoid duplicate creation of pipes for a single session When a session is being closed down its inbound and outbound pipe pointers are set to null. If (re) connection happens at that time, session may try to reinistantiate the pipes which is wrong. This patch allows session to attach pipes only once in its lifetime. Signed-off-by: Martin Sustrik src/session.cpp | 40 ++++++++++++++++++++++++---------------- src/session.hpp | 3 +++ 2 files changed, 27 insertions(+), 16 deletions(-) commit c6d74e0a0345cae2c09c6fb29911159331c93e64 Author: Steven McCoy Date: Tue Oct 12 12:26:21 2010 +0200 Drop PGM parameters to 100mb friendly range. Signed-off-by: Steven McCoy src/pgm_socket.cpp | 30 +++++++++++++----------------- 1 files changed, 13 insertions(+), 17 deletions(-) commit 5b8af52efc0ddf1df5506a2800aa69bc50a44ddb Author: Steven McCoy Date: Mon Oct 11 17:59:58 2010 +0200 Fix assertion in PGM transports on cancel_timer Signed-off-by: Steven McCoy src/pgm_receiver.cpp | 2 ++ src/pgm_sender.cpp | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) commit e168173162dd26238a799c19142bab8b7885ebb3 Merge: f22e85f 57428db Author: Martin Sustrik Date: Mon Oct 11 16:42:10 2010 +0200 Merge branch 'maint' * maint: configure.in: Do not patch libtool rpath handling Fixing the Red Hat packaging commit 57428db89885631128cb9a48b334b050eb83a512 Author: Martin Lucina Date: Mon Oct 11 16:39:48 2010 +0200 configure.in: Do not patch libtool rpath handling For historic reasons (mainly compatbility with really old libtool), configure was patching libtool to not use rpath in binaries. This breaks (among other things) correct operation of "make check" since the test binaries may not be run with the correct shared library version. Current best practice as seen e.g. at http://wiki.debian.org/RpathIssue suggests that this is no longer an issue, so I'm removing the code that patches libtool. Signed-off-by: Martin Lucina configure.in | 11 ----------- 1 files changed, 0 insertions(+), 11 deletions(-) commit 6cd0867f0208b4fca4cfca2a2ff7bc0de5199d4a Author: Martin Sustrik Date: Mon Oct 11 16:32:27 2010 +0200 Fixing the Red Hat packaging When adding ZMQ_VERSION macros, I incorrectly removed the PACKAGE_VERSION macro. Adding it back. Signed-off-by: Martin Sustrik configure.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit f22e85f19f2bf58285e4984e875487f17c85e791 Author: Martin Sustrik Date: Mon Oct 11 12:23:18 2010 +0200 Reverting commit 1d431190f50c86f62460 The patch was supposed to check that pipe writer sends messages in atomic fashion. However, it prevented the user to read half of a message and close the socket. Signed-off-by: Martin Sustrik src/xrep.cpp | 7 ------- 1 files changed, 0 insertions(+), 7 deletions(-) commit 73e7ef37c2e72dd542d20ddc5be30cedce68e329 Author: Martin Sustrik Date: Sun Oct 10 09:23:37 2010 +0200 When XREP silently drops message, it does not empty it -- fixed Signed-off-by: Martin Sustrik src/xrep.cpp | 33 +++++++++++++++++---------------- 1 files changed, 17 insertions(+), 16 deletions(-) commit f5030a93a52fc73292c16dae5f8e0e1b39732df0 Author: Christian Gudrian Date: Sat Oct 9 19:19:50 2010 +0200 Execute the timers before pollset initialisation. Since executing the timers might modify the source pollsets we have to defer the initialisation until after the timers have executed. Signed-off-by: Christian Gudrian AUTHORS | 1 + src/select.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit 318cdd1f24cd663702222cc182ae2ccac5e76870 Merge: 214b560 ef8db78 Author: Martin Sustrik Date: Sat Oct 9 08:03:58 2010 +0200 Merge branch 'maint' * maint: Version macros added Conflicts: builds/msvc/platform.hpp Signed-off-by: Martin Sustrik commit ef8db789a1c97152e84ff03c9a7f6e1e77d95981 Author: Martin Sustrik Date: Sat Oct 9 07:53:24 2010 +0200 Version macros added Macro ZMQ_VERSION represents the current version of 0MQ Macro ZMQ_MAKE_VERSION(major,minor,patch) allows to create a representation of the specified version. The versions can be compared using simple <, >, ==, etc. operators. Signed-off-by: Martin Sustrik builds/msvc/platform.hpp | 6 +----- configure.in | 13 ------------- include/zmq.h | 10 ++++++++++ src/zmq.cpp | 6 +++--- 4 files changed, 14 insertions(+), 21 deletions(-) commit 214b56077a7e5d12813c8034013171d33283566c Author: Martin Lucina Date: Fri Oct 8 22:06:41 2010 +0200 Fix missing platform.hpp in zmq_connecter.cpp Missed testing on Win32 Signed-off-by: Martin Lucina src/zmq_connecter.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit daf5d3273b1930af7e4c54ee597b89ecb3763000 Author: Martin Sustrik Date: Fri Oct 8 21:42:55 2010 +0200 More cleanup of session termination process. Fix in termination of session attached to a REP socket. Several fixes of session termination in case of disconnection. Signed-off-by: Martin Sustrik src/connect_session.cpp | 2 ++ src/named_session.cpp | 1 + src/session.cpp | 10 ++++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) commit f90c8d957ea2a11c73a307aae2494a26d22c2f3b Author: Martin Lucina Date: Fri Oct 8 17:49:40 2010 +0200 Scalability improvements for large amounts of connections Add signaler_sndbuf_size option to config.hpp which allows the user to increase the size of the send buffer used by the signalling socketpair. Implement random backoff for reconnection attempts using a primitive pseudo-random generation to prevent reconnection storms. Add wait_before_connect option to config.hpp to allow the user to enable random delay even on initial connect. Default is false for low latency. Signed-off-by: Martin Lucina src/config.hpp | 9 ++++++++- src/signaler.cpp | 39 ++++++++++++++++++++++++++++++++------- src/zmq_connecter.cpp | 25 +++++++++++++++++++++---- src/zmq_connecter.hpp | 3 +++ 4 files changed, 64 insertions(+), 12 deletions(-) commit 7a685b0f88386b11c4c1fcbb45324aa28f4e2eac Author: Martin Sustrik Date: Fri Oct 8 17:23:21 2010 +0200 Clean-up of session termination process Specifically, shutdown of child objects is initiated *before* termination handshake with socket object. Signed-off-by: Martin Sustrik src/fq.cpp | 4 ++ src/fq.hpp | 1 + src/pair.cpp | 12 ++++-- src/pair.hpp | 1 + src/pipe.cpp | 7 +++ src/pipe.hpp | 1 + src/session.cpp | 111 ++++++++++++++++++++++++++++--------------------------- src/session.hpp | 25 +++++++----- src/xrep.cpp | 4 ++ src/xrep.hpp | 1 + 10 files changed, 99 insertions(+), 68 deletions(-) commit 965fb7755b50ca1522f076da46fa3651812126e1 Author: Martin Lucina Date: Mon Oct 4 16:22:30 2010 +0200 configure.in: OpenPGM no longer requires pkg-config configure.in | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-) commit d62d721f1a6f7c9df627b3f3fa8e200ddc9bf5f5 Author: Steven McCoy Date: Mon Oct 4 16:14:57 2010 +0200 configure.in: Add amd64 to OpenPGM supported platforms configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1d431190f50c86f624605ab11c1580b2d2f7ee06 Author: Nir Soffer Date: Sat Oct 2 10:01:18 2010 +0200 make sure that reader does not terminate in the middle of a multipart message AUTHORS | 1 + src/xrep.cpp | 7 +++++++ 2 files changed, 8 insertions(+), 0 deletions(-) commit 2142b8918a0cea79c79c8ed8ce5652148abe4a39 Author: Martin Sustrik Date: Fri Oct 1 18:46:32 2010 +0200 issue 92 -- Assertion failed: inpipe && outpipe (pair.cpp:86) -- fixed src/pair.cpp | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) commit 1a6cd59e8b423cdf3a4f4f854b37c5e0693baef6 Author: Martin Sustrik Date: Fri Oct 1 16:03:08 2010 +0200 stress test for shutdown process added tests/Makefile.am | 7 ++- tests/test_shutdown_stress.cpp | 83 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+), 2 deletions(-) commit 2a85cce189ae915e85bb567b1401d063284e622f Merge: 0bb76b6 8f9080e Author: Martin Sustrik Date: Fri Oct 1 13:37:59 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 0bb76b667b277b143a9a2901e8bf407f34da469d Author: Martin Sustrik Date: Fri Oct 1 13:37:46 2010 +0200 assert when xrep socket gets reconnected in the middle of the shutdown -- fixed src/xrep.cpp | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) commit 8f9080ebb9ea5576c87a1412748aef1faf0653f6 Author: Martin Lucina Date: Thu Sep 30 15:30:24 2010 +0200 zmq_poll(): Fix busy-loop if timeout is zero Fix a case where zmq_poll() (poll-based version) could go off into a busy-loop if no revents are returned and the timeout passed in is zero. src/zmq.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit ac9b05c36b9d1f5bb3f8465b4c56478c399a01f3 Merge: 98fa2fa 79aea5f Author: Martin Sustrik Date: Thu Sep 30 15:12:06 2010 +0200 Merge branch 'maint' * maint: zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed commit 79aea5ffa61f969ec66205f7c9c8c1611a2fd8da Author: Max Wolf Date: Thu Sep 30 15:10:47 2010 +0200 zmq_msg_move called on uninitialised message in xrep_t::xrecv -- fixed AUTHORS | 1 + src/xrep.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit 98fa2fa802773252a2c569ffea99bce1c5f9cd4c Author: Martin Sustrik Date: Thu Sep 30 14:03:54 2010 +0200 fix in XREP's fair queueing mechanism src/xrep.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 7881ba1bcd2c940037e54a74d6aeb8376329cde4 Author: Martin Sustrik Date: Thu Sep 30 11:35:14 2010 +0200 minor whitespace fix src/pgm_socket.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit eaa925eca7a3e0c64d184a4a96fec139166a7470 Author: Steven McCoy Date: Thu Sep 30 11:33:35 2010 +0200 FreeBSD doesn't define MSG_ERRQUEUE -- now it's defined in 0MQ src/pgm_socket.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit ec2e85919e4a34a313e6d0df84cc421bc9682ad8 Author: Ilja Golshtein Date: Wed Sep 29 10:09:03 2010 +0200 C++ binding destructors don't throw exceptions AUTHORS | 1 + include/zmq.hpp | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) commit d14be62499478f31cf641399982ecdf4f6f158c4 Author: Steven McCoy Date: Tue Sep 28 22:46:56 2010 +0200 more fixes to (e)pgm transport src/pgm_receiver.cpp | 21 ++++++++++++- src/pgm_receiver.hpp | 7 ++++ src/pgm_sender.cpp | 37 +++++++++++++++++++++- src/pgm_sender.hpp | 7 ++++ src/pgm_socket.cpp | 81 +++++++++++++++++++++++++++++++++++++------------- src/pgm_socket.hpp | 5 +++ 6 files changed, 134 insertions(+), 24 deletions(-) commit 96d85b20982926e60d5065cba3203971c9eeed63 Author: Steven McCoy Date: Tue Sep 28 16:58:51 2010 +0200 * Add assertions to check for OpenPGM calls with invalid parameters. * Assertion to check that pgm_getaddrinfo is actually returning something. * Missing pgm_connect call. * Typo on TOS causing immediate abort. * Placeholder calls for timeouts whilst continuing spin loop functionality. * OpenPGM v5 now supports reference counting so remove init checks. * Duplicate UDP unicast port setting, requires one unicast and one multicast. * Incorrectly set socket rcvbuf size with sndbuf. * Replace std::lexicographical_compare of TSI's with long word integer comparisons. * pgm_socket_t::receive returns -1 on no data. src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 12 ++--- src/pgm_socket.cpp | 109 ++++++++++++++++++++++++++++++++----------------- src/zmq.cpp | 24 +++++------ 4 files changed, 87 insertions(+), 60 deletions(-) commit 00cd7d49c7f2b532b2349581b82577bc714f9bf8 Author: Steven McCoy Date: Tue Sep 28 16:35:29 2010 +0200 Upgrade to OpenPGM-5.0.78 configure.in | 16 +- foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 413863 -> 0 bytes foreign/openpgm/libpgm-5.0.78.tar.gz | Bin 0 -> 511599 bytes src/Makefile.am | 96 +++--- src/pgm_socket.cpp | 564 ++++++++++++++++++---------------- src/pgm_socket.hpp | 2 +- src/zmq.cpp | 26 +- 7 files changed, 364 insertions(+), 340 deletions(-) commit 10bb9d0405169487cd53c6f109091e036577860e Author: Martin Sustrik Date: Tue Sep 28 15:32:12 2010 +0200 Dhammika Pathirana was missing from the AUTOHRS file for some reason -- fixed AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 87beaaa00d49d216f856b8322f1ad04e4f9ecea3 Author: Gonzalo Diethelm Date: Tue Sep 28 15:27:45 2010 +0200 ZMQ_TYPE socket option added .gitignore | 1 + doc/zmq_getsockopt.txt | 13 +++++++++++++ include/zmq.h | 1 + src/options.cpp | 10 ++++++++++ src/options.hpp | 3 +++ src/pair.cpp | 1 + src/pub.cpp | 1 + src/pull.cpp | 1 + src/push.cpp | 1 + src/rep.cpp | 1 + src/req.cpp | 1 + src/sub.cpp | 1 + src/xrep.cpp | 1 + src/xreq.cpp | 1 + 14 files changed, 37 insertions(+), 0 deletions(-) commit 6715f9b1858587db6aec826bdc9a7905bba8030e Merge: 16c3884 c1deb22 Author: Martin Sustrik Date: Tue Sep 28 07:51:59 2010 +0200 Merge branch 'maint' * maint: crash when closing an ypipe -- fixed commit c1deb226f4d1bc94c158c050088813aae96775e9 Author: Dhammika Pathirana Date: Tue Sep 28 07:46:17 2010 +0200 crash when closing an ypipe -- fixed src/ypipe.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f61921d09679c4bed15204ec4e55d1c7313e3f6a Author: Martin Sustrik Date: Tue Sep 28 07:39:16 2010 +0200 REQ socket can die when reply is delivered on wrong unerlying connection -- fixed src/req.cpp | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit 16c3884a61b146040277ec61bfdbc553c883b4d6 Author: Martin Sustrik Date: Mon Sep 27 11:18:21 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 42 +++++++++++++++++++++++++++++++++---- src/clock.cpp | 2 +- src/ctx.cpp | 6 +++++ src/select.cpp | 3 +- 4 files changed, 46 insertions(+), 7 deletions(-) commit e2f834d2947ad7e7f4e6bfb5be653af8b8a2a576 Author: Martin Sustrik Date: Mon Sep 27 09:53:30 2010 +0200 ZMQ_FD and ZMQ_EVENTS documentation added doc/zmq_getsockopt.txt | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) commit 30c1cba4e4276f4ddcb5a455fdd62d4d6bd1edd2 Author: Martin Sustrik Date: Mon Sep 27 09:34:00 2010 +0200 latency optimisation for the case where there are no timers src/poller_base.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 238640a526c419392bf2df95de196db89ea6eb73 Author: Martin Sustrik Date: Sun Sep 26 21:42:23 2010 +0200 timers properly implemented src/config.hpp | 4 --- src/devpoll.cpp | 35 ++++---------------------------- src/devpoll.hpp | 6 ----- src/epoll.cpp | 43 ++++++--------------------------------- src/epoll.hpp | 6 ----- src/kqueue.cpp | 40 +++++-------------------------------- src/kqueue.hpp | 6 ----- src/poll.cpp | 33 ++++++------------------------ src/poll.hpp | 6 ----- src/poller_base.cpp | 52 ++++++++++++++++++++++++++++++++++++++++++++++++- src/poller_base.hpp | 27 +++++++++++++++++++++++++ src/select.cpp | 37 ++++++---------------------------- src/select.hpp | 6 ----- src/zmq_connecter.cpp | 3 +- src/zmq_connecter.hpp | 2 +- 15 files changed, 113 insertions(+), 193 deletions(-) commit 8d7bf6684cbb9625ec7c963b8867e2411b49eb57 Author: Martin Sustrik Date: Sun Sep 26 19:22:33 2010 +0200 common base for all pollers created; the only thing it handles at the moment is 'load' src/Makefile.am | 2 + src/devpoll.cpp | 13 +---------- src/devpoll.hpp | 9 +------ src/epoll.cpp | 12 +--------- src/epoll.hpp | 9 +------ src/kqueue.cpp | 15 ++++--------- src/kqueue.hpp | 9 +------ src/poll.cpp | 12 +--------- src/poll.hpp | 9 +------ src/poller_base.cpp | 44 ++++++++++++++++++++++++++++++++++++++++ src/poller_base.hpp | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/select.cpp | 12 +--------- src/select.hpp | 9 +------ 13 files changed, 125 insertions(+), 86 deletions(-) commit cf815e8c785254d97190f223765fbbd19a1e6d52 Author: Martin Sustrik Date: Sun Sep 26 18:30:03 2010 +0200 new interfaces for timers; the implementation is not changed yet src/config.hpp | 4 ++++ src/devpoll.cpp | 6 +++--- src/devpoll.hpp | 7 +++---- src/epoll.cpp | 6 +++--- src/epoll.hpp | 4 ++-- src/i_poll_events.hpp | 2 +- src/io_object.cpp | 10 +++++----- src/io_object.hpp | 6 +++--- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/kqueue.cpp | 6 +++--- src/kqueue.hpp | 4 ++-- src/poll.cpp | 6 +++--- src/poll.hpp | 4 ++-- src/select.cpp | 6 +++--- src/select.hpp | 4 ++-- src/zmq_connecter.cpp | 8 ++++---- src/zmq_connecter.hpp | 3 +++ 18 files changed, 48 insertions(+), 42 deletions(-) commit be79a9fbc26a55c90b693485f69dfd17f710cb13 Author: Martin Sustrik Date: Sun Sep 26 18:01:59 2010 +0200 minor beautifications src/config.hpp | 4 +++- src/connect_session.hpp | 3 +++ src/named_session.hpp | 3 +++ src/transient_session.hpp | 3 +++ 4 files changed, 12 insertions(+), 1 deletions(-) commit 5dae27d0ed92aba070f824a4bf5dfa7845aa165d Author: Martin Sustrik Date: Sun Sep 26 16:55:54 2010 +0200 clock_t class added src/Makefile.am | 2 + src/clock.cpp | 100 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/clock.hpp | 56 ++++++++++++++++++++++++++++ src/config.hpp | 7 ++++ src/socket_base.cpp | 38 +++++-------------- src/socket_base.hpp | 2 +- src/zmq.cpp | 43 +++------------------- 7 files changed, 181 insertions(+), 67 deletions(-) commit 7d5061798c93655796b1cf64afd7f5b8146a7681 Merge: e478468 9129b79 Author: Martin Sustrik Date: Sun Sep 26 13:36:05 2010 +0200 Merge branch 'maint' * maint: if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed Conflicts: src/app_thread.cpp commit 9129b792486b87d4f54607321427c2df783c9ec1 Author: Martin Sustrik Date: Sun Sep 26 13:30:33 2010 +0200 if TSC jumps backwards (in case of migration to a different CPU core) latency peak may occur -- fixed src/app_thread.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit e478468e52fcb085f9d429cee5dd6938c80343bc Author: Martin Sustrik Date: Tue Sep 21 09:10:17 2010 +0200 minor error in comment fixed src/socket_base.hpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 9c118866003277222173ea04916c3e3b82c88b95 Author: Martin Sustrik Date: Tue Sep 21 09:00:46 2010 +0200 The flag in the socket has clear semantics now -- it tracks whether corresponding context was closed, it doesn't track whether zmq_close was called on the socket itself src/socket_base.cpp | 41 +++++++++++++---------------------------- src/socket_base.hpp | 6 ++---- 2 files changed, 15 insertions(+), 32 deletions(-) commit 4d51a52874b814f65a31a0c1b8e0a36cb671697c Author: Martin Sustrik Date: Mon Sep 20 17:25:04 2010 +0200 zmq_poll (select version) now correctly assumes that ZMQ_FD is edge-trigerred src/zmq.cpp | 27 ++++++++++----------------- 1 files changed, 10 insertions(+), 17 deletions(-) commit f49b77eedcdacf9663050a20723ac964af7cdac0 Author: Martin Lucina Date: Mon Sep 20 16:55:46 2010 +0200 zmq_poll honours ZMQ_FORCE_POLL and ZMQ_FORCE_SELECT options src/zmq.cpp | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) commit 1abfc92d265bce4f60d63cd302319c451d2c451a Author: Martin Lucina Date: Mon Sep 20 16:45:25 2010 +0200 minor problem in zmq_poll (select version) fixed src/zmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 328c92a0a70b98b4a3bf09132bd8f8041e4c8628 Author: Martin Sustrik Date: Mon Sep 20 00:06:05 2010 +0200 problem with engine being attached to session while it's being terminated fixed src/encoder.hpp | 2 +- src/session.cpp | 40 ++++++++++++++++++++++++++++++++++++++-- src/session.hpp | 2 ++ src/zmq_engine.hpp | 5 +---- 4 files changed, 42 insertions(+), 7 deletions(-) commit 1d2399720b3fd06da5e7f9f4a211f30c57a9ce2d Author: Martin Sustrik Date: Sun Sep 19 22:45:48 2010 +0200 zmq_init_t destroyed zmq_engine_t before plugging it out from the poller first -- fixed src/zmq_engine.cpp | 10 +++++++++- src/zmq_engine.hpp | 7 ++++++- src/zmq_init.cpp | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) commit cda3c96a7fed0ee603c13e787ac511a1ea171367 Author: Martin Sustrik Date: Sun Sep 19 22:17:37 2010 +0200 minor code reorganisation in ctx_t::terminate src/ctx.cpp | 31 +++++++++++++++---------------- 1 files changed, 15 insertions(+), 16 deletions(-) commit 938689a49128ca17d2bc9662f311c6dbb70240db Author: Martin Sustrik Date: Sun Sep 19 21:40:26 2010 +0200 synchronisation problem fixed in ctx_t src/ctx.cpp | 2 ++ src/zmq_init.cpp | 5 ++++- 2 files changed, 6 insertions(+), 1 deletions(-) commit 471013a59fc7f41b694c0bc0b11a459d4c19700d Author: Martin Sustrik Date: Sun Sep 19 20:43:14 2010 +0200 two races fixed in session creation src/zmq_init.cpp | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) commit 1f10208ad065c01e172669affdd48b6f2698ff4c Author: Martin Sustrik Date: Sun Sep 19 08:42:19 2010 +0200 termination of pipe via delimiter message could stuck when no data were read from the pipe (because connection wasn't active) -- fixed src/session.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 5153b6368be58d0fcaea262463a3fc08ea658f78 Author: Martin Sustrik Date: Sun Sep 19 08:39:53 2010 +0200 obsolete 'active' flag removed from session_t src/session.cpp | 11 +++-------- src/session.hpp | 3 --- 2 files changed, 3 insertions(+), 11 deletions(-) commit 4c6d07d3668558d910c9b1d19d52ccdeacc90574 Author: Martin Sustrik Date: Sat Sep 18 07:37:36 2010 +0200 single term ack counting mechanism for every socket (no separate mechanisms for fq_t and lb_t) src/Makefile.am | 1 - src/fq.cpp | 18 ++++++++---------- src/fq.hpp | 4 ++-- src/i_terminate_events.hpp | 38 -------------------------------------- src/lb.cpp | 18 ++++++++---------- src/lb.hpp | 4 ++-- src/own.hpp | 16 ++++++++-------- src/pull.cpp | 7 ------- src/pull.hpp | 6 +----- src/push.cpp | 7 ------- src/push.hpp | 6 +----- src/sub.cpp | 7 ------- src/sub.hpp | 6 +----- src/xreq.cpp | 7 ------- src/xreq.hpp | 6 +----- 15 files changed, 32 insertions(+), 119 deletions(-) commit fb6ce536d96c82e8f4378a87a5d59aefcc57a96d Author: Martin Sustrik Date: Sat Sep 18 06:48:45 2010 +0200 more details on launch_sibling in comments src/own.cpp | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) commit 0c215fada4f448788069e42bda34609f74c8b64b Author: Martin Sustrik Date: Sat Sep 18 06:42:46 2010 +0200 potential duplicate termination of pipes removed src/fq.cpp | 1 + src/lb.cpp | 1 + src/socket_base.cpp | 10 ---------- 3 files changed, 2 insertions(+), 10 deletions(-) commit c7b9ba3ccdd5a18afb22dda1afee16c938076c25 Author: Martin Sustrik Date: Fri Sep 17 12:58:20 2010 +0200 reconnection process fixed when failure occurs during init phase src/command.hpp | 3 ++- src/session.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletions(-) commit 85aa25e56cbf6f4194162235fc06bed8683b1bad Author: Martin Sustrik Date: Fri Sep 17 12:32:46 2010 +0200 bug in REQ+multipart fixed src/req.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ff1080728f3a587ee472a64533fd7e44b365e6f0 Merge: be159b6 e2802d9 Author: Martin Sustrik Date: Wed Sep 15 16:58:00 2010 +0200 Merge branch 'maint' * maint: values of RATE, RECOVERY_IVL and SWAP options are checked for negative values commit e2802d9a4b7e518c549e8dd95a34d2424058f086 Author: Martin Sustrik Date: Wed Sep 15 16:44:57 2010 +0200 values of RATE, RECOVERY_IVL and SWAP options are checked for negative values src/options.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit be159b63169474b644ebd38177bf4e808ebb5487 Author: Martin Lucina Date: Mon Sep 13 13:27:48 2010 +0200 zmq::writer_t: Add missing test for swap src/pipe.cpp | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) commit 92f9136ca6c69d2d1588ff5ff65e668e40e0f7eb Author: Martin Sustrik Date: Fri Sep 10 13:11:08 2010 +0200 lefover assert removed src/lb.cpp | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit a68e6739f4248e25a0f9a64c89729f55dfacb842 Author: Martin Sustrik Date: Thu Sep 9 08:25:00 2010 +0200 when no I/O threads are available error is raised instead of assertion doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ include/zmq.h | 2 +- src/connect_session.cpp | 15 ++++++++++----- src/ctx.cpp | 7 +++++-- src/ctx.hpp | 5 +++-- src/object.cpp | 4 ++-- src/object.hpp | 2 +- src/socket_base.cpp | 21 ++++++++++++++++++--- src/zmq.cpp | 2 ++ src/zmq_connecter.cpp | 9 +++++++-- src/zmq_listener.cpp | 9 +++++++-- 12 files changed, 60 insertions(+), 20 deletions(-) commit 47e87b7e4b8dd6a0cfbc1f30ffcb06edfa83c853 Author: Martin Sustrik Date: Wed Sep 8 15:45:59 2010 +0200 EMTHREAD error code returned to zmq.h to ensure backward compatibility include/zmq.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 91ea20464439b5359a5d803181141fc756fa817c Author: Martin Sustrik Date: Wed Sep 8 08:39:27 2010 +0200 EINTR returned from the blocking functions doc/zmq_getsockopt.txt | 2 + doc/zmq_poll.txt | 2 + doc/zmq_recv.txt | 3 ++ doc/zmq_send.txt | 3 ++ doc/zmq_setsockopt.txt | 2 + src/ctx.cpp | 5 --- src/ctx.hpp | 3 -- src/io_thread.cpp | 8 ++++- src/signaler.cpp | 47 +++++++++++++++---------------- src/signaler.hpp | 2 +- src/socket_base.cpp | 71 ++++++++++++++++++++++++++--------------------- src/socket_base.hpp | 3 +- src/zmq.cpp | 26 +++++++---------- 13 files changed, 93 insertions(+), 84 deletions(-) commit f374431ebe0f3e18a2b2adeafa8093ff59a9eac2 Author: Martin Sustrik Date: Tue Sep 7 17:06:33 2010 +0200 get rid of 'has virtual functions but non-virtual destructor' warnings in pipe.hpp src/pipe.hpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 6d4ffd90dbda943e5d1215fb56d06eeac1b4420f Author: Martin Sustrik Date: Tue Sep 7 15:49:54 2010 +0200 Bug in fq_t and lb_t (when used via ZMQ_EVENTS option) fixed src/fq.cpp | 7 +++++-- src/lb.cpp | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) commit b4740c14e7fc68040037d65bdfac4233b08c5a08 Merge: d4c8de5 01c463c Author: Martin Sustrik Date: Sat Sep 4 19:10:17 2010 +0200 Merge branch 'maint' * maint: Version number incremented to 2.0.10 NEWS updated for 2.0.9 Conflicts: builds/msvc/platform.hpp configure.in commit 01c463cc89626bf9d69500ab1f4957705663788e Author: Martin Sustrik Date: Sat Sep 4 19:08:55 2010 +0200 Version number incremented to 2.0.10 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ebf3089735329f0d083a992c98a9fd63b128346e Author: Martin Sustrik Date: Sat Sep 4 18:38:20 2010 +0200 NEWS updated for 2.0.9 NEWS | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) commit d4c8de5050a183f4df72062ce3ff6ceca0128fdf Merge: 76f2e5d 1e84519 Author: Martin Lucina Date: Sat Sep 4 17:49:40 2010 +0200 Merge branch 'maint' * maint: Update .gitignore doc: Add 0MQ version to XHTML11 backend footer build: Generate ChangeLog in 'make dist', ZIP automatically commit 1e8451961e498abd1da61e64f5baf48890e1563e Author: Martin Lucina Date: Sat Sep 4 17:44:11 2010 +0200 Update .gitignore .gitignore | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 32fd916c731901944e01c0cb445d32ce0d162693 Author: Martin Lucina Date: Sat Sep 4 17:42:33 2010 +0200 doc: Add 0MQ version to XHTML11 backend footer Thanks to Matt Weinstein for the suggestion. doc/asciidoc.conf | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) commit a6d3629fb4f87c018c7ba2f8c4ff69f7eda07790 Author: Martin Lucina Date: Sat Sep 4 17:26:36 2010 +0200 build: Generate ChangeLog in 'make dist', ZIP automatically Change 'make dist' to generate the Git ChangeLog file, that way it doesn't have to be manually updated nor kept in Git which causes unnecessary work. Also change 'make dist' to invoke 'dist-zip' automatically to generate a ZIP as well as a .tar.gz. Thanks to http://live.gnome.org/Git/ChangeLog for the inspiration to automatically generate ChangeLog. ChangeLog | 2724 ---------------------------------------------------------- Makefile.am | 20 +- configure.in | 2 +- 3 files changed, 17 insertions(+), 2729 deletions(-) commit 76f2e5d5442d3200c8ca09681a887830775c84c0 Merge: ca17612 db7fe85 Author: Martin Sustrik Date: Sat Sep 4 17:19:38 2010 +0200 Merge branch 'maint' * maint: Broken device numbering reverted assert on malformed messages forwarder and streamer devices handle multi-part messages correctly improved null checking in zmq_term Conflicts: AUTHORS include/zmq.h src/zmq.cpp commit db7fe858d6356988fb9a9270c235178e523b2370 Author: Martin Sustrik Date: Sat Sep 4 17:12:08 2010 +0200 Broken device numbering reverted include/zmq.h | 64 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 32 insertions(+), 32 deletions(-) commit 10227899b1ccdaecf709fbfc7b765e147baf3080 Author: Dhammika Pathirana Date: Fri Aug 27 18:06:37 2010 +0200 assert on malformed messages src/zmq_decoder.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit c2f3b3b4458187085e148850068f9719c2567614 Author: Jon Dyte Date: Fri Aug 27 06:59:55 2010 +0200 forwarder and streamer devices handle multi-part messages correctly src/forwarder.cpp | 17 ++++++++++++++--- src/queue.cpp | 15 ++++++++------- src/streamer.cpp | 17 ++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) commit ae567be0c295d9c18da5ba4be4f8403cc844a9a3 Author: Ivo Danihelka Date: Thu Aug 26 12:14:53 2010 +0200 improved null checking in zmq_term AUTHORS | 1 + src/zmq.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit ca176121deb8dbdc62d8a37fec377c07fc786480 Merge: 2673a84 51a84c1 Author: Martin Lucina Date: Sat Sep 4 16:24:21 2010 +0200 Merge branch 'maint' * maint: zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached zmq.h: Fix typo and use of C99 comment Conflicts: src/zmq.cpp commit 51a84c15ded2d70985c9d971ebdf3f3c9c18d590 Author: Martin Lucina Date: Sat Sep 4 16:12:33 2010 +0200 zmq::select_t, zmq_poll(): assert if FD_SETSIZE reached Ensure that 0MQ does not attempt to call select() on more than FD_SETSIZE file descriptors. src/select.cpp | 4 ++++ src/zmq.cpp | 4 ++++ 2 files changed, 8 insertions(+), 0 deletions(-) commit f850190c16df0d55015dc15cd5c0c50289db5dda Author: Martin Lucina Date: Sat Sep 4 16:10:14 2010 +0200 zmq.h: Fix typo and use of C99 comment include/zmq.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 2673a84e07b93b8607958516c55341c2eb220a6e Merge: 0a1f7e3 ee3444f Author: Martin Lucina Date: Sat Sep 4 16:01:31 2010 +0200 Merge branch 'maint' * maint: doc: Update zmq_socket(3) for 2.0.8 API changes Revert "Added man page for the zmq_device method" Revert "Added clean target that deletes generated man pages" Revert "Various changes to documentation project:" Revert "Reverting 'clean' change to Makefile" Revert "Removed empty man pages for old standalone devices" Revert "Further cleanups on reference manual" Revert "Small improvements to zmq_device(3) page" Revert "Removed wip zmq_deviced from master" commit ee3444ff93888a052cd1ba48aa22892f7077a7a0 Author: Martin Lucina Date: Sat Sep 4 16:00:26 2010 +0200 doc: Update zmq_socket(3) for 2.0.8 API changes doc/zmq_socket.txt | 40 ++++++++++++++++++++++------------------ 1 files changed, 22 insertions(+), 18 deletions(-) commit 26b39bcdef390f45bb316c4488b51470c27086e2 Author: Martin Lucina Date: Sat Sep 4 15:55:41 2010 +0200 Revert "Added man page for the zmq_device method" This reverts commit f575f252c99c99d3622f313d6bbad6635197a1e4. Conflicts: doc/zmq_device.txt doc/zmq_device.txt | 99 ---------------------------------------------------- 1 files changed, 0 insertions(+), 99 deletions(-) commit 8800ac7de5d50426b0459ebea4568bb77954ea3d Author: Martin Lucina Date: Sat Sep 4 15:55:19 2010 +0200 Revert "Added clean target that deletes generated man pages" This reverts commit 6cd90304476c1c6873d67068009def63e520b848. doc/Makefile.am | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) commit 32baeb610e779862b58c56f66571b01599743a9e Author: Martin Lucina Date: Sat Sep 4 15:55:11 2010 +0200 Revert "Various changes to documentation project:" This reverts commit 77a3c36ff1f11215229a4efdb821a3cb83a9d6fc. doc/asciidoc.conf | 15 ------ doc/zmq.txt | 19 +++++++ doc/zmq_bind.txt | 9 +++- doc/zmq_close.txt | 4 ++ doc/zmq_connect.txt | 4 ++ doc/zmq_cpp.txt | 4 ++ doc/zmq_deviced.txt | 123 --------------------------------------------- doc/zmq_errno.txt | 4 ++ doc/zmq_forwarder.txt | 4 ++ doc/zmq_getsockopt.txt | 4 ++ doc/zmq_init.txt | 4 ++ doc/zmq_inproc.txt | 4 ++ doc/zmq_ipc.txt | 4 ++ doc/zmq_msg_close.txt | 4 ++ doc/zmq_msg_copy.txt | 4 ++ doc/zmq_msg_data.txt | 4 ++ doc/zmq_msg_init.txt | 4 ++ doc/zmq_msg_init_data.txt | 4 ++ doc/zmq_msg_init_size.txt | 4 ++ doc/zmq_msg_move.txt | 4 ++ doc/zmq_msg_size.txt | 4 ++ doc/zmq_pgm.txt | 5 ++- doc/zmq_poll.txt | 4 ++ doc/zmq_queue.txt | 4 ++ doc/zmq_recv.txt | 4 ++ doc/zmq_send.txt | 4 ++ doc/zmq_setsockopt.txt | 4 ++ doc/zmq_socket.txt | 31 ++++++------ doc/zmq_streamer.txt | 4 ++ doc/zmq_strerror.txt | 4 ++ doc/zmq_tcp.txt | 4 ++ doc/zmq_term.txt | 5 ++ doc/zmq_version.txt | 4 ++ 33 files changed, 155 insertions(+), 156 deletions(-) commit 4cb6dbd52f5ab65350a448ceb07ff77eacc2b84c Author: Martin Lucina Date: Sat Sep 4 15:55:03 2010 +0200 Revert "Reverting 'clean' change to Makefile" This reverts commit c51de31f2fd31f782e419bfac2fb8d40d689f3e3. doc/Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 48d3e2d6607499b8c5feb1258c9bd40519923c69 Author: Martin Lucina Date: Sat Sep 4 15:54:53 2010 +0200 Revert "Removed empty man pages for old standalone devices" This reverts commit 6ff193999d96487f7aa7e578980ab5554e61d8dc. doc/asciidoc.conf | 2 +- doc/zmq_forwarder.txt | 29 +++++++++++++++++++++++++++++ doc/zmq_queue.txt | 29 +++++++++++++++++++++++++++++ doc/zmq_streamer.txt | 29 +++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 1 deletions(-) commit 6c393f53e28f41118eed9a8d034d8d46f2555572 Author: Martin Lucina Date: Sat Sep 4 15:54:34 2010 +0200 Revert "Further cleanups on reference manual" This reverts commit 13f3481e127a6b2390e847af6b01ee88f1b4ae61. Conflicts: doc/zmq_device.txt doc/zmq_tcp.txt doc/zmq.txt | 22 +++++++++++------ doc/zmq_bind.txt | 13 +++------- doc/zmq_connect.txt | 13 +++------- doc/zmq_device.txt | 60 +++++++++++------------------------------------ doc/zmq_deviced.txt | 50 +++++++++++---------------------------- doc/zmq_getsockopt.txt | 2 +- doc/zmq_pgm.txt | 4 +- doc/zmq_poll.txt | 4 +- doc/zmq_setsockopt.txt | 2 +- doc/zmq_tcp.txt | 8 +++--- 10 files changed, 60 insertions(+), 118 deletions(-) commit 6647e61243fdfbdc600ef3bfbd15b7c2ca6e853e Author: Martin Lucina Date: Sat Sep 4 15:51:40 2010 +0200 Revert "Small improvements to zmq_device(3) page" This reverts commit 96bcc9e6cf73781c31042278eb960c0363a78805. doc/zmq_device.txt | 32 ++++++++++---------------------- 1 files changed, 10 insertions(+), 22 deletions(-) commit 83d253d72d4fe83f4a001a7cfb4059ccc52b04e0 Author: Martin Lucina Date: Sat Sep 4 15:51:09 2010 +0200 Revert "Removed wip zmq_deviced from master" This reverts commit de0173754cc82f6c08875a892892f043a804554c. doc/Makefile.am | 2 +- doc/zmq.txt | 4 +- doc/zmq_deviced.txt | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 149 insertions(+), 2 deletions(-) commit 0a1f7e3524338690551c04ebfccd896a0b96f399 Merge: a81a373 14853c2 Author: Martin Sustrik Date: Thu Sep 2 08:07:40 2010 +0200 Merge branch 'maint' * maint: Prior to this patch prefix_tree asserts. Fix for signaler_t on HP-UX and AIX platforms Mikael Kjaer added to AUTHORS Conflicts: src/trie.cpp commit 14853c2db528b3fd6eed84786053549e71f61bb7 Author: Jon Dyte Date: Thu Sep 2 07:52:02 2010 +0200 Prior to this patch prefix_tree asserts. This is because as it adds the 255th element at a node it attempts to calculate the count member var which is an unsigned char via count = (255 -0) + 1; and pass the result to realloc. Unfortunately the result is zero and realloc returns null; the prefix_tree asserts. I have fixed it by making the count an unsigned short. src/prefix_tree.cpp | 12 ++++++------ src/prefix_tree.hpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 8ec0743c7551de3c76126d080961cece732370f1 Author: Bernd Melchers Date: Thu Sep 2 07:33:57 2010 +0200 Fix for signaler_t on HP-UX and AIX platforms AUTHORS | 1 + src/signaler.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) commit d5b6f680a54c682da066e769c46075a4bc57bd55 Author: Martin Sustrik Date: Thu Sep 2 07:26:14 2010 +0200 Mikael Kjaer added to AUTHORS AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit a81a37399b2ab4143aedf3ff4c442655b9e7e9b7 Merge: 47aaf10 59315eb Author: Martin Sustrik Date: Wed Sep 1 18:42:15 2010 +0200 Merge branch 'maint' * maint: Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL commit 59315ebdcb565d23ba78ba0ca8581cef465fc9bd Author: Mikael Helbo Kjær Date: Wed Sep 1 18:39:12 2010 +0200 Erasure of retired fd's in select.cpp causes an assertion in MSVC 2008 STL I was hitting an issue with an SCL enabled STL library in connection with the way select_t::loop was erasing retired fd's. The problem as identified by the SCL assertion was that by the time the iterator given to the erase method was called it was considered invalid by the library. I am not sure this isn't just a "quirk" of the MSVC STL library as the other code looks valid to me as well. src/select.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 47aaf10211a0f3380dc82942a8cb4eba8c3c7ea3 Merge: 0fe7d3c 99ddfa7 Author: Martin Sustrik Date: Wed Sep 1 18:35:48 2010 +0200 Merge branch 'maint' * maint: maint: will become 2.0.9 Conflicts: builds/msvc/platform.hpp configure.in commit 99ddfa7d65a4556bdbb68fd1831e2de73595f0c7 Author: Martin Sustrik Date: Wed Sep 1 18:22:03 2010 +0200 maint: will become 2.0.9 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 0fe7d3c998f65fb93b0f3d15c40d8bc2fe0923ad Merge: 651c1ad 6a0c323 Author: Martin Sustrik Date: Wed Sep 1 15:29:19 2010 +0200 conflicts resolved commit 651c1adc80ddc724877f2ebedf07d18e21e363f6 Author: Martin Sustrik Date: Wed Sep 1 15:24:46 2010 +0200 sys transport introdced; inproc://log moved to sys://log src/ctx.cpp | 2 +- src/socket_base.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) commit 6a0c323bb231a2460c238cd0b93293fcd482f9bc Author: Martin Sustrik Date: Wed Sep 1 13:31:45 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++---------------- src/ctx.cpp | 6 ++++-- 2 files changed, 12 insertions(+), 18 deletions(-) commit ce0972dca3982538fd123b61fbae3928fad6d1e7 Author: Martin Sustrik Date: Wed Sep 1 07:57:38 2010 +0200 context creates an inproc endpoint ('inproc://log') to distribute 0MQ's log messages src/ctx.cpp | 25 +++++++++++++++++++++++-- src/ctx.hpp | 10 ++++++++++ src/object.cpp | 5 +++++ src/object.hpp | 5 +++++ 4 files changed, 43 insertions(+), 2 deletions(-) commit db73c76314d7109da4b400a3edb107c4eda802a2 Author: Martin Sustrik Date: Wed Sep 1 07:56:04 2010 +0200 assert when pipe attaches to PUB socket in process of termination -- fixed src/pub.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit aaa07613d3d7ff1eafcec3d38769f806fae5ac5c Author: Martin Sustrik Date: Wed Sep 1 07:54:57 2010 +0200 pipe being attached to the PAIR socket during its termination process is immediately asked to terminate itself src/pair.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 47c064f2eaa01c324e06588a4f07892762e78fcd Author: Martin Sustrik Date: Wed Sep 1 07:35:15 2010 +0200 hangup when closing socket with no pipes attached -- fixed src/fq.cpp | 5 +++++ src/lb.cpp | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) commit 090e460d6f09b5611d34a4867efb6cf46dd44a34 Author: Martin Sustrik Date: Tue Aug 31 21:03:34 2010 +0200 naming cleanup: yarray->array src/Makefile.am | 3 +- src/array.hpp | 146 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/ctx.hpp | 4 +- src/fq.hpp | 4 +- src/lb.hpp | 4 +- src/pipe.hpp | 6 +- src/pub.hpp | 4 +- src/socket_base.hpp | 4 +- src/yarray.hpp | 110 -------------------------------------- src/yarray_item.hpp | 64 ---------------------- 10 files changed, 160 insertions(+), 189 deletions(-) commit f5acbb5095901e56a9bfd29b9a8c1c7d3f165ce3 Author: Martin Sustrik Date: Tue Aug 31 07:01:40 2010 +0200 naming cleanup: zmq_encoder->encoder, zmq_decoder->decoder src/Makefile.am | 6 +-- src/decoder.cpp | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/decoder.hpp | 47 +++++++++++++++++---- src/encoder.cpp | 89 +++++++++++++++++++++++++++++++++++++++ src/encoder.hpp | 39 +++++++++++++---- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 6 +- src/pgm_sender.hpp | 4 +- src/zmq_decoder.cpp | 114 -------------------------------------------------- src/zmq_decoder.hpp | 59 -------------------------- src/zmq_encoder.cpp | 89 --------------------------------------- src/zmq_encoder.hpp | 55 ------------------------ src/zmq_engine.hpp | 8 ++-- 13 files changed, 283 insertions(+), 349 deletions(-) commit e45583c0f2b8fb11f119317e7c94052c07c24ea8 Author: Martin Sustrik Date: Mon Aug 30 17:04:51 2010 +0200 OSX build fixed -- semaphore replaced by mutex src/semaphore.hpp | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 53 insertions(+), 2 deletions(-) commit f0a36f9994e0a4e6e509bdf4b6dd75af27f984bb Author: Martin Sustrik Date: Mon Aug 30 15:28:08 2010 +0200 Minor patch to zmq_cpp(7) doc/zmq_cpp.txt | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit fba90af8a7cc4a790cc9c77b6313fc253b51c36c Author: Martin Sustrik Date: Mon Aug 30 12:10:40 2010 +0200 Issue 54 - socket_base.cpp:162 comparison error src/socket_base.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 68d62cfb4eb89549a3118e8e396531452b1174c3 Author: Martin Sustrik Date: Sat Aug 28 14:07:26 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-) commit 0a8473deddae61a8c9221c3df089239ac2e2ca62 Author: Guido Goldstein Date: Sat Aug 28 13:58:23 2010 +0200 Added tests for transports per socket tests/Makefile.am | 17 +++++++-- tests/simple.cpp | 32 ----------------- tests/test_pair.cpp | 78 ------------------------------------------ tests/test_pair_inproc.cpp | 30 ++++++++++++++++ tests/test_pair_ipc.cpp | 30 ++++++++++++++++ tests/test_pair_tcp.cpp | 30 ++++++++++++++++ tests/test_reqrep.cpp | 77 ----------------------------------------- tests/test_reqrep_inproc.cpp | 30 ++++++++++++++++ tests/test_reqrep_ipc.cpp | 30 ++++++++++++++++ tests/test_reqrep_tcp.cpp | 30 ++++++++++++++++ tests/testutil.hpp | 69 +++++++++++++++++++++++++++++++++++-- 11 files changed, 258 insertions(+), 195 deletions(-) commit 6ec783e7023b4c4d4d10a3870b4c560684ae7069 Author: Martin Sustrik Date: Sat Aug 28 13:26:19 2010 +0200 prefix_tree_t renamed to trie_t src/Makefile.am | 4 +- src/prefix_tree.cpp | 180 --------------------------------------------------- src/prefix_tree.hpp | 55 ---------------- src/sub.hpp | 4 +- src/trie.cpp | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/trie.hpp | 58 ++++++++++++++++ 6 files changed, 242 insertions(+), 239 deletions(-) commit beea535f9d7ff210ea035de190c0d87184ee1963 Author: Martin Sustrik Date: Sat Aug 28 13:18:53 2010 +0200 swap's block size made into a compile-time parameter src/config.hpp | 4 ++++ src/swap.cpp | 5 +++-- src/swap.hpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) commit d8b975f4e73ae940c0c0f9c8c6c7aac1199fee09 Author: Martin Sustrik Date: Sat Aug 28 13:14:45 2010 +0200 msg_store_t renamed to swap_t src/Makefile.am | 4 +- src/msg_store.cpp | 307 ----------------------------------------------------- src/msg_store.hpp | 114 -------------------- src/pipe.cpp | 2 +- src/pipe.hpp | 4 +- src/swap.cpp | 307 +++++++++++++++++++++++++++++++++++++++++++++++++++++ src/swap.hpp | 114 ++++++++++++++++++++ 7 files changed, 426 insertions(+), 426 deletions(-) commit d90b4071151e3752208d3a9d49fb50845f89ab1b Author: Martin Sustrik Date: Sat Aug 28 13:06:58 2010 +0200 refactoring of pipe/swap interaction src/pipe.cpp | 194 ++++++++++++++++++++++++++++++---------------------------- src/pipe.hpp | 39 ++++++------ 2 files changed, 120 insertions(+), 113 deletions(-) commit 42000d2c4f988a164eaeb9b580a4f588d91e353e Author: Martin Sustrik Date: Sat Aug 28 10:15:03 2010 +0200 terminology unified: revive->activate src/command.hpp | 13 ++++++------- src/fq.cpp | 4 ++-- src/object.cpp | 26 +++++++++++++------------- src/object.hpp | 8 ++++---- src/pipe.cpp | 8 ++++---- src/pipe.hpp | 4 ++-- src/socket_base.cpp | 5 +++-- 7 files changed, 34 insertions(+), 34 deletions(-) commit 92923cd40b645af844c5ed1055a0a45c6daa3c89 Author: Martin Sustrik Date: Sat Aug 28 08:44:12 2010 +0200 bug in pipe deactivation fixed src/pipe.cpp | 8 +++----- src/socket_base.cpp | 2 +- tests/test_pair.cpp | 7 ++++--- tests/test_reqrep.cpp | 4 ++-- 4 files changed, 10 insertions(+), 11 deletions(-) commit 035c937ee7452708a9dd3abd851fda6a753808f4 Author: Martin Sustrik Date: Sat Aug 28 07:02:22 2010 +0200 zmq_poll: account for the fact that ZMQ_FD is edge-triggered src/zmq.cpp | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) commit 67aa788577fb49474dd7329b14316d25f1b3c08b Author: Guido Goldstein Date: Sat Aug 28 06:31:40 2010 +0200 Fixed socket states in tests tests/test_pair.cpp | 3 +++ tests/test_reqrep.cpp | 3 +++ tests/testutil.hpp | 6 +++++- 3 files changed, 11 insertions(+), 1 deletions(-) commit 4d9b046977f895f8d61731672a5e84967ed85eb2 Author: Guido Goldstein Date: Fri Aug 27 21:13:45 2010 +0200 two tests added AUTHORS | 1 + tests/Makefile.am | 4 ++- tests/simple.cpp | 2 +- tests/test_pair.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/test_reqrep.cpp | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ tests/testutil.hpp | 64 ++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 217 insertions(+), 2 deletions(-) commit 0b76f234a2c521194029c6708c394391dfc66ea7 Merge: 35cb1fa 98dc118 Author: Martin Lucina Date: Fri Aug 27 18:41:10 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 35cb1fade62a92fdccc9fa0d75a3b69115c56c35 Author: Martin Lucina Date: Fri Aug 27 18:35:59 2010 +0200 Add a basic framework for a test suite The test suite uses the standard automake support. Tests are always built, but run only when you do a "make check". Makefile.am | 4 ++-- configure.in | 2 +- tests/Makefile.am | 8 ++++++++ tests/simple.cpp | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) commit 98dc11843e3234e3d70b50d4f650089e7cf99e63 Author: Dhammika Pathirana Date: Fri Aug 27 18:06:37 2010 +0200 assert on malformed messages src/zmq_decoder.cpp | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) commit 56faac7f19bf2a6d2c7b6e0c2e35fcb667a72a48 Author: Martin Sustrik Date: Fri Aug 27 15:01:38 2010 +0200 zmq_poll returns prematurely even if infinite timeout is set - fixed src/zmq.cpp | 204 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 114 insertions(+), 90 deletions(-) commit 3cb84b5ceac0f8652a99ec61152a865292e02cf1 Author: Jon Dyte Date: Fri Aug 27 06:59:55 2010 +0200 forwarder and streamer devices handle multi-part messages correctly src/forwarder.cpp | 17 ++++++++++++++--- src/queue.cpp | 15 ++++++++------- src/streamer.cpp | 17 ++++++++++++++--- 3 files changed, 36 insertions(+), 13 deletions(-) commit 43f2c6ff5b15d6feae2bd608e50503f7d4c62682 Author: Ivo Danihelka Date: Thu Aug 26 12:14:53 2010 +0200 improved null checking in zmq_term AUTHORS | 1 + src/zmq.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) commit b608c19c5a28f0f49a106bfddf680f0a410df6c8 Author: Martin Sustrik Date: Tue Aug 24 15:58:48 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 52 ++++++++++++++++++++++++------------- src/pipe.hpp | 9 +++--- src/socket_base.cpp | 1 + 3 files changed, 40 insertions(+), 22 deletions(-) commit 9b8993efb48ccbe3df917338cc078129b5af495b Author: Martin Sustrik Date: Tue Aug 24 11:19:22 2010 +0200 elementary fixes to the named session src/named_session.cpp | 21 +++++++++++---------- src/session.cpp | 37 +++++++++++-------------------------- src/session.hpp | 9 ++++----- src/socket_base.cpp | 12 ++++++------ src/socket_base.hpp | 7 +++---- src/zmq_init.cpp | 6 ++---- 6 files changed, 37 insertions(+), 55 deletions(-) commit 46d70555659c05a0c8d95c6d7aa8c7e0cc5ebc66 Author: Martin Sustrik Date: Tue Aug 24 10:20:55 2010 +0200 connecter object unregisters its fd correctly src/zmq_connecter.cpp | 12 ++++-------- src/zmq_connecter.hpp | 1 - 2 files changed, 4 insertions(+), 9 deletions(-) commit 87655b0b9d9121465e0b2ea1976b0879b1b1f756 Author: Martin Sustrik Date: Tue Aug 24 09:57:15 2010 +0200 listener object unregisters its fd correctly src/zmq_engine.cpp | 3 --- src/zmq_listener.cpp | 5 ++--- src/zmq_listener.hpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) commit 0d5f3ebbdad12a63e7cc28c53c38d750761a75e3 Author: Martin Sustrik Date: Tue Aug 24 09:39:17 2010 +0200 sessions created by listerner are correctly shut down src/session.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 5a731e73c855cd96040b3ecd55ef3b65606e1eb6 Author: Martin Sustrik Date: Sat Aug 14 08:53:52 2010 +0200 added ZMQ_MAKE_VALGRIND_HAPPY compile-time option perf/remote_thr.cpp | 8 ++++++-- src/object.cpp | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) commit 43e34d028115c43577713c0c3e1f0c33b0aac94a Author: Martin Sustrik Date: Sat Aug 14 08:37:38 2010 +0200 engine leak fixed; pgm compilation fixed src/connect_session.cpp | 20 ++++++++------------ src/i_engine.hpp | 4 ++++ src/pgm_receiver.cpp | 12 +++++++++--- src/pgm_receiver.hpp | 7 ++++--- src/pgm_sender.cpp | 12 +++++++++--- src/pgm_sender.hpp | 7 ++++--- src/session.cpp | 3 +++ src/socket_base.cpp | 2 -- src/zmq_engine.cpp | 6 ++++++ src/zmq_engine.hpp | 1 + 10 files changed, 48 insertions(+), 26 deletions(-) commit 45f83d78a56f4b3a812c87fec03a75558445b2ab Author: Martin Sustrik Date: Thu Aug 12 15:03:51 2010 +0200 one more dezombification bug fixed src/ctx.cpp | 33 +++++++++------------------------ src/ctx.hpp | 7 +------ src/object.cpp | 5 ----- src/object.hpp | 3 --- src/own.cpp | 7 ++++++- src/own.hpp | 5 ++++- src/socket_base.cpp | 21 ++++++++++++++++----- src/socket_base.hpp | 12 ++++++++++-- 8 files changed, 46 insertions(+), 47 deletions(-) commit 936dbf956b0f1471a96fc06bcba67765257dbc4a Author: Martin Sustrik Date: Thu Aug 12 08:16:18 2010 +0200 dezombification procedure fixed src/ctx.cpp | 46 ++++++++++++++++++++++++++++++++++------------ src/ctx.hpp | 12 ++++++++---- src/object.cpp | 5 +++++ src/object.hpp | 3 +++ src/socket_base.cpp | 10 ++++++---- src/socket_base.hpp | 4 ++-- src/zmq.cpp | 2 +- 7 files changed, 59 insertions(+), 23 deletions(-) commit 76bd6e73c335dbebd8bd30565f83a810058f2cc8 Author: Martin Sustrik Date: Wed Aug 11 17:06:49 2010 +0200 engine termination on disconnect fixed src/connect_session.cpp | 2 +- src/connect_session.hpp | 6 +++--- src/session.cpp | 14 ++++++++++++-- src/session.hpp | 1 + src/transient_session.cpp | 2 +- src/transient_session.hpp | 5 +++-- 6 files changed, 21 insertions(+), 9 deletions(-) commit d13933bc62fce71b5a58118020e0dd3776e79aa9 Author: Martin Sustrik Date: Wed Aug 11 14:09:56 2010 +0200 I/O object hierarchy implemented src/Makefile.am | 11 +- src/command.hpp | 4 +- src/connect_session.cpp | 115 ++++++++++++ src/connect_session.hpp | 60 ++++++ src/ctx.cpp | 6 +- src/ctx.hpp | 2 +- src/fq.cpp | 21 ++- src/fq.hpp | 11 +- src/i_engine.hpp | 15 +- src/i_inout.hpp | 21 +-- src/i_terminate_events.hpp | 38 ++++ src/io_object.cpp | 22 ++- src/io_object.hpp | 10 +- src/lb.cpp | 22 ++- src/lb.hpp | 11 +- src/named_session.cpp | 87 +++++++++ src/named_session.hpp | 56 ++++++ src/object.cpp | 26 ++-- src/object.hpp | 23 ++- src/own.cpp | 198 ++++++++++++++++++++ src/own.hpp | 132 +++++++++++++ src/owned.cpp | 77 -------- src/owned.hpp | 94 ---------- src/pair.cpp | 28 ++- src/pair.hpp | 7 +- src/pub.cpp | 26 ++- src/pub.hpp | 8 +- src/pull.cpp | 14 +- src/pull.hpp | 17 ++- src/push.cpp | 14 +- src/push.hpp | 17 ++- src/session.cpp | 161 ++++++----------- src/session.hpp | 73 +++++--- src/socket_base.cpp | 435 +++++++++++++------------------------------- src/socket_base.hpp | 68 ++----- src/sub.cpp | 12 +- src/sub.hpp | 11 +- src/transient_session.cpp | 36 ++++ src/transient_session.hpp | 46 +++++ src/xrep.cpp | 25 ++- src/xrep.hpp | 12 +- src/xreq.cpp | 17 +- src/xreq.hpp | 13 +- src/zmq_connecter.cpp | 38 ++--- src/zmq_connecter.hpp | 24 +-- src/zmq_engine.cpp | 52 ++--- src/zmq_engine.hpp | 14 +- src/zmq_init.cpp | 142 +++++++------- src/zmq_init.hpp | 33 ++-- src/zmq_listener.cpp | 19 +- src/zmq_listener.hpp | 11 +- 51 files changed, 1441 insertions(+), 994 deletions(-) commit ee1f1af0091d9bdffa0e5ce1783da925b3cd7e56 Author: Martin Lucina Date: Sat Aug 7 21:04:30 2010 +0200 zmq_poll(): Fix some corner cases Trying to optimize out the case where items_[i]. events is 0 would result in a bogus pollfds[i]. Similarly in the select()-based impl, while not strictly necessary it's better to get ZMQ_FD even if events is 0 since that detects ETERM and friends. src/zmq.cpp | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) commit a85d1e51bff991a0d2f93ded2724e0ee290edf12 Author: Martin Lucina Date: Sat Aug 7 20:35:42 2010 +0200 zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt2 Rewrite the select()-based zmq_poll() implementation to use ZMQ_FD and ZMQ_EVENTS. Also fix some corner cases: We should not pollute revents with unrequested events, and we don't need to poll on ZMQ_FD at all if a pollitem with no events set was passed in. src/zmq.cpp | 227 +++++++++++++++++++++++----------------------------------- 1 files changed, 90 insertions(+), 137 deletions(-) commit 6b1ca2cb1e0adc9f28aae8d322b0832a3b174a04 Author: Martin Lucina Date: Sat Aug 7 18:33:44 2010 +0200 Fix whitespace Dunno where those s came from... src/zmq.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit cd12508418530724f10a353fc3a14ab321d0be8e Author: Martin Lucina Date: Sat Aug 7 18:24:12 2010 +0200 zmq_poll(): Rewrite to use ZMQ_FD/ZMQ_EVENTS pt1 Rewrite zmq_poll() to use ZMQ_FD and ZMQ_EVENTS introduced on the wip-shutdown branch. Only do the poll()-based version of zmq_poll (), the select()-based version will not compile at the moment. src/zmq.cpp | 169 +++++++++++++++++++---------------------------------------- 1 files changed, 54 insertions(+), 115 deletions(-) commit eb7b8a413a99b2e43e8feee410f2b860e99e7056 Author: Martin Sustrik Date: Sat Aug 7 11:24:07 2010 +0200 REP socket layered on top of XREP socket src/rep.cpp | 263 +++++++++-------------------------------------------------- src/rep.hpp | 49 ++---------- 2 files changed, 45 insertions(+), 267 deletions(-) commit 3e97c0fef49e511dcae400e134876581cdae43f3 Author: Martin Sustrik Date: Sat Aug 7 09:52:34 2010 +0200 REQ socket implementation is layered on top of XREQ src/fq.cpp | 7 ++ src/pipe.cpp | 6 +- src/req.cpp | 243 ++++++++-------------------------------------------------- src/req.hpp | 54 +------------ 4 files changed, 47 insertions(+), 263 deletions(-) commit f77edfce26bf50ab6eae6550d33f345c9785acca Author: Martin Sustrik Date: Fri Aug 6 20:55:37 2010 +0200 Destruction of session is delayed till both in & out pipes are closed src/pipe.cpp | 5 ----- src/pipe.hpp | 4 ---- src/session.cpp | 7 ++++--- 3 files changed, 4 insertions(+), 12 deletions(-) commit 05d908492dc382941fc633ad7082b5bd86e84e67 Author: Martin Sustrik Date: Fri Aug 6 17:49:37 2010 +0200 WIP: Socket migration between threads, new zmq_close() semantics Sockets may now be migrated between OS threads; sockets may not be used by more than one thread at any time. To migrate a socket to another thread the caller must ensure that a full memory barrier is called before using the socket from the target thread. The new zmq_close() semantics implement the behaviour discussed at: http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004244.html Specifically, zmq_close() is now deterministic and while it still returns immediately, it does not discard any data that may still be queued for sending. Further, zmq_term() will now block until all outstanding data has been sent. TODO: Many bugs have been introduced, needs testing. Further, SO_LINGER or an equivalent mechanism (possibly a configurable timeout to zmq_term()) needs to be implemented. include/zmq.h | 70 ++++---- src/Makefile.am | 15 +- src/app_thread.cpp | 195 -------------------- src/app_thread.hpp | 88 --------- src/config.hpp | 5 +- src/ctx.cpp | 249 ++++++++++++-------------- src/ctx.hpp | 94 ++++------ src/fq.cpp | 29 ++- src/fq.hpp | 17 ++- src/i_endpoint.hpp | 43 ----- src/io_thread.cpp | 5 +- src/io_thread.hpp | 2 +- src/lb.cpp | 21 ++- src/lb.hpp | 13 +- src/object.cpp | 29 ++-- src/object.hpp | 14 +- src/owned.cpp | 10 +- src/owned.hpp | 9 +- src/pair.cpp | 72 +++++--- src/pair.hpp | 26 ++- src/pipe.cpp | 250 +++++++++++++++----------- src/pipe.hpp | 111 +++++++----- src/pub.cpp | 62 +++----- src/pub.hpp | 21 +-- src/pull.cpp | 48 +----- src/pull.hpp | 16 +-- src/push.cpp | 50 +----- src/push.hpp | 16 +-- src/rep.cpp | 81 ++++++--- src/rep.hpp | 30 ++-- src/req.cpp | 65 ++++--- src/req.hpp | 32 ++-- src/semaphore.hpp | 135 ++++++++++++++ src/session.cpp | 62 ++++--- src/session.hpp | 26 ++- src/socket_base.cpp | 495 +++++++++++++++++++++++++++++++++++++-------------- src/socket_base.hpp | 100 +++++++---- src/sub.cpp | 40 +---- src/sub.hpp | 11 +- src/thread.cpp | 20 -- src/thread.hpp | 9 - src/xrep.cpp | 65 ++++---- src/xrep.hpp | 26 ++- src/xreq.cpp | 37 +--- src/xreq.hpp | 10 +- src/zmq.cpp | 7 +- src/zmq_encoder.cpp | 2 +- 47 files changed, 1427 insertions(+), 1406 deletions(-) commit b7e0fa972f45d21e45cacb93a1a92d38fdc11f40 Author: Martin Sustrik Date: Wed Aug 25 15:38:43 2010 +0200 'master' will become 2.1.x release builds/msvc/platform.hpp | 4 ++-- configure.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 1e089f7163c8c59b60b39742ee4bc40e1ca843c5 Author: Martin Lucina Date: Wed Aug 25 13:11:20 2010 +0200 Update ChangeLog for v2.0.8 ChangeLog | 493 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 493 insertions(+), 0 deletions(-) commit c9076c5d8b9b69f4e1bf797127735a563b712eb9 Author: Martin Lucina Date: Wed Aug 25 12:50:16 2010 +0200 Basic documentation for XREQ/XREP socket types Add some basic documentation for XREQ/XREP socket types, including a brief description of the most common use case (REQ -> XREP) and (XREQ -> REP). doc/zmq_socket.txt | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) commit 6d275a8788ad06dda451845402877010f114d6d4 Merge: 98bea86 d788c1f Author: Pieter Hintjens Date: Wed Aug 25 12:09:55 2010 +0200 Updated NEWS for stable 2.0.8 release commit 98bea86240c3e2cb0c1c9832f5660994a0a11f34 Author: Pieter Hintjens Date: Wed Aug 25 11:43:52 2010 +0200 Updated NEWS for stable 2.0.8 release NEWS | 54 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 48 insertions(+), 6 deletions(-) commit d788c1f7e49305976f3e1d0540c5671c47348880 Author: Pieter Hintjens Date: Wed Aug 25 11:43:52 2010 +0200 Updated NEWS for stable 2.0.8 release NEWS | 47 +++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 41 insertions(+), 6 deletions(-) commit c06a3cc5101a36bf70c593937374371cafbacfc3 Author: Martin Lucina Date: Wed Aug 25 11:24:24 2010 +0200 Update version number to 2.0.8 builds/msvc/platform.hpp | 2 +- configure.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b66dd7afd20b82668a3d7756900c91680bd1d91e Author: Martin Lucina Date: Wed Aug 25 09:50:45 2010 +0200 zmq_stopwatch_stop: Don't return EFAULT Function returning unsigned long int cannot return (-1) src/zmq.cpp | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) commit 2b2accb8bf574bfb7d85893696f477d5bc6ca272 Author: Pieter Hintjens Date: Sat Aug 21 15:47:10 2010 +0200 Added calls to zmq_msg_close in examples doc/zmq_recv.txt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit c52d1f2d47ac93e391ff707b50245aa33d7e8323 Author: Pieter Hintjens Date: Sat Aug 21 13:46:03 2010 +0200 Fixed example for multipart zmq_recv() doc/zmq_recv.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 87612be91d4ff5252613196f061bd89d3bce25ec Merge: de0035b 5be54b9 Author: Pieter Hintjens Date: Fri Aug 20 01:06:34 2010 +0200 Merge branch '46_device_robustness' commit de0035b6d9fc1c5423d10fbac468b0e17188510f Author: Pieter Hintjens Date: Thu Aug 19 14:31:04 2010 +0200 Fixed git URL in README README | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7aba2d10338727b030c3a9ff4ec34f7086ea5023 Author: Martin Sustrik Date: Wed Aug 18 12:00:26 2010 +0200 documentation leftover from v2.0.6 cleaned in zmq(7) doc/zmq.txt | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit de0173754cc82f6c08875a892892f043a804554c Author: Pieter Hintjens Date: Wed Aug 11 21:12:10 2010 +0200 Removed wip zmq_deviced from master doc/Makefile.am | 2 +- doc/zmq.txt | 4 +- doc/zmq_deviced.txt | 145 --------------------------------------------------- 3 files changed, 2 insertions(+), 149 deletions(-) commit 5be54b912029381736ee8b8798f95cc9a2544a70 Author: Pieter Hintjens Date: Wed Aug 11 17:05:19 2010 +0200 46 - Devices vulnerable to invalid messages http://github.com/zeromq/zeromq2/issues#issue/46 Invalid messages are now discarded silently, instead of causing an assertion failure. src/xrep.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit e74d350068e8a7d2becbd791f19e2c1ef20afae5 Author: Pieter Hintjens Date: Wed Aug 11 17:00:12 2010 +0200 Fixed (un)signed type errors in get/setsockopt manual doc/zmq_getsockopt.txt | 10 +++++----- doc/zmq_setsockopt.txt | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) commit a12f446c4c160e6fb969c35ff01578e5f0965ecc Author: Pieter Hintjens Date: Tue Aug 10 12:36:56 2010 +0200 Modified zmq_tcp(7) to emphasize wildcard interfaces doc/zmq_tcp.txt | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit b6cdd369e328ceca2c46758d92ad8ea6a1f59cd7 Author: Pieter Hintjens Date: Sun Aug 8 11:43:32 2010 +0200 Added error checking (EFAULT) for null arguments * Fixed zmq_term, zmq_socket, zmq_close, zmq_setsockopt, * zmq_getsockopt, zmq_bind, zmq_connect, zmq_send, * zmq_recv, zmq_poll, zmq_device, zmq_stopwatch_stop * Updated Reference Manual for these methods doc/zmq_bind.txt | 2 + doc/zmq_close.txt | 3 +- doc/zmq_connect.txt | 2 + doc/zmq_device.txt | 13 ++++++++- doc/zmq_getsockopt.txt | 2 + doc/zmq_poll.txt | 2 + doc/zmq_recv.txt | 2 + doc/zmq_send.txt | 2 + doc/zmq_setsockopt.txt | 2 + doc/zmq_socket.txt | 3 +- doc/zmq_term.txt | 3 +- src/zmq.cpp | 63 ++++++++++++++++++++++++++++++++++++----------- 12 files changed, 79 insertions(+), 20 deletions(-) commit 677b3d906acc97c26855bdc31126492878ad6292 Author: Pieter Hintjens Date: Sat Aug 7 20:55:07 2010 +0200 Added not-null assertions on pointer arguments in C API functions * zmq_term * zmq_socket * zmq_close * zmq_setsockopt * zmq_getsockopt * zmq_bind * zmq_connect * zmq_send * zmq_recv * zmq_poll * zmq_device * zmq_stopwatch_stop src/zmq.cpp | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) commit b579aa9510fe6897735ba2aae5db399ef89ad573 Merge: 6d35e82 2100a91 Author: Martin Lucina Date: Fri Aug 6 12:01:40 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 6d35e82db4178b936b33c2eaa6a9f4a2b597e2f3 Author: Martin Lucina Date: Fri Aug 6 12:00:57 2010 +0200 Fix uninitialized use of nbytes in signaler fix src/signaler.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2100a9133312f7feecd22c4f809c8f3912c93274 Merge: 78e9ee8 16b43e6 Author: Pieter Hintjens Date: Fri Aug 6 11:09:29 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 16b43e657b44902b3b45fbb01228c813cf27ad39 Merge: 9ac2ff4 96bcc9e Author: Martin Lucina Date: Thu Aug 5 23:41:49 2010 +0200 Merge branch 'master' of github.com:zeromq/zeromq2 commit 9ac2ff449ccfb71cb1f3c9d7b2cf67c440539228 Author: Martin Lucina Date: Thu Aug 5 23:40:30 2010 +0200 zmq::signaler_t: Restart syscalls on EINTR This patch restarts the send() or recv() inside zmq::signaler_t if the call fails due to EINTR. src/signaler.cpp | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) commit 78e9ee84bf0e89eeb7134771b1f501ea0f9ccd9d Author: Pieter Hintjens Date: Thu Aug 5 18:49:49 2010 +0200 Fixed MSVC project for PULL/PUSH builds/msvc/libzmq/libzmq.vcproj | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 96bcc9e6cf73781c31042278eb960c0363a78805 Author: Pieter Hintjens Date: Wed Aug 4 17:06:38 2010 +0200 Small improvements to zmq_device(3) page * Clarified broker model and proxy model * Added example of proxy model doc/zmq_device.txt | 32 ++++++++++++++++++++++---------- 1 files changed, 22 insertions(+), 10 deletions(-) commit 13f3481e127a6b2390e847af6b01ee88f1b4ae61 Author: Pieter Hintjens Date: Wed Aug 4 16:05:25 2010 +0200 Further cleanups on reference manual - fixed unwrapped text in new man pages - fixed over-long lines in older pages, where possible - removed reference to old standalong devices from index page - added refernce to new zmq_device[3] documented from index page - some minor spelling corrections doc/zmq.txt | 22 ++++++------------ doc/zmq_bind.txt | 13 +++++++--- doc/zmq_connect.txt | 13 +++++++--- doc/zmq_device.txt | 56 ++++++++++++++++++++++++++++++++++++----------- doc/zmq_deviced.txt | 50 ++++++++++++++++++++++++++++++------------ doc/zmq_getsockopt.txt | 2 +- doc/zmq_pgm.txt | 4 +- doc/zmq_poll.txt | 4 +- doc/zmq_setsockopt.txt | 2 +- doc/zmq_tcp.txt | 11 +++++---- 10 files changed, 117 insertions(+), 60 deletions(-) commit 6ff193999d96487f7aa7e578980ab5554e61d8dc Author: Pieter Hintjens Date: Wed Aug 4 15:07:15 2010 +0200 Removed empty man pages for old standalone devices doc/asciidoc.conf | 2 +- doc/zmq_forwarder.txt | 29 ----------------------------- doc/zmq_queue.txt | 29 ----------------------------- doc/zmq_streamer.txt | 29 ----------------------------- 4 files changed, 1 insertions(+), 88 deletions(-) commit c51de31f2fd31f782e419bfac2fb8d40d689f3e3 Author: Pieter Hintjens Date: Wed Aug 4 14:56:58 2010 +0200 Reverting 'clean' change to Makefile doc/Makefile.am | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 77a3c36ff1f11215229a4efdb821a3cb83a9d6fc Author: Pieter Hintjens Date: Wed Aug 4 14:43:33 2010 +0200 Various changes to documentation project: * Added documentation for zmq_deviced, which we're developing * Created consistent page footer in documentation template * Page footer notes doc authors and copyright statement doc/asciidoc.conf | 15 ++++++ doc/zmq.txt | 19 ------- doc/zmq_bind.txt | 9 +--- doc/zmq_close.txt | 4 -- doc/zmq_connect.txt | 4 -- doc/zmq_cpp.txt | 4 -- doc/zmq_deviced.txt | 123 +++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_errno.txt | 4 -- doc/zmq_forwarder.txt | 4 -- doc/zmq_getsockopt.txt | 4 -- doc/zmq_init.txt | 4 -- doc/zmq_inproc.txt | 4 -- doc/zmq_ipc.txt | 4 -- doc/zmq_msg_close.txt | 4 -- doc/zmq_msg_copy.txt | 4 -- doc/zmq_msg_data.txt | 4 -- doc/zmq_msg_init.txt | 4 -- doc/zmq_msg_init_data.txt | 4 -- doc/zmq_msg_init_size.txt | 4 -- doc/zmq_msg_move.txt | 4 -- doc/zmq_msg_size.txt | 4 -- doc/zmq_pgm.txt | 5 +-- doc/zmq_poll.txt | 4 -- doc/zmq_queue.txt | 4 -- doc/zmq_recv.txt | 4 -- doc/zmq_send.txt | 4 -- doc/zmq_setsockopt.txt | 4 -- doc/zmq_socket.txt | 31 ++++++------ doc/zmq_streamer.txt | 4 -- doc/zmq_strerror.txt | 4 -- doc/zmq_tcp.txt | 4 -- doc/zmq_term.txt | 5 -- doc/zmq_version.txt | 4 -- 33 files changed, 156 insertions(+), 155 deletions(-) commit 6cd90304476c1c6873d67068009def63e520b848 Author: Pieter Hintjens Date: Wed Aug 4 14:42:21 2010 +0200 Added clean target that deletes generated man pages doc/Makefile.am | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) commit f575f252c99c99d3622f313d6bbad6635197a1e4 Author: Pieter Hintjens Date: Wed Aug 4 14:41:43 2010 +0200 Added man page for the zmq_device method doc/zmq_device.txt | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 92 insertions(+), 0 deletions(-) commit 11a410b65827a3958fb5f417c29e95c1953a0b42 Author: Pieter Hintjens Date: Wed Aug 4 14:38:56 2010 +0200 Renamed ZMQ_UPSTREAM to ZMQ_PULL, and ZMQ_DOWNSTREAM to ZMQ_PUSH. Left the old definitions as aliases, to be removed in release 3.0. Also renamed the source files implementing these two socket types. This change does not break existing applications nor bindings, but allows us to fix the documentation and user guide now, rather than keeping the old (confusing) names. include/zmq.h | 61 ++++++++++++++++--------------- src/Makefile.am | 8 ++-- src/app_thread.cpp | 12 +++--- src/downstream.cpp | 101 ---------------------------------------------------- src/downstream.hpp | 61 ------------------------------- src/pull.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/pull.hpp | 62 ++++++++++++++++++++++++++++++++ src/push.cpp | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/push.hpp | 61 +++++++++++++++++++++++++++++++ src/upstream.cpp | 98 -------------------------------------------------- src/upstream.hpp | 62 -------------------------------- 11 files changed, 364 insertions(+), 361 deletions(-) commit 544b36da68729daffefa8f40d2efed5945851a01 Author: Martin Lucina Date: Fri Jul 30 16:49:06 2010 +0200 XREQ: Correct behaviour on hitting ZMQ_HWM This reverts part of commit 84e0c7991a9b316ed571533abc628cc1175750a3 to get correct ZMQ_HWM semantics with XREQ sockets: When sending a message to an XREQ socket, the underlying pipe is selected in a round-robin fashion. If an underlying pipe is full it is skipped. If there are no underlying pipes, or all underlying pipes are full then zmq_send() shall block or return EAGAIN, depending on whether or not the call is blocking. Messages are never dropped. src/xreq.cpp | 27 +++------------------------ src/xreq.hpp | 3 --- 2 files changed, 3 insertions(+), 27 deletions(-) commit 66470b2c55d74fb137211f4264bbfc5e3f454534 Author: Martin Hurton Date: Mon Jul 26 12:24:00 2010 +0200 perf: fix typo perf/local_thr.cpp | 2 +- perf/remote_thr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 10533a560b4af1d3dae63c87c737e25bbdb78998 Author: Martin Hurton Date: Wed Jul 14 18:31:17 2010 +0200 pipe: check_read() should check for message delimiter src/pipe.cpp | 27 ++++++++++++++++++++++----- src/pipe.hpp | 3 +++ src/ypipe.hpp | 11 +++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) commit e1c596b37eef2c2c72c605d7bf4a5c97050add6b Author: Martin Hurton Date: Sat Jul 24 16:57:13 2010 +0200 Make sure lwm > 0 when hwm > 0 src/pipe.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5b1a6a4bea1cebe860769f82702410f6c1d0ab1b Author: Martin Lucina Date: Wed Jul 21 17:33:40 2010 +0200 Issue 42 - getaddrinfo() fails src/ip.cpp | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) commit aedf3f808befd8cf32a16e34b907c60c79eabfd7 Author: Martin Sustrik Date: Mon Jul 19 08:38:24 2010 +0200 EHOSTUNREACH is a valid return value from recv() src/tcp_socket.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 269904361b565efa54a106e3eda96091320439bd Author: Martin Sustrik Date: Tue Jul 13 11:46:56 2010 +0200 minor comment clarification src/tcp_connecter.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit da49e5a4dd4602bf893193a5e6e64af54695b51c Author: Martin Sustrik Date: Tue Jul 13 07:57:29 2010 +0200 devices exit in case of context termination src/forwarder.cpp | 15 +++++++++++++-- src/queue.cpp | 42 +++++++++++++++++++++++++++++++++++------- src/streamer.cpp | 15 +++++++++++++-- 3 files changed, 61 insertions(+), 11 deletions(-) commit ca057c7db8dcb2384e2498c938f3d83f64b78a7d Author: Martin Hurton Date: Sat Jul 10 22:57:47 2010 +0200 Fix identity generation for transient inproc connections src/socket_base.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 1f61c87ac527e2a75cabbce4ea4c5f916f4532e7 Author: Martin Hurton Date: Wed Jul 7 17:15:32 2010 +0200 issue 40 - nbytes != -1 (tcp_socket.cpp:216) src/tcp_socket.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit fd707fedc59124ed627780efed081acf33f455d2 Author: Martin Hurton Date: Tue Jul 6 22:47:07 2010 +0200 issue 38 - Assertion failed: fetched (xrep.cpp:196) src/xrep.cpp | 20 ++++++++++++-------- src/xrep.hpp | 6 ++++++ 2 files changed, 18 insertions(+), 8 deletions(-) commit 805af8241d7450fe1e60174739a78325677897f6 Author: Martin Lucina Date: Wed Jun 30 16:23:07 2010 +0200 asciidoc.conf was missing from distribution tarball doc/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0ab65324195ad70205514d465b03d851a6de051c Author: Pieter Hintjens Date: Tue Jun 29 21:08:41 2010 +0200 Prevent socket reuse by second bind, on win32 src/tcp_listener.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 79a3d07c8587e840548791efc314b0184c584881 Author: Martin Sustrik Date: Tue Jun 29 07:45:11 2010 +0200 MSVC build fixed src/msg_store.cpp | 17 +++++++++-------- 1 files changed, 9 insertions(+), 8 deletions(-) commit ba91644fdb48cec97edc6965c4ca7ab564a3513f Author: Martin Sustrik Date: Sat Jun 26 20:11:40 2010 +0200 msg_store added to MSVC build builds/msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/msg_store.cpp | 2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) commit 1dda8a2aaabd3b7705b0ecd67d6d9737d1978946 Author: Pieter Hintjens Date: Fri Jun 25 18:35:42 2010 +0200 Used more expressive variable names src/msg_store.cpp | 73 +++++++++++++++++++++++----------------------------- 1 files changed, 32 insertions(+), 41 deletions(-) commit fca2e8e8cc30bcd134839f6d0f5f9963323dad2b Author: Martin Hurton Date: Mon Jun 21 15:06:51 2010 +0200 Add SWAP support src/Makefile.am | 2 + src/msg_store.cpp | 313 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/msg_store.hpp | 114 +++++++++++++++++++ src/pipe.cpp | 114 +++++++++++++++---- src/pipe.hpp | 29 ++++-- src/session.cpp | 4 +- src/socket_base.cpp | 8 +- 7 files changed, 545 insertions(+), 39 deletions(-) commit 10c28c1fc2f06c93e12a7c60f79a315cec7c5a52 Author: Martin Hurton Date: Sat Jun 19 20:46:16 2010 +0200 Revive reader on pipe termination src/pipe.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2c3913bb19fa95e7decaa7967e2469dc428e46b0 Author: Martin Hurton Date: Sat Jun 19 19:46:35 2010 +0200 fix double free error in PAIR socket src/pair.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit cff7ba2315c0f62fa3679afa24ecea88da38a365 Author: Martin Sustrik Date: Thu Jun 17 17:09:51 2010 +0200 Windows build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 4 ---- builds/msvc/c_local_thr/c_local_thr.vcproj | 4 ---- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 4 ---- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 4 ---- include/zmq_utils.h | 8 ++++++++ src/zmq.cpp | 1 + 6 files changed, 9 insertions(+), 16 deletions(-) commit 7f01e9970d211235fc8057de6dc41ba8ceafe795 Author: Martin Sustrik Date: Thu Jun 17 16:51:53 2010 +0200 stopwatch returned to libzmq include/zmq.h | 2 + include/zmq_utils.h | 49 +++++++++++++++++++++++++++++ perf/Makefile.am | 9 ++--- perf/helpers.cpp | 86 --------------------------------------------------- perf/helpers.h | 40 ----------------------- perf/local_lat.cpp | 4 +- perf/local_thr.cpp | 6 ++-- perf/remote_lat.cpp | 6 ++-- perf/remote_thr.cpp | 4 +- src/Makefile.am | 2 +- src/zmq.cpp | 63 +++++++++++++++++++++++++++++++++++++ 11 files changed, 129 insertions(+), 142 deletions(-) commit 4777fe4010572d381a2ad8eb63df2fc5fb7e6642 Author: Martin Hurton Date: Thu Jun 17 12:45:14 2010 +0200 pipe: fix bug in rollback() method The msgs_written variable keeps track how many complete messages have been written so far. The rollback operation drops all fragments of the last incomplete message so it shouldn't change this variable at all. src/pipe.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 9151de38959a21829d4ab60324d6750d2e1a4357 Author: Martin Sustrik Date: Thu Jun 17 11:01:18 2010 +0200 generate identity for transient inproc connections src/socket_base.cpp | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit 341e8a267309179bbb8249845e7efb14faf93d4d Author: Martin Sustrik Date: Tue Jun 15 14:01:44 2010 +0200 test commit AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9858447fad3260cb16b1f2e56a14cfe3db737a36 Author: Martin Sustrik Date: Tue Jun 15 08:01:43 2010 +0200 getsockopt documentation fixed doc/zmq_getsockopt.txt | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit ac90b7e0ba497bfec09d7a69a2e01dc6d94a9c9a Author: Brian Buchanan Date: Fri Jun 11 08:03:34 2010 +0200 issue 35 - ZMQ_RCVMORE sometimes erroneously returns false AUTHORS | 1 + src/socket_base.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletions(-) commit 5ee355d1880bc7391c199ea29adc620ceb0d96f1 Author: Martin Sustrik Date: Fri Jun 11 07:02:36 2010 +0200 if connect asserts, exact error is reported src/tcp_connecter.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit 27877d73ea7dd972a773c7e960706130daaf5925 Author: Martin Sustrik Date: Fri Jun 11 06:55:30 2010 +0200 EHOSTUNREACH is acceptable outcome from connect src/tcp_connecter.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit c818b14bbd261aa836400e9dfb4848117dd2edb6 Author: Piotr Trojanek Date: Thu Jun 10 12:57:42 2010 +0200 clearing thread info structure src/ctx.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 74a3907be285891d90b82e2d315d03141a398752 Author: Martin Sustrik Date: Thu Jun 10 12:36:27 2010 +0200 couple of ICC warnings fixed src/encoder.hpp | 2 +- src/uuid.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 8782b4d696da7b1527f69e819d75d691bc3df105 Author: Piotr Trojanek Date: Thu Jun 10 07:34:11 2010 +0200 -lcrypto added to linking flags for QNX configure.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 76e0153d4f3ef1d5fef1a9b926e0e8e3ab2d9685 Author: Martin Sustrik Date: Thu Jun 10 07:21:05 2010 +0200 issue 33 - missing virtual destructors src/decoder.hpp | 4 +++- src/encoder.hpp | 2 ++ src/yarray_item.hpp | 4 +++- src/ypipe.hpp | 6 ++++++ 4 files changed, 14 insertions(+), 2 deletions(-) commit d329c55da9c503e82831e940b0fc8dc9e5479975 Author: Martin Sustrik Date: Thu Jun 10 07:12:00 2010 +0200 issue 31 - Assertion failed: err == ECONNREFUSED || err == ETIMEDOUT (tcp_connecter.cpp:296) src/tcp_connecter.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 604f7475ec1d19df416156879db3ddd3c90d5a13 Author: Martin Sustrik Date: Wed Jun 9 17:49:08 2010 +0200 issue 32 - poll_t poller broken src/poll.cpp | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) commit 7a29e8594fb539e37b9d08982b1f491b0794b7d2 Author: Martin Sustrik Date: Wed Jun 9 17:07:45 2010 +0200 Piotr Trojanek added to AUTHORS file AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 751b60a18d028d9859394c7abe960cb1c42e605e Author: Piotr Trojanek Date: Wed Jun 9 17:06:32 2010 +0200 extra ';' inside a struct or union -- clang warnings fixed foreign/xmlParser/xmlParser.hpp | 2 +- src/i_poll_events.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 240fc33f65c6cd9f1ed0a511daf4ad00ff37f163 Author: Martin Sustrik Date: Mon Jun 7 20:23:48 2010 +0200 minor comment clarification src/tcp_connecter.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 784e73a7c84f2c0a454f4a9ef69586755482a9d5 Merge: ce53d02 8f51a10 Author: Martin Sustrik Date: Mon Jun 7 09:03:56 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ce53d02e0580755055245cc1050f1dd3a26a3f22 Author: Martin Sustrik Date: Mon Jun 7 09:03:40 2010 +0200 C++ docs for zmq::poll function improved doc/zmq_cpp.txt | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 8f51a10918d54e24818b863a9e3d530a00de21b5 Author: Martin Lucina Date: Fri Jun 4 19:30:47 2010 +0200 Update ChangeLog for v2.0.7 ChangeLog | 848 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 848 insertions(+), 0 deletions(-) commit 5c97ff9a2eb3e55007fd90b5c3a1c433de7bc60c Author: Martin Lucina Date: Fri Jun 4 19:27:55 2010 +0200 More NEWS for 2.0.7 NEWS | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) commit e8a9614aaeb45fc619eed2983f93edb744b4cef4 Author: Martin Lucina Date: Fri Jun 4 19:20:37 2010 +0200 Update NEWS for 2.0.7 release NEWS | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 39 insertions(+), 15 deletions(-) commit 9b8f902d72438752b00d4c1bb3887c40423777e0 Author: Martin Sustrik Date: Fri Jun 4 18:49:55 2010 +0200 initial version of 2.0.7 NEWS NEWS | 25 ++++++++++++++++++++++++- 1 files changed, 24 insertions(+), 1 deletions(-) commit baf659fde5136c20f879ef713ec3effc34854ba6 Author: Martin Lucina Date: Fri Jun 4 17:12:51 2010 +0200 Move news from ChangeLog into NEWS ChangeLog | 397 +------------------------------------------------------------ NEWS | 398 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 400 insertions(+), 395 deletions(-) commit 94dfe1368ac1cd4a456c86b8fc800d7c3911cfd3 Author: Martin Lucina Date: Fri Jun 4 17:02:16 2010 +0200 Fix MINGW build Mingw seems to define NOMINMAX, so don't redefine it if already defined src/windows.hpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit cf048bb1f8a665370d9e39aee2a7363327911b08 Author: Martin Sustrik Date: Fri Jun 4 16:29:36 2010 +0200 platform.hpp for MSVC contains only very basic stuff builds/msvc/platform.hpp | 29 ----------------------------- perf/helpers.cpp | 4 +++- src/encoder.hpp | 5 +++++ src/prefix_tree.cpp | 5 +++++ src/uuid.cpp | 1 - src/uuid.hpp | 1 + src/windows.hpp | 4 ++++ src/zmq_engine.cpp | 6 +++++- 8 files changed, 23 insertions(+), 32 deletions(-) commit 927993863eda325c66fc678810eeadd0c744cdf2 Author: Martin Sustrik Date: Fri Jun 4 15:47:22 2010 +0200 MSVC build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 4 ++++ builds/msvc/c_local_thr/c_local_thr.vcproj | 4 ++++ builds/msvc/c_remote_lat/c_remote_lat.vcproj | 4 ++++ builds/msvc/c_remote_thr/c_remote_thr.vcproj | 4 ++++ foreign/xmlParser/xmlParser.cpp | 2 +- perf/helpers.cpp | 4 +--- 6 files changed, 18 insertions(+), 4 deletions(-) commit 621d7415b3cdee1f79787e2961f113b00d237615 Author: Martin Lucina Date: Fri Jun 4 15:35:14 2010 +0200 Fix Solaris/NetBSD breakage in atomic_ptr.hpp src/atomic_ptr.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 67ca7dcbe6b072b74a112ce4df4529cda82c0f13 Author: Martin Sustrik Date: Fri Jun 4 15:24:06 2010 +0200 obsolete API elements removed - this commit breaks backward compatibility devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- include/zmq.h | 11 +---------- include/zmq.hpp | 4 ++-- perf/local_lat.cpp | 2 +- perf/local_thr.cpp | 2 +- perf/remote_lat.cpp | 2 +- perf/remote_thr.cpp | 2 +- src/zmq.cpp | 4 +--- 10 files changed, 11 insertions(+), 22 deletions(-) commit d844a90690af357988b1c5ba027c740d4182d753 Author: Martin Lucina Date: Fri Jun 4 15:00:31 2010 +0200 zmqd: Removing for now, not ready for 2.0.7 Makefile.am | 4 +- configure.in | 2 +- zmqd/Makefile.am | 8 -- zmqd/zmqd.cpp | 364 ------------------------------------------------------ 4 files changed, 3 insertions(+), 375 deletions(-) commit 606c77368cccd2a277437b5de8764772295fdf89 Author: Martin Lucina Date: Fri Jun 4 14:48:49 2010 +0200 Move perf helper functions to perf/helpers.cpp include/zmq.h | 17 ---------- perf/Makefile.am | 9 +++-- perf/helpers.cpp | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/helpers.h | 40 +++++++++++++++++++++++ perf/local_lat.cpp | 3 +- perf/local_thr.cpp | 5 ++- perf/remote_lat.cpp | 5 ++- perf/remote_thr.cpp | 3 +- src/zmq.cpp | 58 ---------------------------------- 9 files changed, 141 insertions(+), 85 deletions(-) commit 05b4a7ae787760d5c24e048612b786fa0283854a Author: Martin Lucina Date: Fri Jun 4 13:58:49 2010 +0200 Remove PGM examples from build configure.in | 9 ---- perf/Makefile.am | 112 +----------------------------------------------------- 2 files changed, 1 insertions(+), 120 deletions(-) commit 4d65d7a5a98cbb95430a5b02706ab87d3fa0f56c Author: Martin Lucina Date: Fri Jun 4 13:53:40 2010 +0200 Documentation: zmq_tcp(7) update for 2.0.7 Document MORE bit in flags field doc/zmq_tcp.txt | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) commit 7fc15c21a17cfa58e60e4a513360cb12b542a570 Author: Martin Lucina Date: Thu Jun 3 14:36:44 2010 +0200 Documentation: zmq_cpp(7) update for 2.0.7 doc/zmq_cpp.txt | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) commit 10f4bf3f35ab3da05fe5ca8a28cd131e3781249f Author: Martin Lucina Date: Thu Jun 3 14:15:05 2010 +0200 Documentation: Cosmetic changes doc/zmq_getsockopt.txt | 10 ++++++++++ doc/zmq_setsockopt.txt | 11 +++++++++++ 2 files changed, 21 insertions(+), 0 deletions(-) commit 8076fd1a3abece7dc91c2b2309dd0ecba57e882f Author: Martin Lucina Date: Thu Jun 3 14:08:36 2010 +0200 Documentation: zmq_errno(3) doc/Makefile.am | 2 +- doc/zmq.txt | 9 ++++++--- doc/zmq_errno.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 4 deletions(-) commit 7c9b09bc511236c8cc5f6cea7623a8b98fedf302 Author: Martin Lucina Date: Wed Jun 2 18:36:34 2010 +0200 Documentation: Flow control, zmq_socket(3) Mostly Flow control and additions to zmq_socket(3) Removed/changed lots of text regarding message queues More fixes for 2.0.7 changes doc/zmq.txt | 18 +---- doc/zmq_getsockopt.txt | 23 ++++--- doc/zmq_poll.txt | 28 ++++---- doc/zmq_recv.txt | 22 +++---- doc/zmq_send.txt | 9 +-- doc/zmq_setsockopt.txt | 25 ++++--- doc/zmq_socket.txt | 172 ++++++++++++++++++++++++++++++++++++++++------- 7 files changed, 205 insertions(+), 92 deletions(-) commit 9d00d300b0d6b45d2954792540cc95a0c3fb6a01 Author: Martin Lucina Date: Tue Jun 1 22:22:50 2010 +0200 Documentation: zmq_init() API changes for 2.0.7 doc/zmq_init.txt | 19 +++++-------------- 1 files changed, 5 insertions(+), 14 deletions(-) commit 8ba1d3c8ed32b39bb1133330d496587d96020e7e Author: Martin Lucina Date: Tue Jun 1 22:22:29 2010 +0200 Documentation: zmq_term() and ETERM for 2.0.7 doc/zmq_bind.txt | 2 +- doc/zmq_connect.txt | 2 +- doc/zmq_getsockopt.txt | 1 - doc/zmq_poll.txt | 6 ++---- doc/zmq_setsockopt.txt | 1 - doc/zmq_term.txt | 20 +++++++++++++++++--- 6 files changed, 21 insertions(+), 11 deletions(-) commit 74a03dfd7dbb762be5d50eca4df214f8825ad44a Merge: 99e6179 8a77135 Author: Martin Lucina Date: Tue Jun 1 21:49:50 2010 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 8a771350795dc4f9aae6a89534f1391d7b63b10c Author: Martin Sustrik Date: Tue Jun 1 10:42:55 2010 +0200 Pieter Hintjens added to 'authors' section AUTHORS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0b0716661e99a2b55151650ec94cd5fd268d0334 Author: Pieter Hintjens Date: Tue Jun 1 10:40:12 2010 +0200 multiple vulnerabilities in xml paerser fixed foreign/xmlParser/xmlParser.cpp | 37 +++++++++++++++++++++++++++++++------ 1 files changed, 31 insertions(+), 6 deletions(-) commit 99e6179edd9e3552fcdb7f4fce3306cd174f3359 Author: Martin Lucina Date: Mon May 31 17:24:50 2010 +0200 Documentation updates The option_value parameter for zmq_getsockopt is in and out. doc/zmq_getsockopt.txt | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit b4f3e0acd72de97bc5ef46ea74d9cd7ed7f9efc2 Author: Martin Lucina Date: Mon May 31 17:21:51 2010 +0200 Documentation updates Clarify multi-part messages doc/zmq_recv.txt | 16 ++++++++-------- doc/zmq_send.txt | 13 ++++++------- 2 files changed, 14 insertions(+), 15 deletions(-) commit 7bbe754cb4987669d4273ec37f5f50d29b9931df Author: Martin Lucina Date: Mon May 31 17:21:12 2010 +0200 Documentation updates Clarify pipeline and exclusive pair patterns doc/zmq_socket.txt | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) commit 8a4df431de872623c761fdeb291748d3d153b8d1 Author: Martin Lucina Date: Mon May 31 14:18:51 2010 +0200 Documentation updates Add getsockopt to Makefile.am doc/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit dfbaf4f9668f0493649d6ba1328cced64e5340b0 Author: Martin Lucina Date: Mon May 31 14:18:37 2010 +0200 Documentation updates Multi-part messages doc/zmq_recv.txt | 5 +++-- doc/zmq_send.txt | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) commit 0fa73b039462c1754d407de85306904e9b0c73be Author: Martin Lucina Date: Mon May 31 14:13:41 2010 +0200 Documentation updates Add getsockopt to index doc/zmq.txt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit eb9ff1e77977c6199c0a0439f4dd35fa39f3bd3c Author: Martin Lucina Date: Mon May 31 14:12:27 2010 +0200 Documentation updates Multi-part messages doc/zmq_getsockopt.txt | 17 +++++++++++++++++ doc/zmq_recv.txt | 37 ++++++++++++++++++++++++++++++++++++- doc/zmq_send.txt | 33 ++++++++++++++++++++++++++++++++- 3 files changed, 85 insertions(+), 2 deletions(-) commit 8becacf82c950af951f477e3dc3f7ac79e110fc1 Author: Martin Lucina Date: Mon May 31 12:53:40 2010 +0200 Documentation updates Add zmq_getsockopt(3), clean up zmq_setsockopt(3). doc/zmq_getsockopt.txt | 209 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_setsockopt.txt | 62 ++++++++------- 2 files changed, 241 insertions(+), 30 deletions(-) commit be6019abd1ac6fe11c9c51dbadf9c72b37349c2a Author: Martin Sustrik Date: Mon May 31 09:28:36 2010 +0200 issue 28. - SNDMORE/ RCVMORE is dropping every other message src/req.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 2e9be56a4059cf230f6aa92eb1c71db5f1200b8e Author: Martin Sustrik Date: Mon May 31 06:17:58 2010 +0200 memory leak in REQ socket fixed src/req.cpp | 34 ++++------------------------------ 1 files changed, 4 insertions(+), 30 deletions(-) commit 3bb60da0d085b1089ddec4617fcd40f2cda88567 Merge: 04fcd4d da37c45 Author: Martin Sustrik Date: Mon May 31 06:11:42 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 04fcd4d55b3b01e75d1d0d547987841811a2d610 Author: Martin Sustrik Date: Mon May 31 06:11:20 2010 +0200 memory leak in REP socket fixed src/rep.cpp | 34 ++++------------------------------ 1 files changed, 4 insertions(+), 30 deletions(-) commit da37c45b0c7200eea96118952e671972b71df4ce Author: Martin Lucina Date: Fri May 28 01:38:43 2010 +0200 Clarify zmq_bind/zmq_connect Use the term 'endpoint' correctly, and drop the nonsense about local/remote addresses which doesn't clearly explain what is going on doc/zmq_bind.txt | 28 +++++++++++++++------------- doc/zmq_connect.txt | 26 ++++++++++++++------------ 2 files changed, 29 insertions(+), 25 deletions(-) commit 74f1a4a579d3b09b3420092d9f076827be31c4e7 Author: Martin Lucina Date: Fri May 28 00:55:04 2010 +0200 RPM packaging cleanups - ditch -utils package - add descriptions from Debian packaging builds/redhat/zeromq.spec | 41 +++++++++++++++++------------------------ 1 files changed, 17 insertions(+), 24 deletions(-) commit b4cc7b97ecaf743f3259f9df7d687558892b8a72 Author: Mikko Koppanen Date: Fri Apr 16 10:26:22 2010 +0100 dist-hook for copying zeromq.spec to top-level Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 8bd3f743f50a61355b6cf18046d59c7d0289836b Author: Mikko Koppanen Date: Fri Apr 16 00:01:13 2010 +0100 Import redhat packaging builds/redhat/zeromq.spec | 137 +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 137 insertions(+), 0 deletions(-) commit 5219e4ce8f9aa082c5f91e248a9f66639c69727d Author: Martin Lucina Date: Fri May 28 00:49:13 2010 +0200 Clarify socket types in documentation, reinstate ZMQ_PAIR doc/zmq.txt | 4 +- doc/zmq_setsockopt.txt | 14 ++++---- doc/zmq_socket.txt | 91 +++++++++++++++++++++++++++++------------------ 3 files changed, 65 insertions(+), 44 deletions(-) commit 8408ae066dce123fc93e4f53dbadb1f60b7f2e8a Author: Martin Sustrik Date: Tue May 25 15:03:57 2010 +0200 LWM is computed rather than explicitly specified by user doc/zmq_setsockopt.txt | 15 --------------- include/zmq.h | 1 + src/config.hpp | 5 ++++- src/options.cpp | 18 ------------------ src/options.hpp | 1 - src/pipe.cpp | 35 ++++++++++++++++++++++++++++++++--- src/pipe.hpp | 4 +++- src/session.cpp | 6 ++---- src/socket_base.cpp | 12 ++++-------- 9 files changed, 46 insertions(+), 51 deletions(-) commit f34a468a263c7b4013a267297ee7f121e12dfb9d Author: Martin Sustrik Date: Tue May 25 10:57:54 2010 +0200 coding style fixed in zmqd zmqd/zmqd.cpp | 426 ++++++++++++++++++++++++++++----------------------------- 1 files changed, 211 insertions(+), 215 deletions(-) commit 7773fdddfb357145cb15faaa5228fb3b2d0f6f78 Merge: 091e92a 89783c3 Author: Martin Sustrik Date: Thu May 20 18:02:34 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 091e92a11dec353e674cbacbf2455a48bdb4e01d Author: Martin Sustrik Date: Thu May 20 18:01:58 2010 +0200 Pieter Hintjens added to AUTHORS file AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 89783c37d2b8a7b5519eab7922b460449aa0bf3f Author: Martin Sustrik Date: Wed May 19 06:31:57 2010 +0200 incomplete messages can be stored in ypipe src/pipe.cpp | 10 ++++------ src/ypipe.hpp | 46 ++++++++++++++++++++++++++++------------------ 2 files changed, 32 insertions(+), 24 deletions(-) commit f40ce4e500d32b4240395e09e0ce3359734f0189 Author: Jon Dyte Date: Sat May 15 12:37:45 2010 +0200 single 0MQ daemon (zmqd) - initial version Makefile.am | 4 +- configure.in | 2 +- zmqd/Makefile.am | 8 ++ zmqd/zmqd.cpp | 368 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 379 insertions(+), 3 deletions(-) commit 6705a3d5807542ee2ed8a1ef6e3d9f769e5d5a93 Author: Steven McCoy Date: Thu May 13 12:43:58 2010 +0200 some more sanity checks in pgm_socket src/pgm_socket.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit ff9d3985556aa58a5d120a3eb72867c7ebea924d Merge: 56262d7 f6c1c97 Author: Martin Sustrik Date: Thu May 13 12:41:39 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 56262d7ba79a9ba19fc1b89fdc07bca3894062f2 Author: Steven McCoy Date: Thu May 13 12:41:20 2010 +0200 some more sanity checks in pgm_socket src/pgm_socket.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit f6c1c972428f15356af09d6922910ef44d1f6cb3 Merge: 52ef3f3 127cb89 Author: Martin Lucina Date: Wed May 12 16:49:49 2010 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 52ef3f3f2c6f3ba1717b2e729556df713c022636 Author: Martin Lucina Date: Wed May 12 16:46:59 2010 +0200 Revert commit 7cb076e, atomic ops cleanup Reverted to using atomic.h on NetBSD Removed GNU builtins (see http://lists.zeromq.org/pipermail/zeromq-dev/2010-May/003485.html) Removed SPARC native atomic ops as they are untested and have been commented out for years Add "memory" to asm clobber for X86 atomic_counter::sub() src/atomic_counter.hpp | 65 +++++++---------------------------------------- src/atomic_ptr.hpp | 58 ++++++------------------------------------ 2 files changed, 19 insertions(+), 104 deletions(-) commit 127cb89ac1271bf85798294d450509b7c23019bd Author: Martin Sustrik Date: Wed May 12 16:46:07 2010 +0200 MAINTAINERS file added MAINTAINERS | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 60 insertions(+), 0 deletions(-) commit 8e5ac100c95e02ef60aa827b4199002f324617ed Merge: 714a8d5 9fbb914 Author: Martin Sustrik Date: Wed May 12 12:45:38 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 714a8d50a03e773320a02247847c58020c96e867 Author: Brett Cameron Date: Wed May 12 12:45:12 2010 +0200 fixes for OpenVMS src/signaler.cpp | 1 + src/tcp_connecter.cpp | 19 ++++++++++++++++--- src/tcp_listener.cpp | 31 +++++++++++++++++++++++++++---- src/uuid.cpp | 29 +++++++++++++++++++++++++++++ src/uuid.hpp | 11 ++++++++++- 5 files changed, 83 insertions(+), 8 deletions(-) commit 9fbb9141a8895ac83e8051ac568223a9e57a278d Author: Martin Lucina Date: Mon May 10 16:39:09 2010 +0200 Update historic include paths devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_queue/Makefile.am | 2 +- devices/zmq_streamer/Makefile.am | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 9d16a415cbfd33f89d2f5afd96ed7cd34a21a634 Author: Martin Lucina Date: Mon May 10 16:32:10 2010 +0200 OpenPGM build flags cleanup Removed various exotic -Wxxx flags in the OpenPGM build to get us to what is actually required and reasonable; added in -fno-strict-aliasing since OpenPGM generates lots of warnings about dereferencing typed-punned pointers; removed the OpenPGM extra flags from libzmq_la_CXXFLAGS and left them only in libzmq_la_CFLAGS so that our code is not built with the OpenPGM extra flags. src/Makefile.am | 23 ++--------------------- 1 files changed, 2 insertions(+), 21 deletions(-) commit 2cf9f04a460473ea10e901e68e66596583d0d286 Author: Martin Lucina Date: Mon May 10 16:24:53 2010 +0200 Update OpenPGM to version 2.1.26 configure.in | 2 +- foreign/openpgm/libpgm-2.0.24.tar.gz | Bin 407110 -> 0 bytes foreign/openpgm/libpgm-2.1.26.tar.gz | Bin 0 -> 413863 bytes src/Makefile.am | 2 ++ 4 files changed, 3 insertions(+), 1 deletions(-) commit a25414e55caa975185ac6534c40bb601e5c38a9a Author: Martin Sustrik Date: Sun May 9 16:59:15 2010 +0200 Fix in zmq_poll (Windows version) src/zmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4d33c43913dd640853cec75ce21080c2b33d8526 Author: Martin Sustrik Date: Fri May 7 21:53:55 2010 +0200 caution about zmq_msg_init_* functions added to the docs doc/zmq_msg_init.txt | 4 ++++ doc/zmq_msg_init_data.txt | 4 ++++ doc/zmq_msg_init_size.txt | 4 ++++ 3 files changed, 12 insertions(+), 0 deletions(-) commit 4a3b857c4cf35261751d562ad7e4acc5ecf58be0 Author: Martin Sustrik Date: Fri May 7 11:08:50 2010 +0200 commands not processed immediatelly in some scenarios; fixed src/app_thread.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 36b044a0d5a9918841839edf12767b31bfec36a0 Author: Martin Sustrik Date: Fri May 7 09:21:15 2010 +0200 ZMQ_PAIR socket removed from the documentation as it is unfinished yet doc/zmq_socket.txt | 13 ------------- 1 files changed, 0 insertions(+), 13 deletions(-) commit f60d891b2309cdc6f2cc1507a238cec85e4aa9e7 Author: Martin Sustrik Date: Thu May 6 10:33:01 2010 +0200 Issue 23. zmq_init() crashes on illegal numbers src/zmq.cpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 64c58662b7f491f2a3c8cb684f27ea1d5c549552 Author: Martin Sustrik Date: Wed May 5 14:33:02 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 835e893e54598ff474067cc68b787440baf6b05c Author: Martin Sustrik Date: Wed May 5 14:24:54 2010 +0200 dispatcher_t class renamed to ctx_t src/Makefile.am | 4 +- src/app_thread.cpp | 10 +- src/app_thread.hpp | 2 +- src/ctx.cpp | 316 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/ctx.hpp | 156 +++++++++++++++++++++++++ src/dispatcher.cpp | 316 --------------------------------------------------- src/dispatcher.hpp | 153 ------------------------- src/io_thread.cpp | 6 +- src/io_thread.hpp | 2 +- src/object.cpp | 28 +++--- src/object.hpp | 10 +- src/socket_base.cpp | 11 +- src/zmq.cpp | 17 ++-- src/zmq_encoder.cpp | 2 +- 14 files changed, 518 insertions(+), 515 deletions(-) commit 10f5334f2891b187ce57f38186cf977406097ab0 Merge: 44dd005 3f5465a Author: Martin Sustrik Date: Wed May 5 13:03:56 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 44dd005ff05431b05a8e04858a23784b252da870 Author: Martin Sustrik Date: Wed May 5 13:03:26 2010 +0200 number of application threads to use 0MQ sockets is unlimited; app_threads parameter in zmq_init is unused and obsolete src/config.hpp | 4 +++ src/dispatcher.cpp | 53 +++++++++++++++++++++++++++++---------------------- src/dispatcher.hpp | 15 ++----------- src/zmq.cpp | 6 +++- 4 files changed, 41 insertions(+), 37 deletions(-) commit 3f5465ada1b465ac0e360d0416b8f42b0fddfab0 Author: Martin Sustrik Date: Tue May 4 10:37:10 2010 +0200 Windows port fixed src/signaler.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 235ed3a3dcffb7c658cbc9253eae9de54db24533 Author: Martin Sustrik Date: Tue May 4 10:22:16 2010 +0200 signaler transports commands per se rather than one-bit signals src/app_thread.cpp | 20 +++--- src/config.hpp | 5 - src/dispatcher.cpp | 71 +++++++---------- src/dispatcher.hpp | 30 ++----- src/io_thread.cpp | 17 ++-- src/object.cpp | 6 +- src/pipe.hpp | 2 +- src/signaler.cpp | 224 ++++++++++++++++++++-------------------------------- src/signaler.hpp | 45 +++-------- src/ypipe.hpp | 83 +++++--------------- 10 files changed, 174 insertions(+), 329 deletions(-) commit 8b9bd05726c3df56d7f437889abccba3cbbffdee Author: Martin Sustrik Date: Mon May 3 16:21:36 2010 +0200 thread ID and dispatcher made private in object_t src/app_thread.cpp | 6 +++--- src/io_thread.cpp | 2 +- src/object.hpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) commit 84e0c7991a9b316ed571533abc628cc1175750a3 Author: Martin Sustrik Date: Sun May 2 20:59:07 2010 +0200 queue device fixed src/queue.cpp | 86 ++++++++++++++++++++++++++++---------------------------- src/xreq.cpp | 27 ++++++++++++++++-- src/xreq.hpp | 3 ++ 3 files changed, 70 insertions(+), 46 deletions(-) commit 4a6bac1deaedb3c111c7e28b2933ed98367cb193 Merge: acfd0f8 beb4da3 Author: Martin Sustrik Date: Fri Apr 30 04:54:10 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit acfd0f8ca2d15111f35ae0034ed3ce130c96b910 Author: Martin Sustrik Date: Fri Apr 30 04:53:41 2010 +0200 prefix in XREP recv'd message misses MORE flag src/xrep.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit beb4da3c28cff501a33de34cec95ca110cd3084e Author: Martin Sustrik Date: Thu Apr 29 20:53:46 2010 +0200 windows port fixed builds/msvc/libzmq/libzmq.vcproj | 34 +++++----------------------------- src/signaler.cpp | 4 +--- 2 files changed, 6 insertions(+), 32 deletions(-) commit ae93ed318a450d6d763a5f629d478467f7362b07 Author: Martin Sustrik Date: Thu Apr 29 20:34:48 2010 +0200 signaler rewritten in such a way that any number (>64) of threads can be used src/app_thread.cpp | 25 +++---- src/app_thread.hpp | 2 +- src/config.hpp | 4 + src/dispatcher.cpp | 16 ++-- src/dispatcher.hpp | 10 ++- src/io_thread.cpp | 30 ++++----- src/io_thread.hpp | 2 +- src/object.cpp | 13 +--- src/object.hpp | 9 +-- src/signaler.cpp | 200 +++++++++++++++++++++++++++++++--------------------- src/signaler.hpp | 24 +++++- src/zmq.cpp | 2 +- 12 files changed, 190 insertions(+), 147 deletions(-) commit 1ffc6dd41f2e2ce45c67f3fe08780c5a09cf667d Author: Martin Sustrik Date: Thu Apr 29 18:03:54 2010 +0200 eventfd-style signaling removed configure.in | 26 ------------------ src/signaler.cpp | 78 +----------------------------------------------------- src/signaler.hpp | 6 ---- 3 files changed, 1 insertions(+), 109 deletions(-) commit 37128b7b1aeed9ad2bf6816560b85b5f94dd5bec Author: Martin Sustrik Date: Thu Apr 29 17:31:57 2010 +0200 fd_signaler_t renamed to signaler_t src/Makefile.am | 4 +- src/app_thread.cpp | 3 +- src/app_thread.hpp | 6 +- src/dispatcher.hpp | 4 +- src/fd_signaler.cpp | 432 --------------------------------------------------- src/fd_signaler.hpp | 80 ---------- src/io_thread.cpp | 2 +- src/io_thread.hpp | 6 +- src/signaler.cpp | 432 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/signaler.hpp | 80 ++++++++++ 10 files changed, 524 insertions(+), 525 deletions(-) commit c193fd146661b39027c5e3fa0776dcdf8c6af5e2 Author: Martin Sustrik Date: Thu Apr 29 17:20:23 2010 +0200 lock-free polling removed; ZMQ_POLL flag removed doc/zmq_init.txt | 8 +- include/zmq.h | 1 + src/Makefile.am | 5 - src/app_thread.cpp | 22 +--- src/app_thread.hpp | 8 +- src/atomic_bitmap.hpp | 310 ---------------------------------------------- src/dispatcher.cpp | 7 +- src/dispatcher.hpp | 6 +- src/fd_signaler.hpp | 3 +- src/i_signaler.hpp | 55 -------- src/io_thread.cpp | 6 +- src/io_thread.hpp | 5 +- src/object.cpp | 1 - src/queue.cpp | 5 +- src/simple_semaphore.hpp | 242 ------------------------------------ src/ypollset.cpp | 65 ---------- src/ypollset.hpp | 69 ---------- src/zmq.cpp | 11 +-- 18 files changed, 28 insertions(+), 801 deletions(-) commit 7cb076e56a18cb76c49f17bd34bc73c11e01b705 Author: Steven McCoy Date: Thu Apr 29 11:36:13 2010 +0200 Defer NetBSD atomic ops to GCC builtins. Revert Sun atomic ops #define. src/atomic_bitmap.hpp | 72 ++++++++++++++++++++++++++++++++---------------- src/atomic_counter.hpp | 42 ++++++++++++++++++---------- src/atomic_ptr.hpp | 25 +++++++++++----- 3 files changed, 92 insertions(+), 47 deletions(-) commit ad6fa9d0d4f1cf29ce63998d7efe337b1a784ef6 Author: Martin Sustrik Date: Tue Apr 27 17:36:00 2010 +0200 initial version of multi-hop REQ/REP src/rep.cpp | 97 +++++++++++++++++++---------- src/req.cpp | 28 ++++++++- src/xrep.cpp | 195 +++++++++++++++++++++++++++++++++++++++++++++++----------- src/xrep.hpp | 35 +++++++++- 4 files changed, 280 insertions(+), 75 deletions(-) commit 1ad6ade0ed465030716ce720077f3aa31e6cd136 Author: Martin Sustrik Date: Mon Apr 26 16:58:49 2010 +0200 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit beffee92a8ec9e14cca21e5901970c4d03967c3d Author: Martin Sustrik Date: Mon Apr 26 16:51:05 2010 +0200 P2P renamed to PAIR doc/zmq_socket.txt | 8 ++-- include/zmq.h | 4 +- src/Makefile.am | 4 +- src/app_thread.cpp | 6 +- src/p2p.cpp | 139 ---------------------------------------------------- src/p2p.hpp | 63 ----------------------- src/pair.cpp | 139 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/pair.hpp | 63 +++++++++++++++++++++++ 8 files changed, 214 insertions(+), 212 deletions(-) commit 7d9603d722c9c2752dccd0c51f470e68d0e0c48c Author: Jon Dyte Date: Sun Apr 25 15:04:23 2010 +0200 Bug in zmq_queue fixed devices/zmq_queue/zmq_queue.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit d524c4e15d3cfa21f265d2c21e8a76ac97bfee2d Author: Martin Sustrik Date: Fri Apr 16 09:53:09 2010 +0200 fix of documentation typo doc/zmq_setsockopt.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1c33941be9d564733c15fe0466906fdf0bbd46b8 Merge: ea18d30 370cde0 Author: Martin Sustrik Date: Thu Apr 15 07:32:49 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ea18d30c209cb4e3f0dd0bc5e4380345e81b6fb6 Author: Martin Sustrik Date: Thu Apr 15 07:32:25 2010 +0200 atomic_ptr fix of Win64 include/zmq.h | 2 +- src/atomic_ptr.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 370cde09226d8a1b87eeac306fe97d64b4ea63a3 Author: Martin Sustrik Date: Mon Apr 12 17:00:11 2010 +0200 win build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0024d290765f53428ff78eddc5a4bc675a13c6a7 Author: Martin Lucina Date: Mon Apr 12 16:49:13 2010 +0200 Build fixes for cross compiling and Win32 configure.in | 27 ++++++++++++++++++--------- foreign/xmlParser/xmlParser.cpp | 2 +- include/zmq.h | 14 ++++++++------ src/Makefile.am | 2 +- 4 files changed, 28 insertions(+), 17 deletions(-) commit 34964769399825e45b3efd02e642af97355707ef Author: Martin Sustrik Date: Mon Apr 12 10:05:24 2010 +0200 MSVC perf build fixed builds/msvc/c_local_lat/c_local_lat.vcproj | 2 +- builds/msvc/c_local_thr/c_local_thr.vcproj | 2 +- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 2 +- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 7668e7976dc6c3e18a314d991381f29f5cbcc6ef Author: Martin Sustrik Date: Mon Apr 12 09:57:34 2010 +0200 zmq_poll returns ETERM in case of context termination doc/zmq_socket.txt | 3 --- src/zmq.cpp | 11 +++++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) commit 3236cb1a54316206d14a0f925dfa79d5b35f70fc Author: Martin Sustrik Date: Mon Apr 12 09:25:04 2010 +0200 ETERM is accounted for in the documentation doc/zmq_bind.txt | 2 ++ doc/zmq_connect.txt | 2 ++ doc/zmq_poll.txt | 3 ++- doc/zmq_recv.txt | 2 ++ doc/zmq_send.txt | 2 ++ doc/zmq_setsockopt.txt | 3 +++ doc/zmq_socket.txt | 3 +++ 7 files changed, 16 insertions(+), 1 deletions(-) commit fba28c7c0cddd7c54fe45b38fc38ac6fe5a48438 Author: Martin Sustrik Date: Sun Apr 11 16:36:27 2010 +0200 issue 1 - Change zmq_term semantics include/zmq.h | 1 + src/app_thread.cpp | 25 ++++++++++++++++++++++--- src/app_thread.hpp | 18 ++++++++++++++++-- src/dispatcher.cpp | 7 +++++++ src/socket_base.cpp | 50 +++++++++++++++++++++++++++++++++++++++++++------- src/zmq.cpp | 2 ++ 6 files changed, 91 insertions(+), 12 deletions(-) commit dff79d778db46bebe1e3b0cbd28b328972b9adb8 Author: Martin Sustrik Date: Sun Apr 11 14:20:00 2010 +0200 version number bumped to 2.0.7 for MSVC build builds/msvc/platform.hpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6cf076510a39c8eb60b1ec2f28aa895b9fb6eaae Author: Martin Sustrik Date: Sun Apr 11 14:00:40 2010 +0200 C-style comments in zmq.h include/zmq.h | 128 +++++++++++++++++++++++++------------------------------- 1 files changed, 57 insertions(+), 71 deletions(-) commit 00cf3ceb8da8cb58b343cb75798a042588f09752 Author: Martin Sustrik Date: Sun Apr 11 10:26:47 2010 +0200 multi-part message functionality available via ZMQ_SNDMORE and ZMQ_RCVMORE include/zmq.h | 3 +++ src/socket_base.cpp | 27 ++++++++++++++++++++++----- src/socket_base.hpp | 3 +++ 3 files changed, 28 insertions(+), 5 deletions(-) commit 6fea42258348c8489d2cd64ca0e92981148134f8 Author: Martin Sustrik Date: Sun Apr 11 07:59:03 2010 +0200 getsockopt added to c++ binding include/zmq.hpp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit b668387d917cd80c5d4b9631bc0008b6a014c083 Author: Martin Lucina Date: Sat Apr 10 17:04:33 2010 +0200 Remove -Wxxx gcc-isms from subdir Makefiles configure.in | 6 +++--- devices/zmq_forwarder/Makefile.am | 1 - devices/zmq_queue/Makefile.am | 1 - devices/zmq_streamer/Makefile.am | 1 - perf/Makefile.am | 4 ---- 5 files changed, 3 insertions(+), 10 deletions(-) commit f6fa41dd7b3677d0f7441db83cbd6c8a0283a499 Author: Martin Lucina Date: Sat Apr 10 16:51:22 2010 +0200 Compile perf tests with the C++ compiler This lets us build the binaries in a portable fashion w/o having to worry about how to link with the C++ runtime. configure.in | 7 --- perf/Makefile.am | 8 ++-- perf/local_lat.c | 106 --------------------------------------- perf/local_lat.cpp | 106 +++++++++++++++++++++++++++++++++++++++ perf/local_thr.c | 136 --------------------------------------------------- perf/local_thr.cpp | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/remote_lat.c | 119 -------------------------------------------- perf/remote_lat.cpp | 119 ++++++++++++++++++++++++++++++++++++++++++++ perf/remote_thr.c | 98 ------------------------------------ perf/remote_thr.cpp | 98 ++++++++++++++++++++++++++++++++++++ 10 files changed, 463 insertions(+), 470 deletions(-) commit c214a24f06bb41885dfbd73e42acb6e043df05ef Author: Martin Sustrik Date: Sat Apr 10 16:27:07 2010 +0200 fix for Sun C++ 5.8 src/forwarder.cpp | 2 ++ src/queue.cpp | 2 ++ src/streamer.cpp | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) commit 770aedbd09fb1e11a4e4880da2603a517856c16c Author: Martin Lucina Date: Sat Apr 10 16:18:34 2010 +0200 Build fixes for Solaris and non-GNU compilers Compiling C++ code with -D_POSIX_SOURCE on Solaris is unsupported, so remove it. Isolate GCC-isms inside checks that we are actually using GCC/G++. Only check for -lstdc++ when on GCC and doing static linking. configure.in | 38 ++++++++++++++++++++++++++------------ src/Makefile.am | 2 +- 2 files changed, 27 insertions(+), 13 deletions(-) commit 1dc0380e29fecd70f6299243d81f67db850db616 Author: Martin Lucina Date: Sat Apr 10 13:28:45 2010 +0200 Debian packaging fixes suitable for 0MQ git Removed README.source, TODO.source since these are irrelevant to a generic git package. Fixed spelling in debian/copyright. Removed RFC check in debian/rules, again irrelevant to a generic git package. debian/README.source | 37 ------------------------------------- debian/TODO.source | 5 ----- debian/copyright | 2 +- debian/rules | 6 ------ 4 files changed, 1 insertions(+), 49 deletions(-) commit 8aa2acd0f8906b95232e765da805e3fab947b76b Author: Adrian von Bidder Date: Sat Apr 10 13:23:09 2010 +0200 Debian packaging update from Adrian von Bidder debian/README.Debian | 10 +- debian/README.source | 37 ++++++++ debian/TODO.source | 5 + debian/changelog | 24 ++++- debian/cl-zeromq.files | 7 -- debian/cl-zeromq.install | 6 - debian/cl-zeromq.links | 1 - debian/control | 195 +++++++++++---------------------------- debian/copyright | 105 +++++++++++++++++++-- debian/dirs | 5 - debian/docs | 2 - debian/libzeromq-dev.files | 37 -------- debian/libzeromq-dev.install | 19 ---- debian/libzeromq-python.files | 1 - debian/libzeromq-python.install | 1 - debian/libzeromq-ruby.files | 1 - debian/libzeromq-ruby.install | 1 - debian/libzeromq0.files | 2 - debian/libzeromq0.install | 1 - debian/libzmq-dev.install | 5 + debian/libzmq-dev.manpages | 2 + debian/libzmq0.install | 1 + debian/libzmq0.manpages | 5 + debian/rules | 126 +++++++++---------------- debian/shlibs.local | 1 - debian/source/format | 1 + debian/source/options | 1 + debian/zeromq-bin.install | 3 + debian/zeromq-bin.manpages | 3 + debian/zeromq-examples.files | 2 - debian/zeromq-examples.install | 2 - debian/zeromq-perf.files | 10 -- debian/zeromq-perf.install | 10 -- debian/zeromq-utils.files | 6 - debian/zeromq-utils.install | 6 - 35 files changed, 283 insertions(+), 361 deletions(-) commit 1d28dc9059d0014314ad22d98ddb7c6f21c151e7 Author: Martin Lucina Date: Fri Apr 9 19:15:40 2010 +0200 Fix for Issue #14 Don't fail hard if an unreleased tarball is being built and asciidoc is not installed; instead just print a big fat warning configure.in | 23 +++++++++-------------- 1 files changed, 9 insertions(+), 14 deletions(-) commit 6ea76e95736152e83f977ad860f40a231cedb1ef Author: Martin Sustrik Date: Fri Apr 9 16:24:21 2010 +0200 version bumped to 2.0.7 configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 716f4ac8714d33d21f9853f58482e35c1e3ad934 Author: Martin Sustrik Date: Fri Apr 9 13:04:15 2010 +0200 zmq_getsockopt function added include/zmq.h | 2 + src/options.cpp | 106 ++++++++++++++++++++++++++++++++++++++++++++++++++- src/options.hpp | 1 + src/socket_base.cpp | 7 +++ src/socket_base.hpp | 4 +- src/zmq.cpp | 6 +++ 6 files changed, 122 insertions(+), 4 deletions(-) commit 027bb1d2a7c83c7c719f6bdc3100eb639019d2f0 Author: Martin Sustrik Date: Thu Apr 8 19:20:42 2010 +0200 issue 10 - zmq_strerror problem on Windows src/zmq.cpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 5cd9f74a70e2c8503c29aaca881c193a936b7b44 Author: Martin Sustrik Date: Thu Apr 8 19:04:32 2010 +0200 few fixed related to multi-part messages in REP socket src/rep.cpp | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) commit 77cbd18e9c0480a6c26fd29de5d70569762108be Author: Martin Sustrik Date: Thu Apr 8 11:07:22 2010 +0200 issue 11 - Assertion failed: it != peers.end () (pgm_receiver.cpp:161) src/pgm_receiver.cpp | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) commit 38e9103e0c82bcbb61a9c23ed3a4ace1c7420f95 Author: Martin Sustrik Date: Thu Apr 8 08:33:38 2010 +0200 issue 13 (Assertion failed: load.get () == 0 (epoll.cpp:49)) fixed src/object.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 0f7aab5212ef66f7e292fe4ca891660859972ec4 Merge: 745db9c b0250cc Author: Martin Sustrik Date: Wed Apr 7 11:54:34 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 745db9c574153160214470563bea3b53ab4c292a Author: Martin Sustrik Date: Wed Apr 7 11:54:09 2010 +0200 unitialised member in seesion_t class - fixed src/session.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit b0250cc89df8d6c3d3fff7c8edc17a09ceaaa107 Author: Martin Sustrik Date: Wed Apr 7 10:41:11 2010 +0200 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) commit 065e4d00ff628097ce693ac7d9056fbcaf23d0bc Merge: edfd05d a7973a2 Author: Martin Sustrik Date: Wed Apr 7 08:20:24 2010 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit edfd05df8ef58afc498795cb74906c07ee396f76 Author: Jon Dyte Date: Wed Apr 7 08:20:01 2010 +0200 devices can be created via API devices/zmq_forwarder/zmq_forwarder.cpp | 6 +-- devices/zmq_queue/zmq_queue.cpp | 110 +------------------------------ devices/zmq_streamer/zmq_streamer.cpp | 6 +-- include/zmq.h | 10 +++ include/zmq.hpp | 7 ++ src/Makefile.am | 6 ++ src/forwarder.cpp | 36 ++++++++++ src/forwarder.hpp | 31 +++++++++ src/queue.cpp | 98 +++++++++++++++++++++++++++ src/queue.hpp | 31 +++++++++ src/streamer.cpp | 36 ++++++++++ src/streamer.hpp | 31 +++++++++ src/zmq.cpp | 20 ++++++ 13 files changed, 309 insertions(+), 119 deletions(-) commit a7973a2c4997e2ff79126eb073dc675c574de917 Author: Martin Lucina Date: Tue Apr 6 15:23:13 2010 +0200 Documentation fixes doc/zmq_bind.txt | 6 +++--- doc/zmq_setsockopt.txt | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) commit 0777567e8911382ac42859f907730df023ebec26 Author: Martin Sustrik Date: Tue Apr 6 07:33:52 2010 +0200 ENODEV from zmq_bind error described doc/zmq_bind.txt | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 37fd1a77a6927ae351e10fe8d5b68d0b0d525d22 Author: Martin Hurton Date: Wed Mar 31 15:15:16 2010 +0200 Handle full-pipe for REP sockets more gracefully src/rep.cpp | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit 2f219d7c287cd518bc77b576e507d7a17c9535e9 Author: Martin Sustrik Date: Sat Mar 27 21:25:40 2010 +0100 ZMQ_TBC renamed to ZMQ_MORE include/zmq.h | 4 ++-- src/fq.cpp | 12 ++++++------ src/fq.hpp | 2 +- src/lb.cpp | 12 ++++++------ src/lb.hpp | 2 +- src/pipe.cpp | 6 +++--- src/pub.cpp | 2 +- src/rep.cpp | 22 +++++++++++----------- src/rep.hpp | 2 +- src/req.cpp | 20 ++++++++++---------- src/req.hpp | 2 +- src/session.cpp | 2 +- src/socket_base.cpp | 6 +++--- src/sub.cpp | 14 +++++++------- src/sub.hpp | 2 +- src/zmq_encoder.cpp | 6 +++--- 16 files changed, 58 insertions(+), 58 deletions(-) commit 842b4dd2e492459cbc0cc79ffdb34ddab8f0b528 Author: Martin Sustrik Date: Sat Mar 27 14:57:56 2010 +0100 muti-part message functionality available via API include/zmq.h | 1 + src/socket_base.cpp | 5 +++++ 2 files changed, 6 insertions(+), 0 deletions(-) commit 8d8e0857be3d2ab941de443e436061ef82752c17 Author: Martin Sustrik Date: Sat Mar 27 14:50:35 2010 +0100 as advertised, zmq_flush and ZMQ_NOFLUSH were removed include/zmq.h | 2 -- src/zmq.cpp | 6 ------ 2 files changed, 0 insertions(+), 8 deletions(-) commit 06538fc11790a0cf895c43d137a33febf97f3a28 Author: Martin Sustrik Date: Sat Mar 27 14:24:57 2010 +0100 multi-part messages work with REQ/REP sockets src/rep.cpp | 71 +++++++++++++++++++++++++++++++++++++++-------------------- src/rep.hpp | 9 +++++- src/req.cpp | 61 +++++++++++++++++++++++++++++++++----------------- src/req.hpp | 9 +++++- 4 files changed, 101 insertions(+), 49 deletions(-) commit bbfac783f91f6692b7f9c0aa5392ac955f7b49bf Author: Martin Sustrik Date: Sat Mar 27 09:43:49 2010 +0100 multi-part message work with UPSTREAM/DOWNSTREAM src/lb.cpp | 25 +++++++++++++++++++------ src/lb.hpp | 3 +++ 2 files changed, 22 insertions(+), 6 deletions(-) commit ed291b02516ac5c9fe01f328d505305d36fe6319 Author: Martin Sustrik Date: Sat Mar 27 09:24:38 2010 +0100 multi-part messages work with PUB/SUB src/fq.cpp | 31 +++++++++++++++++++++++++------ src/fq.hpp | 4 ++++ src/pipe.cpp | 10 ++++++++-- src/pub.cpp | 3 ++- src/sub.cpp | 27 +++++++++++++++++++++++++-- src/sub.hpp | 4 ++++ src/ypipe.hpp | 2 +- 7 files changed, 69 insertions(+), 12 deletions(-) commit 0b9897b141ae03ccd00132a638d030a2521cf5b3 Merge: 0a53ff7 783463a Author: Martin Sustrik Date: Fri Mar 26 12:15:47 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 783463ac49aeb2d1be57dc9b3669d508187415a8 Author: Martin Lucina Date: Thu Mar 25 17:31:18 2010 +0100 Clarify use of poll() with C++ API, fix typo doc/zmq_cpp.txt | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit c802a72a0b4aae06cd65158af3c65e65e0dfc2e0 Author: Vitaly Mayatskikh Date: Mon Mar 22 22:31:37 2010 +0100 configure does not mention xmlto when missing configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0a53ff7b9f8a212793c540535c322bfaa93d3430 Merge: f031677 93bdb79 Author: Martin Sustrik Date: Sat Mar 20 19:51:29 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 93bdb792a92b9bd235c7be47a13febf429568301 Author: Martin Sustrik Date: Sat Mar 20 19:50:36 2010 +0100 PUB socket was blocking occassionally - fixed src/pub.cpp | 84 ++++++++++++++++++++++++++-------------------------------- src/pub.hpp | 17 ++++++----- 2 files changed, 47 insertions(+), 54 deletions(-) commit f031677100b41347e09932fc973040097a2187e4 Author: Martin Sustrik Date: Sat Mar 20 15:04:30 2010 +0100 rollback of half-processed messages in case of disconnection src/session.cpp | 27 ++++++++++++++++++++++++++- src/session.hpp | 4 ++++ 2 files changed, 30 insertions(+), 1 deletions(-) commit dfdaff5eba1e6980adb3326c119d2070d0ad42bb Author: Martin Sustrik Date: Sat Mar 20 10:58:59 2010 +0100 XREP-style prefixing/trimming messages removed src/i_engine.hpp | 10 ++-------- src/options.cpp | 3 +-- src/options.hpp | 3 --- src/pgm_receiver.cpp | 12 ------------ src/pgm_receiver.hpp | 2 -- src/pgm_sender.cpp | 12 ------------ src/pgm_sender.hpp | 2 -- src/session.cpp | 5 ----- src/xrep.cpp | 5 ++--- src/zmq_decoder.cpp | 48 +++++++----------------------------------------- src/zmq_decoder.hpp | 8 -------- src/zmq_encoder.cpp | 31 ++++--------------------------- src/zmq_encoder.hpp | 6 ------ src/zmq_engine.cpp | 10 ---------- src/zmq_engine.hpp | 2 -- src/zmq_init.cpp | 3 +-- 16 files changed, 17 insertions(+), 145 deletions(-) commit cbaf10978a8ffa98d98161aeec8d020c517b127b Author: Martin Sustrik Date: Fri Mar 19 09:14:26 2010 +0100 fixes for building with Sun CC src/dispatcher.cpp | 3 ++- src/tcp_listener.cpp | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) commit ae35a1644cd8f2441de73f1260c46bb0da6a1605 Author: Martin Sustrik Date: Tue Mar 16 19:02:50 2010 +0100 fix include paths in perf on Win32 perf/local_lat.c | 2 +- perf/local_thr.c | 2 +- perf/remote_lat.c | 2 +- perf/remote_thr.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 49a30d49f37148db1be105615668998c8fb8ea86 Author: Martin Sustrik Date: Tue Mar 16 17:49:39 2010 +0100 Update contributors for 2.0.6 AUTHORS | 96 +++++++++++++++++++++++++++++++----------------------------- ChangeLog | 19 +++++++---- 2 files changed, 62 insertions(+), 53 deletions(-) commit fe18ce1abab2ef43f97ef6f2b093a69f42cb7103 Author: Martin Sustrik Date: Tue Mar 16 17:11:23 2010 +0100 ChangeLog for v2.0.6 ChangeLog | 1499 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 1499 insertions(+), 0 deletions(-) commit 38c942ae648115ac10320968eb4b5e235ef15674 Author: Martin Sustrik Date: Tue Mar 16 17:07:17 2010 +0100 Add Git location to README README | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 6d5a9e96400025044af8172887ef99589c0d1eb1 Author: Martin Sustrik Date: Tue Mar 16 16:20:23 2010 +0100 Update README README | 39 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 37 insertions(+), 2 deletions(-) commit ad75d0213483f3c585ce144386623e64e65eca0d Author: Martin Sustrik Date: Tue Mar 16 15:48:16 2010 +0100 Add MSVC build files to distribution .gitignore | 12 ++++-------- Makefile.am | 2 +- builds/msvc/Makefile.am | 12 ++++++++++++ configure.in | 3 ++- 4 files changed, 19 insertions(+), 10 deletions(-) commit a9e0c3cd7e0c54f872749f387cf3d69b216bc613 Author: Martin Sustrik Date: Tue Mar 16 15:37:47 2010 +0100 Removing leftover MSVC builds builds/msvc/display/display.vcproj | 176 ------------------------------------ builds/msvc/prompt/prompt.vcproj | 176 ------------------------------------ 2 files changed, 0 insertions(+), 352 deletions(-) commit 5472861179ff232c55e7a7021a93da5c680f2017 Merge: 8a3f974 8fcf6ff Author: Martin Sustrik Date: Tue Mar 16 15:24:57 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 8a3f97400a2b3ef2ec088a00868087b85cfd81b6 Author: Martin Sustrik Date: Tue Mar 16 15:23:55 2010 +0100 Clarify zmq_poll restrictions doc/zmq_poll.txt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 1705ec224745b935e13d8f18ef81bcbef45ff143 Author: Martin Lucina Date: Tue Mar 16 15:19:38 2010 +0100 C++ interface documentation updates doc/zmq_cpp.txt | 195 ++++++++++++++++++++++++++++++++++++++++++------------ 1 files changed, 151 insertions(+), 44 deletions(-) commit 8fcf6ffb67aba2ff9f78f4ba327d29755f03535a Author: Martin Lucina Date: Mon Mar 15 15:47:17 2010 +0100 Cleanups to autogen.sh autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit fceba036279a0e9bb39aebd862b70ad1bb5b3f40 Author: Martin Lucina Date: Mon Mar 15 15:45:38 2010 +0100 Cleanups to autogen.sh Use POSIX "command -v" construct to test for prerequisite commands Clarify error messages on failure autogen.sh | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-) commit 61ad236e9543a569fe066872a5fda4fa40ea7591 Author: Martin Sustrik Date: Sat Mar 13 14:40:10 2010 +0100 ZMQ_NOFLUSH and zmq_flush obsoleted doc/Makefile.am | 2 +- doc/zmq.txt | 1 - doc/zmq_flush.txt | 55 --------------------------------------------------- doc/zmq_send.txt | 8 ------- doc/zmq_socket.txt | 1 - include/zmq.hpp | 7 ------ src/downstream.cpp | 10 --------- src/downstream.hpp | 1 - src/lb.cpp | 3 +- src/p2p.cpp | 10 +-------- src/p2p.hpp | 1 - src/pub.cpp | 17 ++------------- src/pub.hpp | 1 - src/rep.cpp | 6 ----- src/rep.hpp | 1 - src/req.cpp | 6 ----- src/req.hpp | 1 - src/socket_base.cpp | 5 ---- src/socket_base.hpp | 2 - src/sub.cpp | 6 ----- src/sub.hpp | 1 - src/upstream.cpp | 6 ----- src/upstream.hpp | 1 - src/xrep.cpp | 6 ----- src/xrep.hpp | 1 - src/xreq.cpp | 7 ------ src/xreq.hpp | 1 - src/zmq.cpp | 3 +- 28 files changed, 8 insertions(+), 162 deletions(-) commit c42343d3f027248514344aec9e3814dfe1047d59 Author: Martin Sustrik Date: Sat Mar 13 12:34:55 2010 +0100 pipe_t::rollback removes only unfinished message from the pipe rather than all unflushed messages src/pipe.cpp | 4 ++++ src/pipe.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit dcb983699e52bf2e075baaeef250bcd3c82e4846 Author: Martin Sustrik Date: Sat Mar 13 08:59:46 2010 +0100 zmq_queue implementation added devices/zmq_queue/zmq_queue.cpp | 114 +++++++++++++++++++++++++++++++++++++-- 1 files changed, 109 insertions(+), 5 deletions(-) commit 22db38bf3d9c96a840af50300632d44fd01ed3a8 Author: unknown Date: Fri Mar 12 20:20:25 2010 +0100 MSVC build: C++ perf tests removed; all executables go into bin directory builds/msvc/c_local_lat/c_local_lat.vcproj | 8 +- builds/msvc/c_local_thr/c_local_thr.vcproj | 8 +- builds/msvc/c_remote_lat/c_remote_lat.vcproj | 8 +- builds/msvc/c_remote_thr/c_remote_thr.vcproj | 8 +- builds/msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 ---------------------- builds/msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 ---------------------- builds/msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 ---------------------- builds/msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 ---------------------- builds/msvc/msvc.sln | 44 +----- builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 2 + builds/msvc/zmq_queue/zmq_queue.vcproj | 2 + builds/msvc/zmq_streamer/zmq_streamer.vcproj | 2 + 12 files changed, 26 insertions(+), 760 deletions(-) commit c08a7f8896e8fdae8379d2fce552b360daaeadc8 Author: Martin Sustrik Date: Fri Mar 12 20:02:19 2010 +0100 C perf tests are built non-optionally; C++ perf tests removed Makefile.am | 6 +-- configure.in | 26 +--------- perf/Makefile.am | 131 ++++++++++++++++++++++++++++++++++++++++++++- perf/c/Makefile.am | 129 -------------------------------------------- perf/c/local_lat.c | 106 ------------------------------------ perf/c/local_thr.c | 136 ----------------------------------------------- perf/c/remote_lat.c | 119 ----------------------------------------- perf/c/remote_thr.c | 98 ---------------------------------- perf/cpp/Makefile.am | 20 ------- perf/cpp/local_lat.cpp | 52 ------------------ perf/cpp/local_thr.cpp | 71 ------------------------ perf/cpp/remote_lat.cpp | 63 ---------------------- perf/cpp/remote_thr.cpp | 54 ------------------- perf/local_lat.c | 106 ++++++++++++++++++++++++++++++++++++ perf/local_thr.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++ perf/remote_lat.c | 119 +++++++++++++++++++++++++++++++++++++++++ perf/remote_thr.c | 98 ++++++++++++++++++++++++++++++++++ 17 files changed, 590 insertions(+), 880 deletions(-) commit 1fbeba2fe3c3bd6046eea4d6432791194d4238f2 Author: Martin Sustrik Date: Fri Mar 12 19:05:56 2010 +0100 simplify configuration summary configure.in | 19 ++++--------------- 1 files changed, 4 insertions(+), 15 deletions(-) commit 66b67fbdf2b047ef7adb8ec018a6fe89dd9cbfca Author: Martin Sustrik Date: Fri Mar 12 18:58:29 2010 +0100 devices are built unconditionally configure.in | 34 ---------------------------------- devices/Makefile.am | 13 +------------ src/req.cpp | 2 +- 3 files changed, 2 insertions(+), 47 deletions(-) commit 430aa533347dcbca57857d318a6898f480967cba Author: Martin Sustrik Date: Fri Mar 12 18:42:38 2010 +0100 text concerning language bindings removed from configure configure.in | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) commit 54df388aced3ae059009eec3df66c7dea717747b Author: unknown Date: Fri Mar 12 18:05:38 2010 +0100 Java binding removed from MSVC build builds/msvc/j_local_lat/j_local_lat.vcproj | 78 -------- builds/msvc/j_local_thr/j_local_thr.vcproj | 78 -------- builds/msvc/j_remote_lat/j_remote_lat.vcproj | 78 -------- builds/msvc/j_remote_thr/j_remote_thr.vcproj | 78 -------- builds/msvc/java/java.vcproj | 272 -------------------------- builds/msvc/msvc.sln | 45 ----- 6 files changed, 0 insertions(+), 629 deletions(-) commit 6badd204d5686de8b2a6e8ee88da78260c0ff949 Author: Martin Hurton Date: Wed Mar 3 17:25:46 2010 +0100 Implement flow control for ZMQ_REP sockets src/rep.cpp | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 923609b0922c3bf07f16c8c99aba4fe98f08ef60 Author: Martin Hurton Date: Tue Mar 2 22:23:34 2010 +0100 Implement flow control for ZMQ_REQ sockets src/req.cpp | 98 ++++++++++++++++++++++++++++++++++++++++++++++------------ src/req.hpp | 3 ++ 2 files changed, 80 insertions(+), 21 deletions(-) commit 42e575cb6b62fe1e5d12d2e4fb5c6874d47eb57e Author: Martin Hurton Date: Tue Mar 2 12:41:33 2010 +0100 Implement flow control fox ZMQ_XREP sockets src/xrep.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) commit e34184acc327ae4b085a1a50ff6502e2dc148522 Author: Martin Hurton Date: Tue Mar 2 11:15:50 2010 +0100 Implement flow control for ZMQ_XREQ sockets src/xreq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 06d7a447378c8e9f0805c219deaf8e7e7ef1eeb0 Author: Martin Hurton Date: Tue Mar 2 10:48:30 2010 +0100 Implement flow control for ZMQ_PUB sockets src/pub.cpp | 34 ++++++++++++++++++++++++++-------- src/pub.hpp | 7 +++++++ 2 files changed, 33 insertions(+), 8 deletions(-) commit f9c84a1a689f4f64cfa45cb22d4f02ec246c7f93 Author: Martin Hurton Date: Mon Mar 1 17:21:23 2010 +0100 Implement flow control for ZMQ_DOWNSTREAM sockets src/downstream.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5d4f6b18cd57897cc0e77e474118e104a0d5cfc3 Author: Martin Hurton Date: Mon Mar 1 16:55:13 2010 +0100 Implement flow control for ZMQ_P2P sockets src/p2p.cpp | 21 +++++++++++++++------ src/p2p.hpp | 1 + 2 files changed, 16 insertions(+), 6 deletions(-) commit f9521c6b6a35103c03b742a311a34d7b04da0b84 Author: Martin Hurton Date: Tue Mar 2 09:02:40 2010 +0100 PGM: implement flow control src/pgm_receiver.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++---- src/pgm_receiver.hpp | 9 +++++++++ 2 files changed, 55 insertions(+), 4 deletions(-) commit 61ee6fae536a8000be87b5aaf271f6519a3b7d3f Author: Martin Hurton Date: Mon Mar 1 10:13:26 2010 +0100 Implement flow control This commit introduces the necessary changes necessary for implementing flow control. None of the socket types implements the flow control yet. The code will crash when the flow control is enabled and the thw lwm is reached. The following commits will add flow-control support for individual socket types. src/command.hpp | 8 +++++++ src/downstream.cpp | 6 ++++- src/downstream.hpp | 1 + src/err.hpp | 6 +++++ src/i_endpoint.hpp | 1 + src/i_engine.hpp | 2 + src/lb.cpp | 49 +++++++++++++++++++----------------------- src/lb.hpp | 1 - src/object.cpp | 19 ++++++++++++++++ src/object.hpp | 3 ++ src/options.cpp | 8 +++--- src/options.hpp | 4 +- src/p2p.cpp | 11 ++++++--- src/p2p.hpp | 1 + src/pgm_receiver.cpp | 5 ++++ src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 5 ++++ src/pgm_sender.hpp | 1 + src/pipe.cpp | 57 ++++++++++++++++++++++++++++++++++++++++--------- src/pipe.hpp | 29 ++++++++++++++++-------- src/pub.cpp | 16 ++++++++++--- src/pub.hpp | 1 + src/rep.cpp | 10 +++++++- src/rep.hpp | 1 + src/req.cpp | 11 ++++++--- src/req.hpp | 1 + src/session.cpp | 7 ++++++ src/session.hpp | 1 + src/socket_base.cpp | 5 ++++ src/socket_base.hpp | 2 + src/sub.cpp | 5 ++++ src/sub.hpp | 1 + src/upstream.cpp | 5 ++++ src/upstream.hpp | 1 + src/xrep.cpp | 8 ++++++- src/xrep.hpp | 1 + src/xreq.cpp | 6 ++++- src/xreq.hpp | 1 + src/zmq_engine.cpp | 17 ++++++++++---- src/zmq_engine.hpp | 1 + 40 files changed, 242 insertions(+), 77 deletions(-) commit 31d36104aa7caead6f299f0c5cb58a9fde7cf9b0 Author: Martin Lucina Date: Fri Mar 12 10:34:11 2010 +0100 devices/ build fixed devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 10bbe6af9900b4609cfcadc031dcf4dcb8ebfb3b Author: Martin Lucina Date: Thu Mar 11 20:43:51 2010 +0100 Cleanup .gitignore .gitignore | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-) commit 27e2d08449ea52649e2e42b263f76fbd5d8382c5 Author: Martin Lucina Date: Thu Mar 11 20:33:27 2010 +0100 Restructure language bindings C and C++ headers moved from bindings/ to include/, bindings/ removed --with-c and --with-cpp options to configure removed, C and C++ now built and installed by default bindings/c/zmq.h | 249 --------------------------------------------- bindings/cpp/zmq.hpp | 266 ------------------------------------------------- configure.in | 32 +------ include/zmq.h | 249 +++++++++++++++++++++++++++++++++++++++++++++ include/zmq.hpp | 266 +++++++++++++++++++++++++++++++++++++++++++++++++ perf/Makefile.am | 10 +-- perf/c/Makefile.am | 2 +- perf/cpp/Makefile.am | 2 +- src/Makefile.am | 12 +-- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/downstream.cpp | 2 +- src/err.cpp | 2 +- src/fq.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/lb.cpp | 2 +- src/msg_content.hpp | 2 +- src/options.cpp | 2 +- src/p2p.cpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/pub.cpp | 2 +- src/rep.cpp | 2 +- src/req.cpp | 2 +- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_listener.cpp | 2 +- src/upstream.cpp | 2 +- src/xrep.cpp | 2 +- src/xreq.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 37 files changed, 549 insertions(+), 595 deletions(-) commit 90944759b66771bbe399922eecedc5095fa2a509 Author: Martin Lucina Date: Thu Mar 11 20:12:55 2010 +0100 Removed Java binding from core distribution Makefile.am | 4 +- bindings/Makefile.am | 7 - bindings/java/Context.cpp | 112 ------------ bindings/java/Makefile.am | 72 -------- bindings/java/Poller.cpp | 126 ------------- bindings/java/Socket.cpp | 345 ------------------------------------ bindings/java/org/zmq/Context.java | 58 ------ bindings/java/org/zmq/Poller.java | 135 -------------- bindings/java/org/zmq/Socket.java | 134 -------------- configure.in | 73 +------- perf/Makefile.am | 8 +- perf/java/Makefile.am | 5 - perf/java/local_lat.java | 55 ------ perf/java/local_thr.java | 71 -------- perf/java/remote_lat.java | 60 ------- perf/java/remote_thr.java | 57 ------ 16 files changed, 9 insertions(+), 1313 deletions(-) commit 9fda070e4d66d538e3c709c6cb8934cbf4442c29 Author: Martin Lucina Date: Wed Mar 10 23:20:43 2010 +0100 Typeset literal correctly doc/zmq_pgm.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 0a1e0beaa2849a51ea659eba0f142ce340d2cc6d Author: Martin Lucina Date: Wed Mar 10 23:18:08 2010 +0100 Fixes to PGM wire format description doc/zmq_pgm.txt | 69 ++++++++++++++++++++++++++++++------------------------ 1 files changed, 38 insertions(+), 31 deletions(-) commit 5fef480aeb28424769d97c92f331d87f87b87c85 Author: Martin Lucina Date: Wed Mar 10 13:52:41 2010 +0100 Fixes to TCP wire format specification doc/zmq_tcp.txt | 42 ++++++++++++++++++++++++++---------------- 1 files changed, 26 insertions(+), 16 deletions(-) commit 8f90ae8dfdf5efbb6c8429897dc95cad621af00b Author: Martin Sustrik Date: Wed Mar 10 12:40:13 2010 +0100 wire formats in docs clarified doc/zmq_pgm.txt | 40 +++++++++++++++++++++++++++++++--------- doc/zmq_tcp.txt | 22 +++++++++++++--------- 2 files changed, 44 insertions(+), 18 deletions(-) commit 98801ebcaea1117ae596a3bae0653c3720a94359 Author: Martin Lucina Date: Wed Mar 10 12:19:39 2010 +0100 Documentation fixes doc/zmq.txt | 3 ++- doc/zmq_bind.txt | 4 ++-- doc/zmq_close.txt | 2 +- doc/zmq_connect.txt | 4 ++-- doc/zmq_flush.txt | 2 +- doc/zmq_msg_close.txt | 2 +- doc/zmq_msg_copy.txt | 2 +- doc/zmq_msg_init.txt | 2 +- doc/zmq_msg_init_data.txt | 2 +- doc/zmq_msg_init_size.txt | 2 +- doc/zmq_msg_move.txt | 2 +- doc/zmq_poll.txt | 13 +++++++------ doc/zmq_recv.txt | 2 +- doc/zmq_send.txt | 2 +- doc/zmq_setsockopt.txt | 18 ++++++++---------- doc/zmq_socket.txt | 7 ++++--- doc/zmq_term.txt | 2 +- 17 files changed, 36 insertions(+), 35 deletions(-) commit bc468b34513a0fd76e69e03f3f978abd7d8c3871 Author: Martin Lucina Date: Tue Mar 9 19:29:41 2010 +0100 Add missing section with zmq_version() doc/zmq.txt | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit edebff902a9785ecdb3a27f6a78ac7cc68b38a56 Author: Martin Lucina Date: Tue Mar 9 18:58:59 2010 +0100 Add dependency for zmq_epgm.7 doc/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ca70b40383fd12ce866054dd87cecb3d732c8d9f Author: Martin Lucina Date: Tue Mar 9 18:53:42 2010 +0100 Hack, zmq_epgm.7 needs to be copied from zmq_pgm.7 doc/Makefile.am | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 1aee86408d575d6572b071d7564da7f006d1757e Author: Martin Lucina Date: Tue Mar 9 18:47:31 2010 +0100 Documentation rewrite doc/Makefile.am | 4 +- doc/asciidoc.conf | 8 + doc/zmq.txt | 227 ++++++++++++++++++------------ doc/zmq_bind.txt | 60 +++++--- doc/zmq_close.txt | 37 ++--- doc/zmq_connect.txt | 60 +++++--- doc/zmq_epgm.txt | 1 + doc/zmq_flush.txt | 48 +++---- doc/zmq_forwarder.txt | 17 ++- doc/zmq_init.txt | 52 ++++---- doc/zmq_inproc.txt | 85 ++++++++--- doc/zmq_ipc.txt | 72 +++++++--- doc/zmq_java.txt | 27 ---- doc/zmq_msg_close.txt | 43 +++--- doc/zmq_msg_copy.txt | 46 +++---- doc/zmq_msg_data.txt | 32 ++--- doc/zmq_msg_init.txt | 29 +++-- doc/zmq_msg_init_data.txt | 51 ++++--- doc/zmq_msg_init_size.txt | 51 +++---- doc/zmq_msg_move.txt | 38 +++--- doc/zmq_msg_size.txt | 35 ++--- doc/zmq_pgm.txt | 174 +++++++++++++---------- doc/zmq_poll.txt | 122 +++++++++++----- doc/zmq_queue.txt | 17 ++- doc/zmq_recv.txt | 53 ++++--- doc/zmq_send.txt | 66 +++++---- doc/zmq_setsockopt.txt | 348 ++++++++++++++++++++++++++++++--------------- doc/zmq_socket.txt | 184 +++++++++++++------------ doc/zmq_streamer.txt | 17 ++- doc/zmq_strerror.txt | 25 ++-- doc/zmq_tcp.txt | 129 ++++++++++++------ doc/zmq_term.txt | 33 ++--- doc/zmq_udp.txt | 56 ------- doc/zmq_version.txt | 23 ++- 34 files changed, 1297 insertions(+), 973 deletions(-) commit d790940fd06060c8a2c624b0e41e470ad31ae0d8 Author: Martin Sustrik Date: Tue Mar 9 18:14:49 2010 +0100 udp transport renamed to epgm configure.in | 4 ++-- src/socket_base.cpp | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) commit 5a776f5597cac632ca507e2d80ca0de064bba1d6 Author: Martin Sustrik Date: Tue Mar 9 17:34:28 2010 +0100 PGM late joiners would start receiving a complete message rather than a message part src/zmq_encoder.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 0f891e091cc46775226ee1fe28784876395a7b92 Author: Martin Sustrik Date: Tue Mar 9 17:24:42 2010 +0100 message flags from the wire are written to zmq_msg_t and vice versa src/zmq_decoder.cpp | 4 ++-- src/zmq_encoder.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 531c6af0d4df606ddef15da821dad20399b9480a Author: Martin Sustrik Date: Tue Mar 9 16:56:53 2010 +0100 message flags added to zmq_msg_t strcuture bindings/c/zmq.h | 14 +++++++++----- src/pipe.cpp | 2 +- src/pub.cpp | 4 ++-- src/zmq.cpp | 14 ++++++++------ 4 files changed, 20 insertions(+), 14 deletions(-) commit 96ccc1c5fceb56bd7ffc2e6bef9ddab5347d722b Author: Martin Sustrik Date: Tue Mar 9 15:10:44 2010 +0100 'flags' fields added to the wire format src/zmq_decoder.cpp | 40 +++++++++++++++++++++++++++++----------- src/zmq_decoder.hpp | 1 + src/zmq_encoder.cpp | 11 ++++++++--- src/zmq_encoder.hpp | 2 +- 4 files changed, 39 insertions(+), 15 deletions(-) commit e04e2cdbbaf351eb04164bdcd293fcb8fa22a9a4 Author: Martin Sustrik Date: Tue Mar 9 08:43:20 2010 +0100 rollback functionality added to pipe src/pipe.cpp | 13 +++++++++++++ src/pipe.hpp | 3 +++ src/ypipe.hpp | 11 +++++++++++ src/yqueue.hpp | 37 ++++++++++++++++++++++++++++++++++++- 4 files changed, 63 insertions(+), 1 deletions(-) commit 9481c69b0f60068f12aa26699588fed6a8faceec Author: Martin Sustrik Date: Sat Mar 6 16:32:19 2010 +0100 problem with NIC name resolution on OSX fixed src/ip.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 26b0aea24f9add0a1811e23f709d96b44b459571 Author: Martin Lucina Date: Wed Mar 3 17:01:08 2010 +0100 Win32 build fixes configure.in | 8 ++++---- src/Makefile.am | 4 ++++ src/ip.hpp | 10 +++++----- src/uuid.hpp | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) commit 352da8ae8775f057a7ec67a7bd3f2270ac1c4d0f Author: unknown Date: Wed Mar 3 15:47:21 2010 +0100 type mismatch in tcp_listener (win version) fixed src/tcp_listener.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 14054ecce7d367d8e3d47f84f72d2fc748aec8e4 Author: Martin Hurton Date: Wed Mar 3 09:41:57 2010 +0100 Fix typo: zmq_close -> zmq_msg_close src/rep.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 708298d798693a19ace9a4811a3760d8de0a5c1d Author: Martin Hurton Date: Wed Mar 3 00:08:11 2010 +0100 Fix possible lockups when reading from ZMQ_REP sockets src/rep.cpp | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) commit 157a66fc42d46c79edc01f6feed8f482fb5d53f1 Author: unknown Date: Mon Mar 1 18:33:16 2010 +0100 polling on POSIX sockets returns POLLERR (win32) src/zmq.cpp | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) commit 4e7158b67dcbbc307e76616a85aa34cc83ad6606 Author: Martin Sustrik Date: Mon Mar 1 17:40:39 2010 +0100 return POLLERR from polling on POSIX sockets (linux version) src/zmq.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 7442f53956e5d32d9c6a3543f8bef1664a773926 Merge: ea0a44c 83f85ea Author: Martin Sustrik Date: Sat Feb 27 14:18:21 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ea0a44c8a964cad4276ec216319d32e95e4a4bc0 Author: Martin Sustrik Date: Sat Feb 27 14:18:02 2010 +0100 Ruby binding removed bindings/Makefile.am | 8 +- bindings/ruby/Makefile.am | 11 -- bindings/ruby/extconf.rb | 28 ----- bindings/ruby/rbzmq.cpp | 288 --------------------------------------------- configure.in | 57 +--------- perf/Makefile.am | 8 +- perf/ruby/Makefile.am | 1 - perf/ruby/local_lat.rb | 41 ------- perf/ruby/local_thr.rb | 61 ---------- perf/ruby/remote_lat.rb | 53 -------- perf/ruby/remote_thr.rb | 45 ------- 11 files changed, 7 insertions(+), 594 deletions(-) commit 83f85ea51dee1fb2fcee22543a90361b860d6cb8 Author: unknown Date: Sat Feb 27 13:49:53 2010 +0100 ruby binding removed from msvc build builds/msvc/msvc.sln | 9 ----- builds/msvc/ruby/ruby.vcproj | 68 ------------------------------------------ 2 files changed, 0 insertions(+), 77 deletions(-) commit 696ada883331359bee76b1ea996d8ac846624bea Author: unknown Date: Sat Feb 27 13:36:52 2010 +0100 python binding removed from nsvc build builds/msvc/msvc.sln | 8 -- builds/msvc/python/python.vcproj | 176 -------------------------------------- 2 files changed, 0 insertions(+), 184 deletions(-) commit 45414b5444db0a1f7e325c7dce92fbe84667d093 Author: Martin Sustrik Date: Sat Feb 27 12:23:22 2010 +0100 python binding removed bindings/Makefile.am | 8 +- bindings/python/Makefile.am | 7 - bindings/python/pyzmq.cpp | 556 ------------------------------------------- bindings/python/setup.py.in | 14 - configure.in | 65 +----- doc/Makefile.am | 2 +- doc/zmq.txt | 3 - doc/zmq_python.txt | 27 -- perf/Makefile.am | 9 +- perf/python/Makefile.am | 1 - perf/python/local_lat.py | 49 ---- perf/python/local_thr.py | 70 ------ perf/python/remote_lat.py | 61 ----- perf/python/remote_thr.py | 53 ---- 14 files changed, 11 insertions(+), 914 deletions(-) commit efefa069b2ce407a7da4328ab024c47920a76960 Author: Martin Lucina Date: Fri Feb 26 20:03:58 2010 +0100 Cygwin support configure.in | 7 +++++++ src/uuid.cpp | 3 ++- src/uuid.hpp | 6 ++++-- 3 files changed, 13 insertions(+), 3 deletions(-) commit deda7ca54a3c8f1ba735e8654ca87f8808606122 Author: Martin Sustrik Date: Fri Feb 26 17:28:09 2010 +0100 Java Poller patch .gitignore | 3 + bindings/java/Context.cpp | 106 ------------------------------------ bindings/java/Makefile.am | 22 ++++++-- bindings/java/org/zmq/Context.java | 18 ------ 4 files changed, 21 insertions(+), 128 deletions(-) commit 4a1a83887d6faf36cb01f1c69142e6aafafe5eba Author: unknown Date: Fri Feb 26 16:42:52 2010 +0100 Win32 build of Java binding fixed builds/msvc/java/java.vcproj | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) commit 4440b13c359dab2c1ba55e31c604ac093172d68e Author: Martin Sustrik Date: Fri Feb 26 15:55:36 2010 +0100 Poller object implemented in Java binding bindings/java/Poller.cpp | 126 ++++++++++++++++++++++++++++++++++ bindings/java/org/zmq/Poller.java | 135 +++++++++++++++++++++++++++++++++++++ 2 files changed, 261 insertions(+), 0 deletions(-) commit 1c4daf79ce12da75acb8010c99b3c1d509a7a950 Author: Martin Sustrik Date: Fri Feb 26 14:28:20 2010 +0100 MIT license text added COPYING.LESSER | 31 ++++++++++++++++++++++++++++--- 1 files changed, 28 insertions(+), 3 deletions(-) commit 57e057c825156b6effd15c07ee302f4ccdd2561c Author: Martin Sustrik Date: Thu Feb 25 16:29:17 2010 +0100 1st version of Java poll added bindings/java/Context.cpp | 140 ++++++++++++++++++++++++++++++------ bindings/java/Socket.cpp | 89 +++++++++-------------- bindings/java/org/zmq/Context.java | 21 +++++- bindings/java/org/zmq/Socket.java | 5 +- 4 files changed, 173 insertions(+), 82 deletions(-) commit ed8fe68383ca94ca33a9919bc2ed5b5a5d62cab0 Author: Martin Sustrik Date: Wed Feb 24 17:27:31 2010 +0100 handle invalid PGM connection string decently src/pgm_socket.cpp | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) commit be51cfa419bb6c75eb24d241769a7c5543c432a7 Merge: 0b4172b b7f01f9 Author: Martin Sustrik Date: Wed Feb 24 16:19:53 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 0b4172b8689b60ce254c6823d69962bbdbd031d4 Author: Martin Sustrik Date: Wed Feb 24 16:19:14 2010 +0100 minor cast issues on cygwin fixed src/ip.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit b7f01f9071c26292c30517bac18dae92efaf3ffb Author: unknown Date: Wed Feb 24 15:33:03 2010 +0100 chat example removed from win build; missing fd_signaler_t::poll on win added builds/msvc/msvc.sln | 18 ------------------ src/fd_signaler.cpp | 26 +++++++++++++++++++------- 2 files changed, 19 insertions(+), 25 deletions(-) commit 476ebde6280a428e2dd8fee7c70670aa449831c9 Author: Martin Sustrik Date: Wed Feb 24 13:02:29 2010 +0100 use binary UUIDs instead of string representation to save some bytes src/uuid.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++++++------ src/uuid.hpp | 22 +++++++++++-- src/zmq_init.cpp | 6 ++-- 3 files changed, 98 insertions(+), 17 deletions(-) commit cc5c30f5dc2d6490c0199709ceb2d86e3cc3895d Author: Martin Lucina Date: Wed Feb 24 12:09:24 2010 +0100 Fix: OpenPGM is now distributed as .tar.gz Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit bba36e6ee6ecdee5f3ded30b9f11e7684393bfd2 Author: Martin Lucina Date: Wed Feb 24 12:07:24 2010 +0100 Disable IPv6 support The current IPv6 support is half-assed and breaks for too many people. Revert back to IPv4 only for now. src/ip.cpp | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) commit 39b89619742cf4aed25a5b3ccc5ff6d23d9d15cf Author: Martin Lucina Date: Wed Feb 24 09:41:10 2010 +0100 Update OpenPGM to 2.0.24 (stable) .gitignore | 1 + configure.in | 16 ++++++++-------- foreign/openpgm/libpgm-2.0.23rc8.tar.bz2 | Bin 321822 -> 0 bytes foreign/openpgm/libpgm-2.0.24.tar.gz | Bin 0 -> 407110 bytes 4 files changed, 9 insertions(+), 8 deletions(-) commit ccd47f1ee8c9268b99478c6cce3d8b1aada62566 Author: Martin Sustrik Date: Wed Feb 24 09:17:05 2010 +0100 chat example moved to separate repo Makefile.am | 4 +- configure.in | 13 +-------- examples/Makefile.am | 7 ----- examples/chat/Makefile.am | 11 ------- examples/chat/README | 42 ---------------------------- examples/chat/display.cpp | 50 --------------------------------- examples/chat/prompt.cpp | 67 --------------------------------------------- 7 files changed, 3 insertions(+), 191 deletions(-) commit 8980a985828579d03f031b18a1bebcd65eded417 Author: Martin Sustrik Date: Wed Feb 24 08:29:29 2010 +0100 zmq_error used from ruby binding bindings/ruby/rbzmq.cpp | 27 +++++++++++++-------------- 1 files changed, 13 insertions(+), 14 deletions(-) commit 551fa104ffdb8c417b7d75ce70c463992e7d4652 Author: Martin Sustrik Date: Tue Feb 23 23:43:31 2010 +0100 zmq_errno used in C++ binding bindings/cpp/zmq.hpp | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) commit 95329719cda2b941e422d06daad3a7ba4c4a8829 Author: Martin Sustrik Date: Tue Feb 23 23:37:05 2010 +0100 zmq_errno is exported from the DLL bindings/c/zmq.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 2441ef11a22170499d7ae12865dc98a61230f7ed Author: Martin Sustrik Date: Tue Feb 23 23:28:25 2010 +0100 zmq_errno helper function added bindings/c/zmq.h | 10 ++++++++++ src/zmq.cpp | 5 +++++ 2 files changed, 15 insertions(+), 0 deletions(-) commit 2dd55605ea3956413cb25cab705ffdbdb2e00da5 Author: Martin Sustrik Date: Tue Feb 23 22:13:56 2010 +0100 recv fails after polling for IN on REQ socket src/req.cpp | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) commit 025c9e173c58971993858ea66fb2eeaf08de195d Author: Martin Sustrik Date: Tue Feb 23 17:22:52 2010 +0100 execution disabled on certain source files; some comments on java binding; MSVC temp files added to .gitignore .gitignore | 9 +++++++++ bindings/java/org/zmq/Context.java | 2 ++ bindings/java/org/zmq/Socket.java | 2 ++ 3 files changed, 13 insertions(+), 0 deletions(-) commit 71b4947f951f0120e4aadccb42f2452bb95dba06 Author: unknown Date: Tue Feb 23 12:02:55 2010 +0100 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 7c0df6ee02eb792c6afea7f047539840addb2f02 Author: Martin Sustrik Date: Tue Feb 23 11:52:33 2010 +0100 Java binding beautified, inline documentation added AUTHORS | 1 + bindings/java/Context.cpp | 106 ++++++++++++------- bindings/java/Socket.cpp | 197 +++++++++++++++++++++++++++--------- bindings/java/org/zmq/Context.java | 17 ++- bindings/java/org/zmq/Socket.java | 59 +++++++---- 5 files changed, 267 insertions(+), 113 deletions(-) commit ef1b5974891a30b15299464859023a531c2328f8 Author: Martin Sustrik Date: Tue Feb 23 10:01:54 2010 +0100 minor fix in zmq_socket(3) man page doc/zmq_socket.txt | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b9a612ff3f74a3add607b054213d0f52e85cc426 Merge: f249555 61f0ef5 Author: Martin Sustrik Date: Mon Feb 22 18:19:51 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f24955519ac0d3b0da5dd87fbb7bfc8cc1e24295 Author: Martin Sustrik Date: Mon Feb 22 18:19:26 2010 +0100 zmq_poll doesn't exit when infinite timeout is set and interrupt occurs src/zmq.cpp | 56 +++++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 39 insertions(+), 17 deletions(-) commit 61f0ef569b2f879b6b4e1f247253ceec08e774c7 Author: Martin Lucina Date: Mon Feb 22 18:16:40 2010 +0100 NetBSD: Check for and use atomic_ops(3) if available configure.in | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) commit 3a69cca386a895313729f418ee44443794feed0f Author: Martin Lucina Date: Mon Feb 22 16:42:13 2010 +0100 Fix $build_doc/$install_man check yet again configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 1294c1d33a1c73218eb94bf18ceb9ae873d08891 Author: Martin Sustrik Date: Sun Feb 21 16:58:53 2010 +0100 typo in zmq_ipc(7) fixed doc/zmq_ipc.txt | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit ff99d753ae30a7b5fef730fdcf1643e2928d9993 Author: malosek Date: Sat Feb 20 21:03:12 2010 +0100 Minor buid system tunning autogen.sh | 8 ++++++++ configure.in | 1 - 2 files changed, 8 insertions(+), 1 deletions(-) commit 740e531fbb47ad324737c075251c674e9dced6f1 Author: Martin Sustrik Date: Sat Feb 20 09:11:30 2010 +0100 Aleksey Yeschenko added to the credit section of AUTHORS file AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 57148b1fdeec0080b77ecfa837add9557226261c Author: Martin Lucina Date: Fri Feb 19 18:23:54 2010 +0100 Add missing check for install_man=yes Fixes git builds w/o asciidoc, bug introduced in 46824abe configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 8b86dcf81cc7b80267f334f4f26dfd319532ad25 Author: Martin Sustrik Date: Fri Feb 19 17:50:47 2010 +0100 build on cygwin enabled AUTHORS | 1 + configure.in | 3 +++ src/poller.hpp | 2 ++ 3 files changed, 6 insertions(+), 0 deletions(-) commit 727054547f32680f7db098497c2d7b1a0b20e2d8 Author: Martin Sustrik Date: Fri Feb 19 17:02:07 2010 +0100 don't check for identity, if the connection is anonymous src/session.cpp | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) commit aff1f6621ae13083c7f15f7f1f808560254a2dcb Merge: 75f571c 2a79a94 Author: Martin Sustrik Date: Fri Feb 19 15:25:05 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 75f571c8844231f4172f131e1dd6ba2348eb54e5 Author: Martin Sustrik Date: Fri Feb 19 15:24:43 2010 +0100 Multi-hop REQ/REP, part XII., generate unique identities for anonymous connections doc/zmq_setsockopt.txt | 10 ++++++---- src/options.cpp | 9 +++++++++ src/session.cpp | 6 +++--- src/uuid.hpp | 6 +++--- src/zmq_encoder.cpp | 1 - src/zmq_engine.cpp | 4 +++- src/zmq_init.cpp | 40 ++++++++++++++++++++-------------------- 7 files changed, 44 insertions(+), 32 deletions(-) commit 2a79a943de417679c562cd4a917e1d1bc19b0d25 Author: Martin Lucina Date: Thu Feb 18 19:38:15 2010 +0100 Add NetBSD support configure.in | 13 +++++++++++++ src/atomic_bitmap.hpp | 16 ++++++++-------- src/atomic_counter.hpp | 14 +++++++------- src/atomic_ptr.hpp | 14 +++++++------- src/ip.cpp | 11 ++--------- src/ip.hpp | 10 ++++++++++ src/kqueue.cpp | 17 ++++++++++++++--- src/kqueue.hpp | 3 ++- src/poll.cpp | 3 ++- src/poll.hpp | 3 ++- src/poller.hpp | 2 ++ src/tcp_listener.cpp | 2 +- src/uuid.cpp | 2 +- src/uuid.hpp | 4 ++-- src/zmq.cpp | 6 ++++-- 15 files changed, 77 insertions(+), 43 deletions(-) commit 776b12633981fd95050e138daeeba00a65d9532b Author: Martin Lucina Date: Thu Feb 18 19:27:35 2010 +0100 Fix typo configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit ab27f84b14a317d78a9dd145ef5c82e0ef88f583 Author: Martin Lucina Date: Thu Feb 18 19:27:15 2010 +0100 libstdc++ depends on libm on some platforms configure.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 495f0d105f809a265c34aa9a0eb20af0dcdcf283 Author: Martin Lucina Date: Thu Feb 18 17:29:14 2010 +0100 Fix detection of libstdc++ We only care about libstdc++ when using GNU C++. Further, libstdc++ depends on libm on some platforms, fix this. configure.in | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) commit 46824abeb2b016c51f406401d965816f71189aed Author: Martin Lucina Date: Thu Feb 18 17:25:49 2010 +0100 Never build docs from tarball releases This fixes the build_doc logic to work as advertised and never try to (re)build documentation when working with a tarball release. configure.in | 14 +++++++++++--- doc/Makefile.am | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) commit 8be491b7bdb8525eb37cebf355697c566a482e2d Author: Martin Lucina Date: Thu Feb 18 13:46:00 2010 +0100 Use feature test macros more conservatively It turns out that feature test macros are a complete mess, and defining _GNU_SOURCE and _POSIX_C_SOURCE together breaks some systems. So we try and define the appropriate "make everything visible" combination specific to each system instead. This may still break something, so people should test their platforms and speak up if so. configure.in | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-) commit d008637bc42da3fca50e423c2df0736be2745ac7 Author: Martin Sustrik Date: Wed Feb 17 21:16:59 2010 +0100 one more attempt to fix the previous win32 problem src/socket_base.cpp | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) commit f97da5e6449b183ad3ebb9b0ba8c37ff3dc17387 Merge: e385319 41354bf Author: Martin Sustrik Date: Wed Feb 17 20:33:46 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit e385319e5aaff6deafddfb216b24f026b461caa6 Author: Martin Sustrik Date: Wed Feb 17 20:33:00 2010 +0100 recv returning -1 while errno=0 fixed src/socket_base.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 41354bfa9820eb4495cf98342177d036df2a7dc7 Author: unknown Date: Wed Feb 17 20:16:19 2010 +0100 zmq_version fixed on Win32 platform builds/msvc/platform.hpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit f745c96a9bcf930d10fe31de5f7b3e772cccfa83 Author: Martin Lucina Date: Wed Feb 17 15:40:26 2010 +0100 Add POSIX and GNU Feature Test Macros This should fix more exotic POSIX platforms such as HPUX which insist on having _POSIX_C_SOURCE defined to get proper threading behaviour. We also define _GNU_SOURCE so that we get any extensions on systems with glibc, e.g. eventfd. configure.in | 16 +++++----------- 1 files changed, 5 insertions(+), 11 deletions(-) commit 9d8623b28f09f5a6db94c7d69ae264984ef1fbe3 Author: Martin Sustrik Date: Wed Feb 17 08:30:27 2010 +0100 ZMQII-76: Bug in how replies are handled when the REQ endpoint goes away src/rep.cpp | 22 ++++++++++++++-------- 1 files changed, 14 insertions(+), 8 deletions(-) commit 33cb20a747a2ca2c7b0487b023cfd6548ffe11e8 Author: Martin Sustrik Date: Tue Feb 16 23:31:17 2010 +0100 ZMQII-77: Put librbzmq symbols into ZMQ module AUTHORS | 1 + bindings/ruby/rbzmq.cpp | 75 ++++++++++++++++++++++++---------------------- perf/ruby/local_lat.rb | 4 +- perf/ruby/local_thr.rb | 6 ++-- perf/ruby/remote_lat.rb | 4 +- perf/ruby/remote_thr.rb | 4 +- 6 files changed, 49 insertions(+), 45 deletions(-) commit 1e7878489dc5d3013b5e5858fe404ab6b4a6947a Author: Martin Sustrik Date: Tue Feb 16 23:02:59 2010 +0100 exconf.rb checks for libzmq.so installation AUTHORS | 1 + bindings/ruby/extconf.rb | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit 8214d386c3f10dcc7f034a1159e82aa2d470829f Merge: 4190f64 96b2690 Author: Martin Sustrik Date: Tue Feb 16 22:20:09 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 4190f64d8cfc3950bc456ea7793db72130d05feb Author: Martin Sustrik Date: Tue Feb 16 22:19:33 2010 +0100 Special exception clause added to LGPL license COPYING.LESSER | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) commit 96b2690716a811a4c782de0eccfb9affa398cfe4 Merge: 60ce5cc a2f9899 Author: Martin Lucina Date: Tue Feb 16 19:59:32 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 60ce5cc82a48d5881cb493a5b6b3afba19bd0863 Author: Martin Lucina Date: Tue Feb 16 19:58:55 2010 +0100 PGM tarball should be removed on 'distclean', not 'clean' Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b9caa319e279cd8cd367e0a64308b9e80c4ead3d Author: Martin Sustrik Date: Tue Feb 16 18:30:38 2010 +0100 Multi-hop REQ/REP, part XI., finalise the XREQ/XREP functionality src/downstream.cpp | 2 +- src/downstream.hpp | 3 +- src/i_endpoint.hpp | 4 ++- src/i_engine.hpp | 9 ++++--- src/p2p.cpp | 2 +- src/p2p.hpp | 3 +- src/pgm_receiver.cpp | 8 ++++++- src/pgm_receiver.hpp | 3 +- src/pgm_sender.cpp | 8 ++++++- src/pgm_sender.hpp | 3 +- src/pub.cpp | 2 +- src/pub.hpp | 3 +- src/rep.cpp | 2 +- src/rep.hpp | 3 +- src/req.cpp | 2 +- src/req.hpp | 3 +- src/session.cpp | 7 +++++- src/session.hpp | 3 +- src/socket_base.cpp | 12 +++++----- src/socket_base.hpp | 5 ++- src/sub.cpp | 2 +- src/sub.hpp | 3 +- src/upstream.cpp | 2 +- src/upstream.hpp | 3 +- src/xrep.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++----- src/xrep.hpp | 10 ++++++++- src/xreq.cpp | 2 +- src/xreq.hpp | 3 +- src/zmq_decoder.cpp | 48 +++++++++++++++++++++++++++++----------------- src/zmq_encoder.cpp | 15 ++++++++++--- src/zmq_engine.cpp | 8 +++++- src/zmq_engine.hpp | 3 +- src/zmq_init.cpp | 6 +---- 33 files changed, 171 insertions(+), 72 deletions(-) commit 2ddce205350f11dacd8d8550f7d4e6e088c7fbcd Merge: 43620b3 a2f9899 Author: Martin Sustrik Date: Tue Feb 16 18:03:41 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit a2f9899f6a1fad3f9c73fc7599445bdde0b95ec4 Author: Martin Sustrik Date: Tue Feb 16 17:50:36 2010 +0100 missing COPYING file added .gitignore | 1 - COPYING | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ doc/zmq_poll.txt | 3 +- 3 files changed, 676 insertions(+), 2 deletions(-) commit afb526f31a82b8697b5f7e73e50b14705a3a74b2 Author: Martin Lucina Date: Tue Feb 16 00:11:38 2010 +0100 Fix 'make dist' to work with no special magic bindings/java/Makefile.am | 13 +++++++------ perf/c/Makefile.am | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) commit 8e9b78af271ae54882abf3010260d1e80ddd70f2 Author: Martin Lucina Date: Mon Feb 15 23:59:35 2010 +0100 Correct path for pgm distclean Makefile.am | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit df0c18ca17aa0dcd0e9f3737666a794b943f0982 Author: Martin Lucina Date: Mon Feb 15 23:54:49 2010 +0100 Missed one instance of pgm2 Makefile.am | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit b09eeeb2fac380da1e3455cdf97278850842e1c8 Author: Martin Lucina Date: Mon Feb 15 23:52:08 2010 +0100 Update gitignore .gitignore | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit 80c820d758aa65d71fbf4a24fd59d11de1f72fa5 Author: Martin Lucina Date: Mon Feb 15 23:51:05 2010 +0100 Cleaning up more PGM cruft Makefile.am | 3 ++ configure.in | 65 ++++++++++++++++++--------------------------------- perf/c/Makefile.am | 4 +- src/Makefile.am | 12 +++++++-- 4 files changed, 37 insertions(+), 47 deletions(-) commit 635e314643885ce8508ee64632bed7d6228fe8b6 Author: Martin Lucina Date: Mon Feb 15 23:09:57 2010 +0100 Clarify python.h messages configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 55800cea8c63ea84bd99e4c660ef1fd17a353e32 Author: Martin Lucina Date: Mon Feb 15 23:02:24 2010 +0100 Fix typo configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 5687661ba4a1ecf70e130047dc288cb6cff6f21a Author: Martin Lucina Date: Mon Feb 15 22:58:45 2010 +0100 Cleanup messages from configure.in configure.in | 44 ++++++++++++++++++++++---------------------- 1 files changed, 22 insertions(+), 22 deletions(-) commit 48a90cfb347bc983362ce2bc021591d513d6a5ec Author: Martin Lucina Date: Mon Feb 15 22:25:01 2010 +0100 Replace check for sparc with host_cpu configure.in | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) commit 0ded6c1973596436d7e5c54cfb89ada4d6c7473d Author: Martin Lucina Date: Mon Feb 15 22:17:18 2010 +0100 Multiple fixes to --with-pgm Disallow build --with-pgm on non-x86/AMB64 CPUs Check correctly for all dependencies required by --with-pgm Don't assume tar has -j Reorder --with-pgm checks configure.in | 70 ++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 42 insertions(+), 28 deletions(-) commit 94c74d5c18183b49507d633c7b06713841cfcb03 Author: Martin Sustrik Date: Mon Feb 15 21:04:34 2010 +0100 Brian Granger added to credits list AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f96f53c9687b5a032ef45ce42154a7f944492eec Author: Martin Sustrik Date: Mon Feb 15 21:03:11 2010 +0100 ZMQ_POLLERR placeholder added to zmq.h bindings/c/zmq.h | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 5041b0bc0bce43e5b6d8b6c6264141d33f3c2a7c Author: Martin Sustrik Date: Mon Feb 15 20:35:00 2010 +0100 fixing the previous commit :( src/ip.cpp | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit 7778010d76e6da534307ca3f0a3506d3d7f0ec5d Author: Martin Sustrik Date: Mon Feb 15 19:58:47 2010 +0100 care taken of the fact that AI_NUMERICSERV is not defined on OSX 10.5 src/ip.cpp | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) commit 817c89a78ea7b773046b010ca129fd1206e1c8f0 Author: malosek Date: Mon Feb 15 19:42:05 2010 +0100 removed first dummy run of PKG_CHECK_EXISTS configure.in | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) commit 43620b3d35e3f3a6e49046fdc0426651bf58dedb Author: Martin Sustrik Date: Sun Feb 14 13:34:48 2010 +0100 Multi-hop REQ/REP, part X., optional delayed creation of pipes during connect src/options.cpp | 1 + src/options.hpp | 6 +++++ src/rep.cpp | 5 ++++ src/session.cpp | 48 +++++++++++++++++++++----------------------- src/socket_base.cpp | 55 ++++++++++++++++++++++++++++++++------------------ src/xrep.cpp | 4 +++ 6 files changed, 74 insertions(+), 45 deletions(-) commit 4405250d93a2ad6eb3940c4bc4fe8ea32bd52f9e Author: Martin Sustrik Date: Sat Feb 13 15:30:03 2010 +0100 Multi-hop REQ/REP, part IX., pass the peer identity as far as socket_base_t src/command.cpp | 4 ++++ src/command.hpp | 2 ++ src/object.cpp | 28 ++++++++++++++++++++++++---- src/object.hpp | 4 ++-- src/options.cpp | 2 +- src/options.hpp | 5 ++--- src/pgm_socket.cpp | 7 +++++-- src/session.cpp | 2 +- src/socket_base.cpp | 5 +++-- src/socket_base.hpp | 3 ++- 10 files changed, 46 insertions(+), 16 deletions(-) commit f5ce81f2893ec0707c2f4346740878e68b51e13a Author: Martin Sustrik Date: Sat Feb 13 14:07:30 2010 +0100 Multi-hop REQ/REP, part VIII., new blob_t type used for holding identity src/Makefile.am | 1 + src/blob.hpp | 33 +++++++++++++++++++++++++++++++++ src/i_engine.hpp | 5 +++-- src/object.cpp | 19 +++++++++---------- src/object.hpp | 7 ++++--- src/pgm_receiver.cpp | 3 +-- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 3 +-- src/pgm_sender.hpp | 2 +- src/session.cpp | 32 +++++++++++--------------------- src/session.hpp | 13 +++++-------- src/socket_base.cpp | 24 ++++++++++-------------- src/socket_base.hpp | 14 ++++++-------- src/zmq_decoder.cpp | 34 +++++++++++++--------------------- src/zmq_decoder.hpp | 6 +++--- src/zmq_engine.cpp | 5 ++--- src/zmq_engine.hpp | 2 +- src/zmq_init.cpp | 17 ++++++----------- src/zmq_init.hpp | 5 ++--- 19 files changed, 113 insertions(+), 114 deletions(-) commit cdc2efe9b5f0d1f45065b1c32e5eabd7e9f78a12 Author: Martin Sustrik Date: Sat Feb 13 13:07:33 2010 +0100 Multi-hop REQ/REP, part VII., identity-related algorithms rewritten src/session.cpp | 114 +++++++++++++++++++++++++++++++-------------------- src/session.hpp | 10 +---- src/socket_base.cpp | 25 ++++++----- src/socket_base.hpp | 9 +++- src/zmq_init.cpp | 4 +- 5 files changed, 93 insertions(+), 69 deletions(-) commit 923eacd28a725a6b32de588fe7a54dbe252d84aa Author: Martin Sustrik Date: Sat Feb 13 09:09:40 2010 +0100 Multi-hop REQ/REP, part VI., session 'name' renamed to 'peer_identity' src/session.cpp | 16 ++++++++-------- src/session.hpp | 14 +++++++++----- src/zmq_init.cpp | 7 ++++--- 3 files changed, 21 insertions(+), 16 deletions(-) commit 2e78e48503375a415d95ee8df80df9c065172abc Author: Martin Sustrik Date: Fri Feb 12 20:49:00 2010 +0100 Multi-hop REQ/REP, part V., peer identity is passed from init object to session src/command.cpp | 10 ++++++++++ src/command.hpp | 2 ++ src/object.cpp | 22 ++++++++++++++++++++-- src/object.hpp | 6 ++++-- src/session.cpp | 3 ++- src/session.hpp | 3 ++- src/zmq_init.cpp | 3 ++- 7 files changed, 42 insertions(+), 7 deletions(-) commit d8430f4b9a43bf8c99854298edc9f1bc35c0e8ec Author: Martin Sustrik Date: Fri Feb 12 20:03:02 2010 +0100 Multi-hop REQ/REP, part IV., add command deallocation mechanism src/Makefile.am | 1 + src/command.cpp | 24 ++++++++++++++++++++++++ src/command.hpp | 3 +++ src/dispatcher.cpp | 4 ++++ src/object.cpp | 18 +++++++++++------- 5 files changed, 43 insertions(+), 7 deletions(-) commit 313b5dfadd8753b341197cc109bce40e08856cf6 Author: Martin Sustrik Date: Fri Feb 12 19:42:35 2010 +0100 Multi-hop REQ/REP, part III., change 'type' in options to simple 'traceroute' flag src/downstream.cpp | 1 - src/options.cpp | 4 ++-- src/options.hpp | 6 +++--- src/p2p.cpp | 1 - src/pub.cpp | 1 - src/rep.cpp | 1 - src/req.cpp | 1 - src/sub.cpp | 1 - src/upstream.cpp | 1 - src/xrep.cpp | 5 ++++- src/xreq.cpp | 1 - src/zmq_init.cpp | 2 +- 12 files changed, 10 insertions(+), 15 deletions(-) commit 96e0442332fcc680ddafdcaa8fcbdc6acd992c76 Merge: 36a5763 dc8f4b1 Author: Martin Sustrik Date: Fri Feb 12 15:58:22 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 36a576370ccfed3c104850b5b95a6ed3870edbea Author: Martin Sustrik Date: Fri Feb 12 15:57:54 2010 +0100 Multi-hop REQ/REP, part I., tracerouting switched on on XREP socket src/i_engine.hpp | 8 ++++++++ src/pgm_receiver.cpp | 9 ++++++++- src/pgm_receiver.hpp | 1 + src/pgm_sender.cpp | 9 ++++++++- src/pgm_sender.hpp | 1 + src/zmq_decoder.cpp | 27 +++++++++++++-------------- src/zmq_decoder.hpp | 6 +++++- src/zmq_encoder.cpp | 13 +++++++++---- src/zmq_encoder.hpp | 8 ++++++-- src/zmq_engine.cpp | 11 +++++++++-- src/zmq_engine.hpp | 1 + src/zmq_init.cpp | 6 ++++++ 12 files changed, 75 insertions(+), 25 deletions(-) commit dc8f4b1b761103784b422b7604bc8f36d429d3f4 Author: Martin Hurton Date: Fri Feb 12 15:08:57 2010 +0100 Fix memory leak in bind() src/socket_base.cpp | 4 +++- src/zmq_listener.hpp | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 7b4cf2a4d040057f6f378cac2cd125513a859c1b Author: Martin Sustrik Date: Fri Feb 12 13:33:50 2010 +0100 Multi-hop REQ/REP, part I., socket type is known to all associated objects src/downstream.cpp | 1 + src/options.cpp | 1 + src/options.hpp | 3 +++ src/p2p.cpp | 1 + src/pub.cpp | 1 + src/rep.cpp | 1 + src/req.cpp | 1 + src/sub.cpp | 1 + src/upstream.cpp | 1 + src/xrep.cpp | 1 + src/xreq.cpp | 1 + 11 files changed, 13 insertions(+), 0 deletions(-) commit cd7300fd4f25754f844b17a77685ec837ebecbbb Author: Martin Hurton Date: Fri Feb 12 12:12:49 2010 +0100 Resolve command starvation in recv() src/socket_base.cpp | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-) commit 7f7ac843d58b3d8a77f681fa4c35bd21726b6f31 Author: Martin Lucina Date: Thu Feb 11 17:51:47 2010 +0100 Next 0MQ release will be 2.0.6 As decided on the mailing list, there have been five 2.x releases to date, so the upcoming release will be numbered 2.0.6. configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit de41c9da31246314bb2b0c55dfe3b2884d48df3b Merge: 30b967e 92d0147 Author: Martin Lucina Date: Thu Feb 11 17:51:08 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 30b967e2a439ce76b1141d34fa3c8ee9f87a88a8 Author: Martin Lucina Date: Thu Feb 11 17:49:40 2010 +0100 Integrate version numbering into autoconf configure.in is now the master source for the package version number, this propagates to src/platform.hpp (for zmq_version) and doc/Makefile.am (for documentation generation) automagically. configure.in | 28 +++++++++++++++++++++++++++- doc/Makefile.am | 6 ++++-- doc/asciidoc.conf | 2 +- src/config.hpp | 5 ----- src/zmq.cpp | 6 +++--- 5 files changed, 35 insertions(+), 12 deletions(-) commit 92d0147b20f77cad5d20e257aec502f628e7889e Author: Martin Sustrik Date: Thu Feb 11 16:50:40 2010 +0100 python binding build with 2.4 version of python fixed bindings/python/pyzmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 432fbd796bb4905fb19ceee802009b17e88e9256 Author: Martin Sustrik Date: Thu Feb 11 10:43:59 2010 +0100 ZMQII-72: Add zmq_version function (documentation) doc/Makefile.am | 4 ++-- doc/zmq_version.txt | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) commit bd9213e71222df66634d59581264ffe67210222c Author: Martin Sustrik Date: Thu Feb 11 10:29:33 2010 +0100 ZMQII-72: Add zmq_version function bindings/c/zmq.h | 6 ++++++ src/config.hpp | 4 ++++ src/zmq.cpp | 8 ++++++++ 3 files changed, 18 insertions(+), 0 deletions(-) commit 7cab423fc20e46f54fa561e51b566cc8a63ca5c1 Merge: bc9b7f1 354efc5 Author: Martin Hurton Date: Wed Feb 10 17:14:21 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit bc9b7f1f54b9dcf754021f1f7eb766d71cc97f29 Author: Martin Hurton Date: Wed Feb 10 12:48:04 2010 +0100 lb: bugfix - never skip active pipe when sending msg src/lb.cpp | 17 +++++++++++------ 1 files changed, 11 insertions(+), 6 deletions(-) commit 6b3c1798e7554dd1ce63b2ad137e327f3f32fcf1 Author: Martin Hurton Date: Wed Feb 10 12:47:34 2010 +0100 fq: bugfix - don't read msg from inactive pipe src/fq.cpp | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 354efc513fdb4096f8830e6c2e3e8f1311303e61 Author: Martin Lucina Date: Wed Feb 10 16:18:46 2010 +0100 Convert documentation to AsciiDoc .gitignore | 5 + Makefile.am | 8 +-- configure.in | 19 ++++- doc/Makefile.am | 41 ++++++++++ doc/asciidoc.conf | 34 ++++++++ doc/zmq.txt | 175 ++++++++++++++++++++++++++++++++++++++++++ doc/zmq_bind.txt | 67 ++++++++++++++++ doc/zmq_close.txt | 52 +++++++++++++ doc/zmq_connect.txt | 63 +++++++++++++++ doc/zmq_cpp.txt | 89 +++++++++++++++++++++ doc/zmq_flush.txt | 59 ++++++++++++++ doc/zmq_forwarder.txt | 32 ++++++++ doc/zmq_init.txt | 61 +++++++++++++++ doc/zmq_inproc.txt | 50 ++++++++++++ doc/zmq_ipc.txt | 44 +++++++++++ doc/zmq_java.txt | 27 +++++++ doc/zmq_msg_close.txt | 53 +++++++++++++ doc/zmq_msg_copy.txt | 60 ++++++++++++++ doc/zmq_msg_data.txt | 50 ++++++++++++ doc/zmq_msg_init.txt | 54 +++++++++++++ doc/zmq_msg_init_data.txt | 67 ++++++++++++++++ doc/zmq_msg_init_size.txt | 61 +++++++++++++++ doc/zmq_msg_move.txt | 55 +++++++++++++ doc/zmq_msg_size.txt | 53 +++++++++++++ doc/zmq_pgm.txt | 106 +++++++++++++++++++++++++ doc/zmq_poll.txt | 85 ++++++++++++++++++++ doc/zmq_python.txt | 27 +++++++ doc/zmq_queue.txt | 32 ++++++++ doc/zmq_recv.txt | 66 ++++++++++++++++ doc/zmq_send.txt | 77 ++++++++++++++++++ doc/zmq_setsockopt.txt | 155 +++++++++++++++++++++++++++++++++++++ doc/zmq_socket.txt | 126 ++++++++++++++++++++++++++++++ doc/zmq_streamer.txt | 32 ++++++++ doc/zmq_strerror.txt | 50 ++++++++++++ doc/zmq_tcp.txt | 93 ++++++++++++++++++++++ doc/zmq_term.txt | 49 ++++++++++++ doc/zmq_udp.txt | 56 +++++++++++++ man/Makefile.am | 22 ----- man/convert2html.sh | 55 ------------- man/convert2pdf.sh | 88 --------------------- man/man1/zmq_forwarder.1 | 11 --- man/man1/zmq_queue.1 | 11 --- man/man1/zmq_streamer.1 | 11 --- man/man3/zmq_bind.3 | 52 ------------- man/man3/zmq_close.3 | 30 ------- man/man3/zmq_connect.3 | 49 ------------ man/man3/zmq_flush.3 | 37 --------- man/man3/zmq_init.3 | 40 ---------- man/man3/zmq_msg_close.3 | 32 -------- man/man3/zmq_msg_copy.3 | 43 ---------- man/man3/zmq_msg_data.3 | 27 ------- man/man3/zmq_msg_init.3 | 33 -------- man/man3/zmq_msg_init_data.3 | 55 ------------- man/man3/zmq_msg_init_size.3 | 44 ----------- man/man3/zmq_msg_move.3 | 38 --------- man/man3/zmq_msg_size.3 | 30 ------- man/man3/zmq_poll.3 | 71 ----------------- man/man3/zmq_recv.3 | 52 ------------- man/man3/zmq_send.3 | 64 --------------- man/man3/zmq_setsockopt.3 | 137 --------------------------------- man/man3/zmq_socket.3 | 110 -------------------------- man/man3/zmq_strerror.3 | 27 ------- man/man3/zmq_term.3 | 25 ------ man/man7/zmq.7 | 151 ------------------------------------ man/man7/zmq_cl.7 | 124 ----------------------------- man/man7/zmq_cpp.7 | 103 ------------------------- man/man7/zmq_inproc.7 | 42 ---------- man/man7/zmq_ipc.7 | 34 -------- man/man7/zmq_java.7 | 9 -- man/man7/zmq_pgm.7 | 98 ----------------------- man/man7/zmq_python.7 | 9 -- man/man7/zmq_tcp.7 | 80 ------------------- man/man7/zmq_udp.7 | 45 ----------- 73 files changed, 2224 insertions(+), 1898 deletions(-) commit 2d44bf3644c8e12aa86c48e9da4df19bfa9ea703 Author: Martin Sustrik Date: Wed Feb 10 11:04:28 2010 +0100 ZMQII-69: Make 0MQ build on HP-UX src/fd_signaler.cpp | 4 ++-- src/tcp_connecter.cpp | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 8c25bab31d63bf5e2c4eec6d9084cf7d1c1e5dd3 Author: Martin Sustrik Date: Wed Feb 10 10:42:54 2010 +0100 ZMQII-70: zmq_poll on win32 fails with EINVAL src/zmq.cpp | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) commit 8f86cac2f6721eec4b600383eb113f7fedf41ce1 Author: Martin Sustrik Date: Tue Feb 9 19:23:15 2010 +0100 ZMQII-69: Make 0MQ build on HP-UX src/fd_signaler.cpp | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ src/ip.cpp | 4 +-- src/tcp_connecter.hpp | 9 +++++- 3 files changed, 87 insertions(+), 4 deletions(-) commit fd673ae231119682a242967551cfa034fa32791a Author: Martin Sustrik Date: Tue Feb 9 15:21:26 2010 +0100 couple of typos in the documentation fixed examples/chat/README | 2 +- man/man3/zmq_term.3 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 6b2ca4e158c3394f5aba8f0f01ff1734423683f9 Author: Martin Sustrik Date: Tue Feb 9 15:15:44 2010 +0100 ZMQII-67: Build checks for python even if it's not needed configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4c870ede7fdecaf1f952b01096e09cc03a7c7aef Author: Martin Sustrik Date: Tue Feb 9 09:08:37 2010 +0100 ZMQII-57: Shutdown OpenPGM library src/pgm_socket.cpp | 31 +------------------------------ src/zmq.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 47 insertions(+), 31 deletions(-) commit 396e41a2a4b31f91ef4c4458d53be9e3a9b4bb92 Author: Martin Sustrik Date: Mon Feb 8 18:55:51 2010 +0100 minor change to README README | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit 01533a5aefb49e23be95cab9cfa5ca32cd438d25 Author: Martin Sustrik Date: Mon Feb 8 18:37:48 2010 +0100 ZMQII-65: Two OS threads are mapped to the same app_thread_t src/app_thread.cpp | 23 ++------------ src/app_thread.hpp | 19 ------------ src/dispatcher.cpp | 79 +++++++++++++++++++++++++++++++++------------------- src/dispatcher.hpp | 29 ++++++++++++++---- 4 files changed, 76 insertions(+), 74 deletions(-) commit 7593d815ac57f2877480c5056b2f1aa65460f5c3 Author: Martin Sustrik Date: Mon Feb 8 10:34:12 2010 +0100 ZMQII-64: First message stuck in 0MQ in case of immediate disconnection src/zmq_engine.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 427bc3276aa236c8691fee7e634717d0579a3055 Author: Martin Sustrik Date: Sun Feb 7 16:24:14 2010 +0100 minor code cleanup src/socket_base.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b0ee6b0c8ab8a5052a5e111dda24308dd00c0d62 Author: Martin Sustrik Date: Sun Feb 7 11:31:05 2010 +0100 ZMQII-62: zmq_close after sending message via P2P socket fails src/p2p.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit bbaa494fb569d94c356ddecca7dbf249ffc217cf Author: Martin Sustrik Date: Sun Feb 7 09:14:43 2010 +0100 ZMQII-59: TCP server crashes sometimes when message is send and socket is closed immediately src/dispatcher.cpp | 23 +++++++++++++++++++++++ src/dispatcher.hpp | 16 ++-------------- src/object.cpp | 12 +++++------- 3 files changed, 30 insertions(+), 21 deletions(-) commit d21bf21a362cf6d20d8d060bb91ee2fdca1dd88b Author: Martin Sustrik Date: Fri Feb 5 13:00:49 2010 +0100 allow async connect on Win32 return WSAECONNABORTED src/tcp_connecter.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 0888fcd06f1c66ec3dfab744bfc24d1486737c7e Author: Martin Sustrik Date: Thu Feb 4 23:58:41 2010 +0100 yqueue_t uses malloc/free instead of new/delete src/yqueue.hpp | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) commit 30076c4f7a5b0c70ef0c5a6574cac531bc996f5e Author: Martin Sustrik Date: Thu Feb 4 17:46:47 2010 +0100 ZMQII-58: TCP connecting asserts on Win32 (same fix for POSIX) src/tcp_connecter.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit c46b7ed1978ead346022577ff015b092f3257c84 Author: unknown Date: Thu Feb 4 17:40:04 2010 +0100 ZMQII-58: TCP connecting asserts on Win32 src/tcp_connecter.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit b86483acbe109566f4e0fb43266fdd98e7648d55 Author: Martin Sustrik Date: Thu Feb 4 14:50:59 2010 +0100 ZMQII-50: Document Ruby Bindings man/Makefile.am | 2 +- man/convert2html.sh | 1 - man/convert2pdf.sh | 2 -- man/man7/zmq_ruby.7 | 9 --------- 4 files changed, 1 insertions(+), 13 deletions(-) commit bc90231227a84f4b7dffe432a8efa70b75c19031 Author: Martin Sustrik Date: Thu Feb 4 09:39:57 2010 +0100 contrain interface name resolving in OpenPGM to IPv4 interfaces src/pgm_socket.cpp | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) commit 0f697fe2b460dfbec7481f6d535b95f6b4cc2eac Author: Martin Sustrik Date: Wed Feb 3 20:04:44 2010 +0100 ZMQII-56: Avoid allocation of chunk in yqueue.hpp by keeping a spare one AUTHORS | 1 + src/yqueue.hpp | 31 ++++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) commit 72bbc92b70a67fab1dbba6fbd53f574944bdd8e4 Merge: 6502c16 4172fdd Author: Martin Lucina Date: Wed Feb 3 15:54:39 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit 6502c16a7fd878e61f0672a47e2cdb4d56ab0eb2 Author: Martin Lucina Date: Wed Feb 3 15:52:11 2010 +0100 Update OpenPGM to 2.0.23rc8 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.21rc6.tar.bz2 | Bin 323697 -> 0 bytes foreign/openpgm/libpgm-2.0.23rc8.tar.bz2 | Bin 0 -> 321822 bytes src/Makefile.am | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) commit 4172fdd6970d4b42443442bf6633f9a9bd4c6f2b Author: unknown Date: Wed Feb 3 14:55:46 2010 +0100 Win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 8 ++++ builds/msvc/msvc.sln | 9 +++++ builds/msvc/ruby/ruby.vcproj | 68 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 85 insertions(+), 0 deletions(-) commit 7c25feb51bdbc9563cc65ff4829f761ef7231483 Author: Martin Sustrik Date: Wed Feb 3 13:06:34 2010 +0100 ZMQII-55: At most one PGM/UDP transport can be opened src/pgm_socket.cpp | 40 +++++++++++++++++++++------------------- 1 files changed, 21 insertions(+), 19 deletions(-) commit 9cee8f9c3e22f1e880988271ab1c31c92827efde Author: Martin Sustrik Date: Tue Feb 2 15:11:25 2010 +0100 problem with PGM messages larger than 1 MTU fixed src/pgm_receiver.cpp | 104 ++++++++++++++++++++++++++------------------------ 1 files changed, 54 insertions(+), 50 deletions(-) commit 27e47bdcc0358b84a57378e19359556e2dbcb50e Author: Martin Sustrik Date: Tue Feb 2 13:29:31 2010 +0100 ZMQII-54: Affinity isn't honoured src/dispatcher.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) commit 5d16070ffcd426e81ea27520f6847d68e5e5af80 Author: Martin Sustrik Date: Tue Feb 2 08:46:35 2010 +0100 ZMQII-53: Memory leak when using invalid socket type src/dispatcher.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit a1e70f29575994798df1d57314193782f6d9cdcb Author: Martin Sustrik Date: Tue Feb 2 08:27:38 2010 +0100 ZMQII-52: Asserion during reconnection src/zmq_init.cpp | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit 528610ff55ef283b99cbcda007200a6b4092be59 Author: Martin Sustrik Date: Tue Feb 2 08:14:23 2010 +0100 typo in zmq_socket(3) man page fixed man/man3/zmq_socket.3 | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 00b9a5dedeb47efd78aea59b579a4b5befba743a Author: Martin Sustrik Date: Sun Jan 31 20:14:30 2010 +0100 ZMQII-51: Implement O(1) topic matching src/Makefile.am | 2 + src/prefix_tree.cpp | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/prefix_tree.hpp | 55 ++++++++++++++++ src/sub.cpp | 44 ++----------- src/sub.hpp | 13 +--- 5 files changed, 242 insertions(+), 47 deletions(-) commit 70ea8e9d4b88a1ecb1c076eccc2e9bd872c2230c Author: Martin Sustrik Date: Sat Jan 30 13:40:50 2010 +0100 ZMQII-48: Implement P2P socket type src/p2p.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++------------ src/p2p.hpp | 5 +++++ 2 files changed, 49 insertions(+), 12 deletions(-) commit eb47c1b064ec2f433d3889b7fd4a297a965166bb Merge: 2784f90 4d5e643 Author: Martin Sustrik Date: Fri Jan 29 08:39:36 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2784f90d595a253e071244d440f78e667f6a957c Author: Martin Sustrik Date: Fri Jan 29 08:39:19 2010 +0100 moving debian directory to the root of the project debian/README.Debian | 6 + debian/changelog | 6 + debian/cl-zeromq.files | 7 ++ debian/cl-zeromq.install | 6 + debian/cl-zeromq.links | 1 + debian/compat | 1 + debian/control | 161 ++++++++++++++++++++++++++++++ debian/copyright | 18 ++++ debian/dirs | 5 + debian/docs | 2 + debian/libzeromq-dev.files | 37 +++++++ debian/libzeromq-dev.install | 19 ++++ debian/libzeromq-python.files | 1 + debian/libzeromq-python.install | 1 + debian/libzeromq-ruby.files | 1 + debian/libzeromq-ruby.install | 1 + debian/libzeromq0.files | 2 + debian/libzeromq0.install | 1 + debian/rules | 136 +++++++++++++++++++++++++ debian/shlibs.local | 1 + debian/zeromq-examples.files | 2 + debian/zeromq-examples.install | 2 + debian/zeromq-perf.files | 10 ++ debian/zeromq-perf.install | 10 ++ debian/zeromq-utils.files | 6 + debian/zeromq-utils.install | 6 + packages/debian/README.Debian | 6 - packages/debian/changelog | 6 - packages/debian/cl-zeromq.files | 7 -- packages/debian/cl-zeromq.install | 6 - packages/debian/cl-zeromq.links | 1 - packages/debian/compat | 1 - packages/debian/control | 161 ------------------------------ packages/debian/copyright | 18 ---- packages/debian/dirs | 5 - packages/debian/docs | 2 - packages/debian/libzeromq-dev.files | 37 ------- packages/debian/libzeromq-dev.install | 19 ---- packages/debian/libzeromq-python.files | 1 - packages/debian/libzeromq-python.install | 1 - packages/debian/libzeromq-ruby.files | 1 - packages/debian/libzeromq-ruby.install | 1 - packages/debian/libzeromq0.files | 2 - packages/debian/libzeromq0.install | 1 - packages/debian/rules | 136 ------------------------- packages/debian/shlibs.local | 1 - packages/debian/zeromq-examples.files | 2 - packages/debian/zeromq-examples.install | 2 - packages/debian/zeromq-perf.files | 10 -- packages/debian/zeromq-perf.install | 10 -- packages/debian/zeromq-utils.files | 6 - packages/debian/zeromq-utils.install | 6 - 52 files changed, 449 insertions(+), 449 deletions(-) commit 4d5e643299e22b53120173319490957b98c0199e Author: malosek Date: Thu Jan 28 19:19:25 2010 +0100 patching libtool script moved at the end of configure configure.in | 18 ++++++++++-------- 1 files changed, 10 insertions(+), 8 deletions(-) commit 849095a042b8326f5789baa04d1dbb7ca36d4632 Merge: f17f0fa e5ff617 Author: Martin Sustrik Date: Thu Jan 28 12:45:37 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f17f0fa67bc5a373f3fc7964aaad4f08aa1dc761 Author: Martin Sustrik Date: Thu Jan 28 12:45:12 2010 +0100 CL binding ripped out of the tree .gitignore | 3 + bindings/Makefile.am | 8 +- bindings/cl/Makefile.am | 9 -- bindings/cl/meta.lisp | 59 ---------- bindings/cl/package.lisp | 108 ------------------- bindings/cl/zeromq-api.lisp | 180 ------------------------------- bindings/cl/zeromq.asd | 38 ------- bindings/cl/zeromq.lisp | 250 ------------------------------------------- configure.in | 21 ---- perf/Makefile.am | 2 +- perf/cl/Makefile.am | 2 - perf/cl/lat-parms.lisp | 22 ---- perf/cl/local-lat-poll.lisp | 43 -------- perf/cl/local-lat.lisp | 52 --------- perf/cl/local-thr.lisp | 54 --------- perf/cl/remote-lat.lisp | 50 --------- perf/cl/remote-thr.lisp | 41 ------- perf/cl/thr-parms.lisp | 25 ----- 18 files changed, 6 insertions(+), 961 deletions(-) commit e5ff617c4e061d29c9a019efa2292fd09c87a71e Author: malosek Date: Wed Jan 27 20:58:40 2010 +0100 fixed OpenPGM compilation on mingw32 src/windows.hpp | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) commit 8f57ff4634ae44cd998bc0b864a8987f241e2fce Author: malosek Date: Wed Jan 27 20:45:43 2010 +0100 fixed OpenPGM compilation on mingw32 perf/c/Makefile.am | 1 + src/Makefile.am | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) commit 2056c888d2567ab96c3539fd60bfb652e19df335 Author: malosek Date: Wed Jan 27 18:29:45 2010 +0100 changed version of the master branch back to dev configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 0b97e7a4f23f7add763ac6e0fc945c9a342a7d32 Author: malosek Date: Wed Jan 27 11:30:22 2010 +0100 libpgm updated to 2.6.21rc6 configure.in | 12 ++++++------ foreign/openpgm/libpgm-2.0.20rc5.tar.bz2 | Bin 316958 -> 0 bytes foreign/openpgm/libpgm-2.0.21rc6.tar.bz2 | Bin 0 -> 323697 bytes perf/c/Makefile.am | 6 ++++++ src/Makefile.am | 13 +++++++++++-- src/pgm_socket.cpp | 25 +++++++++++++++++++------ 6 files changed, 42 insertions(+), 14 deletions(-) commit 943125bd12dbf181f4dfce7babddf1af7bcb7e18 Author: Martin Sustrik Date: Wed Jan 27 08:47:01 2010 +0100 Hard-wired constant on OpenVMS replaced by symbolic constant src/fd_signaler.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit aa27034db5d47f4630f464da53f63a0e62c34daa Author: unknown Date: Sun Jan 24 08:38:18 2010 +0100 IPv6 patch - part V. (win32) src/ip.cpp | 21 +++------------------ 1 files changed, 3 insertions(+), 18 deletions(-) commit adc5d7693d9279134c0494210b9d2b885e95d950 Author: Martin Sustrik Date: Sun Jan 24 08:19:02 2010 +0100 IPv6 patch - part IV. src/ip.cpp | 41 ++++++++++++++++++++++++++++++++++------- 1 files changed, 34 insertions(+), 7 deletions(-) commit fca9a2159a1fb963901d11dc6f734a622baa92d6 Merge: 079d327 454f43a Author: Martin Sustrik Date: Sat Jan 23 11:14:53 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 079d327670d9137d93f4dbe9eb6cfa6d4165b903 Author: Martin Sustrik Date: Sat Jan 23 11:14:30 2010 +0100 IPv6 patch - part III. src/ip.cpp | 42 ++++++++++++++++++++++++------------------ 1 files changed, 24 insertions(+), 18 deletions(-) commit 454f43a45b2d453b53984387e8a8a50cad568f41 Author: unknown Date: Sat Jan 23 09:08:31 2010 +0100 IP address resolving on Win32 fixed src/ip.cpp | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) commit df4548aa76617314cb1a47e6d408cc663640cd70 Merge: 2634934 d762e1a Author: Martin Sustrik Date: Sat Jan 23 08:20:01 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2634934999408124837afceaf577b75ed58116d7 Author: Martin Sustrik Date: Sat Jan 23 08:19:30 2010 +0100 IPv6 patch part 2/2 src/ip.cpp | 26 +++++++++++++++++++------- src/ip.hpp | 11 +++++++---- src/tcp_connecter.cpp | 17 ++++++++++------- src/tcp_connecter.hpp | 1 + src/tcp_listener.cpp | 11 ++++++----- src/tcp_listener.hpp | 1 + 6 files changed, 44 insertions(+), 23 deletions(-) commit 6aaf095dd259dc42d78cc7bd8c5a7f867eb23166 Author: Martin Sustrik Date: Fri Jan 22 16:32:48 2010 +0100 IPv6 support -part II. src/ip.cpp | 158 +++++++++++++++++++++++------------------------------------- 1 files changed, 60 insertions(+), 98 deletions(-) commit d762e1a9c976680dde2d2f38dac9f5861bd82dad Author: unknown Date: Fri Jan 22 13:29:46 2010 +0100 Win32 build fixed bindings/cpp/zmq.hpp | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) commit 34d65e22c557671c74d6c51026b2434912966319 Author: Martin Sustrik Date: Fri Jan 22 13:13:52 2010 +0100 Tero Marttila's Ipv6 patch - part I. src/fd_signaler.cpp | 1 - src/ip.cpp | 24 ++++++++++++++---------- src/ip.hpp | 6 +++--- src/tcp_connecter.cpp | 17 +++++++++-------- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 16 ++++++++-------- 6 files changed, 35 insertions(+), 31 deletions(-) commit 6edec4fe93c60693a5faee7e4e8821eac4f43d4d Author: Martin Sustrik Date: Fri Jan 22 11:38:17 2010 +0100 zmq_udp(7) man page fixed man/man7/zmq_udp.7 | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit 70601c243fa7e91f5cceaa80190d7b413940020b Author: Martin Sustrik Date: Fri Jan 22 11:21:28 2010 +0100 zmq_pgm(7) man page fixed man/man7/zmq_pgm.7 | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) commit d1e09578b275aca93c50cde078322a0348342c60 Author: unknown Date: Fri Jan 22 07:54:16 2010 +0100 Hardcoded loopback address removed from fd_signaler AUTHORS | 1 + src/fd_signaler.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) commit f4832faf29df6470bf59f1f1866c07fa4278a75b Author: Martin Sustrik Date: Thu Jan 21 16:30:42 2010 +0100 small fix to man pages to comply with lintian man/Makefile.am | 2 +- man/convert2html.sh | 1 + man/convert2pdf.sh | 2 ++ man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_ipc.7 | 2 +- man/man7/zmq_java.7 | 9 +++++++++ man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- 13 files changed, 22 insertions(+), 10 deletions(-) commit b1b66df37c0b05ba05d9636234bad0cc02a1bd03 Author: Martin Sustrik Date: Thu Jan 21 12:07:42 2010 +0100 PGM man page improved man/man7/zmq_pgm.7 | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) commit 66ef22993f22a0d47703c1203f57d95c4316bc70 Author: Martin Sustrik Date: Thu Jan 21 10:38:40 2010 +0100 zmq_close man page improved man/man3/zmq_close.3 | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit a008af6088ef1ad3baf1b9e6ae699cc07367efa3 Author: Martin Sustrik Date: Thu Jan 21 10:01:05 2010 +0100 Asko Kauppi added to the list of authors AUTHORS | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit f0757c003eb232247a460631276b40e4fc02f3c9 Author: Martin Sustrik Date: Thu Jan 21 09:58:49 2010 +0100 ZMQII-43: Race condition when writing to pipe src/session.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6a46ca75e5970733cfe135ecf77074b69fdda34f Author: Martin Sustrik Date: Wed Jan 20 09:22:41 2010 +0100 ZMQ-42: Building with ICC fails src/tcp_connecter.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 111f0ff078372e8a0f5c0b98170d451d6561e85e Author: Martin Sustrik Date: Wed Jan 20 09:19:03 2010 +0100 ZMQII-41: Poll function in C++ binding doesn't convert errors to exceptions bindings/cpp/zmq.hpp | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) commit 6b0457fcaad3fa9a2e632b3799119c40da8dd6ca Author: Martin Sustrik Date: Tue Jan 19 12:48:38 2010 +0100 minor documentation patch man/man3/zmq_setsockopt.3 | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 7094edd6baf0d69c3879da7f16c7222388952931 Author: Martin Sustrik Date: Mon Jan 18 15:57:33 2010 +0100 error handling in C perf tests improved perf/c/local_lat.c | 51 +++++++++++++++++++++++++++++++++--------- perf/c/local_thr.c | 61 ++++++++++++++++++++++++++++++++++++++++----------- perf/c/remote_lat.c | 51 +++++++++++++++++++++++++++++++++--------- perf/c/remote_thr.c | 41 ++++++++++++++++++++++++++------- 4 files changed, 160 insertions(+), 44 deletions(-) commit 4ceb83935062bb84fd5da702679a126d12aed8be Author: Martin Sustrik Date: Mon Jan 18 13:16:14 2010 +0100 typos in man pages fixed .gitignore | 13 +++++++++++++ man/man3/zmq_bind.3 | 2 +- man/man3/zmq_connect.3 | 2 +- man/man3/zmq_recv.3 | 2 +- man/man3/zmq_send.3 | 2 +- man/man3/zmq_socket.3 | 8 ++++---- man/man7/zmq.7 | 4 ++-- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_ipc.7 | 8 ++++---- man/man7/zmq_pgm.7 | 10 +++++----- man/man7/zmq_tcp.7 | 4 ++-- man/man7/zmq_udp.7 | 12 ++++++------ 13 files changed, 42 insertions(+), 29 deletions(-) commit bddff50271b7c4c15c34d7a0aa1c04f3e3e3c107 Author: Martin Sustrik Date: Mon Jan 18 11:01:41 2010 +0100 ZMQII-40: wrong return code from recolve_ip_interface src/ip.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 55944729ed5527692b1ead17af553aa32c316781 Author: Martin Sustrik Date: Mon Jan 18 10:53:46 2010 +0100 ChangeLog modified for 2.0-beta2 version ChangeLog | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) commit f40e3a6931fb6463c349ef765d99515edc569fd7 Author: Martin Sustrik Date: Sun Jan 17 17:49:34 2010 +0100 version number bumped configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 51e012c446b500fe3dfb46b6475ebf018ecfeaa0 Author: Martin Sustrik Date: Sat Jan 16 09:39:44 2010 +0100 Solaris build fixed AUTHORS | 1 + src/ip.cpp | 2 +- src/tcp_connecter.cpp | 6 ++++-- src/tcp_listener.cpp | 7 +++---- 4 files changed, 9 insertions(+), 7 deletions(-) commit a507d16e13fdd6b13e1e69d0d305750995513a1f Author: unknown Date: Fri Jan 15 14:21:20 2010 +0100 Win32 build fixed src/tcp_connecter.cpp | 2 ++ src/tcp_listener.cpp | 4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) commit 2bb57ac57ace37203c505ff17147210feca34d73 Author: Martin Sustrik Date: Fri Jan 15 14:11:39 2010 +0100 ZMQII-39: Implement IPC transport man/Makefile.am | 2 +- man/convert2html.sh | 1 + man/convert2pdf.sh | 2 + man/man7/zmq.7 | 3 + man/man7/zmq_inproc.7 | 3 +- man/man7/zmq_ipc.7 | 34 ++++++++++ man/man7/zmq_pgm.7 | 1 + man/man7/zmq_tcp.7 | 1 + man/man7/zmq_udp.7 | 1 + src/ip.cpp | 17 +++++ src/ip.hpp | 9 +++ src/socket_base.cpp | 23 ++++++- src/tcp_connecter.cpp | 117 +++++++++++++++++++++++----------- src/tcp_connecter.hpp | 4 +- src/tcp_listener.cpp | 166 ++++++++++++++++++++++++++++++++++-------------- src/tcp_listener.hpp | 10 +-- src/zmq_connecter.cpp | 10 ++- src/zmq_connecter.hpp | 7 +- src/zmq_engine.cpp | 9 ++- src/zmq_engine.hpp | 6 ++- src/zmq_init.cpp | 4 +- src/zmq_init.hpp | 3 +- src/zmq_listener.cpp | 6 +- src/zmq_listener.hpp | 4 +- 24 files changed, 323 insertions(+), 120 deletions(-) commit 56c369272c279224562d11b0a66590ac7826f4f3 Merge: b9b0124 b60342a Author: unknown Date: Thu Jan 14 15:50:54 2010 +0100 Merge branch 'master' of github.com:sustrik/zeromq2 commit b9b0124d553b30932d8b78fb774ae258fa0d0f4d Author: unknown Date: Thu Jan 14 15:50:12 2010 +0100 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (Win32) src/zmq.cpp | 54 +++++++++++++++++++++++++++++++++++++----------------- 1 files changed, 37 insertions(+), 17 deletions(-) commit b60342ae1a95dbb303705f5b89a94b33805a3841 Author: Martin Sustrik Date: Thu Jan 14 14:11:34 2010 +0100 man pages are more specific on NIC name issue man/man3/zmq_bind.3 | 12 ++++++++---- man/man3/zmq_connect.3 | 12 ++++++++---- man/man7/zmq_pgm.7 | 5 +++++ man/man7/zmq_tcp.7 | 5 +++++ man/man7/zmq_udp.7 | 5 +++++ 5 files changed, 31 insertions(+), 8 deletions(-) commit 067ba3b9f77a253d4ce58e05ef1fa7702c32b2a3 Author: Martin Sustrik Date: Wed Jan 13 19:21:23 2010 +0100 ZMQII-34: ensure that poll won't return POLLIN event when the message will be filtered out anyway (POSIX) src/socket_base.cpp | 4 +-- src/sub.cpp | 92 +++++++++++++++++++++++++++++++++++++-------------- src/sub.hpp | 10 +++++ src/zmq.cpp | 50 ++++++++++++++++++---------- 4 files changed, 110 insertions(+), 46 deletions(-) commit 06105d164230800e8ea42ddd513e2f7fb27e6f2f Author: Martin Sustrik Date: Wed Jan 13 15:15:01 2010 +0100 transports man pages updated man/man7/zmq_inproc.7 | 34 +++++++++++++++++++++- man/man7/zmq_pgm.7 | 77 ++++++++++++++++++++++++++++++++++++++++++++++++- man/man7/zmq_tcp.7 | 5 +++ man/man7/zmq_udp.7 | 32 +++++++++++++++++++- 4 files changed, 145 insertions(+), 3 deletions(-) commit 30a107e06d48ebbc7a635ba4fb21a24e385cf4e4 Author: Martin Sustrik Date: Wed Jan 13 13:35:13 2010 +0100 timeout parameter for zmq_poll added in cl binding bindings/cl/zeromq-api.lisp | 12 +++++++----- bindings/cl/zeromq.lisp | 3 ++- 2 files changed, 9 insertions(+), 6 deletions(-) commit 20a8edcf5c2d9d5099d194e5a87c501d49c47328 Author: Martin Sustrik Date: Wed Jan 13 13:24:29 2010 +0100 ZMQII-38: Compiler complains about missing virtual constructors src/i_endpoint.hpp | 2 ++ src/i_inout.hpp | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) commit 76dbb4f3bb88f73bc40e3de72e258e321375cd2f Author: Martin Sustrik Date: Tue Jan 12 13:08:37 2010 +0100 zmq_tcp man page added man/man7/zmq_tcp.7 | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 61 insertions(+), 1 deletions(-) commit bcd278a5a5fa9c08af6786c6f3c1ec5fa974fadf Author: Martin Sustrik Date: Tue Jan 12 08:14:55 2010 +0100 ZMQII-37: SIGSEGV when polling on REQ socket src/req.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 4c613b39faebe18af95cab07a7d5f687285c4655 Author: Martin Sustrik Date: Tue Jan 12 08:02:03 2010 +0100 script to convert man pages to html added man/convert2html.sh | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) commit 72b2f07a707724b353e9733f60cb4bade9b43966 Author: Martin Sustrik Date: Mon Jan 11 07:47:19 2010 +0100 ZMQII-36: Chat example & forwarder broken because of changes subscribe semantics devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- examples/chat/display.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 65f450f22e311d9a9251d05f8fb902a8fa2afe54 Author: Martin Sustrik Date: Sun Jan 10 17:41:59 2010 +0100 minor man page fix man/man3/zmq_connect.3 | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) commit bd07baf0281ddb5f332bd03b06038fc0ac048285 Author: Martin Sustrik Date: Sat Jan 9 22:24:59 2010 +0100 ZMQII-33: zmq_poll may exceed timeout if signal interrupts the waiting src/zmq.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e806615dd18e625b0b7fb1074cc4da5fda18529b Author: Martin Sustrik Date: Fri Jan 8 15:44:51 2010 +0100 ZMQII-31: memory leak in zmq_poll (on timeout) AUTHORS | 1 + src/zmq.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletions(-) commit 9fc8827b8a8e9d842b85b7f7f9790fc0a2ef88f6 Merge: ddf5f75 e9a4ad3 Author: Martin Sustrik Date: Thu Jan 7 14:45:13 2010 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ddf5f75549f01a0615ee3f49b6b5d53aefd8fbd2 Author: Martin Sustrik Date: Thu Jan 7 14:44:43 2010 +0100 zmq.cpp build probelm on non-linux platforms fixed man/man3/zmq_setsockopt.3 | 10 ++++------ src/zmq.cpp | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) commit e9a4ad38ce04ee21a7f81d5a36e3c58cf7138f5d Author: malosek Date: Wed Jan 6 20:10:27 2010 +0100 updated version to 2.0-beta1 in configure.in configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 7546526e667b35c05c80515d651e950a771813e1 Author: Martin Sustrik Date: Wed Jan 6 19:42:15 2010 +0100 ChangeLog updated for 2.0-beta1 ChangeLog | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit e21b33e9cfe12725de23bf2ef44967f53bcb2a10 Author: malosek Date: Tue Jan 5 18:34:27 2010 +0100 forced WINVER to 0x0501 for mingv32 build src/windows.hpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit ef049efe2ec56bb0ff5395ba8cba6e1722922e43 Author: Martin Sustrik Date: Tue Jan 5 14:45:10 2010 +0100 perf tests modified to reflect change in subscription format perf/c/local_thr.c | 2 +- perf/cl/local-thr.lisp | 2 +- perf/cpp/local_thr.cpp | 2 +- perf/java/local_thr.java | 2 +- perf/python/local_thr.py | 2 +- perf/ruby/local_thr.rb | 2 +- src/zmq_engine.cpp | 8 +++++--- 7 files changed, 11 insertions(+), 9 deletions(-) commit 8d339e959694107df8f1666634a34f54ad76ae41 Author: malosek Date: Tue Jan 5 13:46:35 2010 +0100 Fixed newer autotools warningng about AC_CONFIG_MACRO_DIR Makefile.am | 2 ++ configure.in | 1 + 2 files changed, 3 insertions(+), 0 deletions(-) commit 11fec367d1a13c3f0248f8542eb805b8d9571685 Author: malosek Date: Tue Jan 5 11:22:14 2010 +0100 added pending event fd handling by the pgm_sender src/pgm_sender.cpp | 9 ++++++++- src/pgm_sender.hpp | 1 + src/pgm_socket.cpp | 10 +++++++--- src/pgm_socket.hpp | 2 +- 4 files changed, 17 insertions(+), 5 deletions(-) commit 472ddf8de2c93f750831d52b5473cdbed1db51e8 Merge: d10c605 4f6baf4 Author: malosek Date: Tue Jan 5 11:05:03 2010 +0100 fixed failed merge with autogen.sh commit d10c605fa94a8fe8265785043aeef63983e07f3f Author: malosek Date: Tue Jan 5 10:51:54 2010 +0100 updated to libpgm-2.0.20rc5 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.19rc4.tar.bz2 | Bin 317223 -> 0 bytes foreign/openpgm/libpgm-2.0.20rc5.tar.bz2 | Bin 0 -> 316958 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 4f6baf4dde627656b63cc4e2acdb78a8577ba640 Author: Martin Sustrik Date: Tue Jan 5 08:29:35 2010 +0100 Copyrights transferred from FastMQ to iMatix autogen.sh | 7 +------ bindings/c/zmq.h | 2 +- bindings/cpp/zmq.hpp | 2 +- bindings/java/Context.cpp | 2 +- bindings/java/Socket.cpp | 2 +- bindings/java/org/zmq/Context.java | 2 +- bindings/java/org/zmq/Socket.java | 2 +- bindings/python/pyzmq.cpp | 2 +- bindings/ruby/extconf.rb | 2 +- bindings/ruby/rbzmq.cpp | 2 +- builds/msvc/platform.hpp | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/zmq_queue.cpp | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- examples/chat/display.cpp | 2 +- examples/chat/prompt.cpp | 2 +- man/convert2pdf.sh | 2 +- man/man1/zmq_forwarder.1 | 2 +- man/man1/zmq_queue.1 | 2 +- man/man1/zmq_streamer.1 | 2 +- man/man3/zmq_bind.3 | 2 +- man/man3/zmq_close.3 | 2 +- man/man3/zmq_connect.3 | 2 +- man/man3/zmq_flush.3 | 2 +- man/man3/zmq_init.3 | 2 +- man/man3/zmq_msg_close.3 | 2 +- man/man3/zmq_msg_copy.3 | 2 +- man/man3/zmq_msg_data.3 | 2 +- man/man3/zmq_msg_init.3 | 2 +- man/man3/zmq_msg_init_data.3 | 2 +- man/man3/zmq_msg_init_size.3 | 2 +- man/man3/zmq_msg_move.3 | 2 +- man/man3/zmq_msg_size.3 | 2 +- man/man3/zmq_poll.3 | 2 +- man/man3/zmq_recv.3 | 2 +- man/man3/zmq_send.3 | 2 +- man/man3/zmq_setsockopt.3 | 2 +- man/man3/zmq_socket.3 | 2 +- man/man3/zmq_strerror.3 | 2 +- man/man3/zmq_term.3 | 2 +- man/man7/zmq.7 | 2 +- man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 2 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- packages/debian/copyright | 2 +- perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- perf/cpp/local_lat.cpp | 2 +- perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 2 +- perf/cpp/remote_thr.cpp | 2 +- perf/java/local_lat.java | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_lat.java | 2 +- perf/java/remote_thr.java | 2 +- perf/python/local_lat.py | 2 +- perf/python/local_thr.py | 2 +- perf/python/remote_lat.py | 2 +- perf/python/remote_thr.py | 2 +- perf/ruby/local_lat.rb | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_lat.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- src/app_thread.cpp | 2 +- src/app_thread.hpp | 2 +- src/atomic_bitmap.hpp | 2 +- src/atomic_counter.hpp | 2 +- src/atomic_ptr.hpp | 2 +- src/command.hpp | 2 +- src/config.hpp | 2 +- src/decoder.hpp | 2 +- src/devpoll.cpp | 2 +- src/devpoll.hpp | 2 +- src/dispatcher.cpp | 2 +- src/dispatcher.hpp | 2 +- src/downstream.cpp | 2 +- src/downstream.hpp | 2 +- src/encoder.hpp | 2 +- src/epoll.cpp | 2 +- src/epoll.hpp | 2 +- src/err.cpp | 2 +- src/err.hpp | 2 +- src/fd.hpp | 2 +- src/fd_signaler.cpp | 2 +- src/fd_signaler.hpp | 2 +- src/fq.cpp | 2 +- src/fq.hpp | 2 +- src/i_endpoint.hpp | 2 +- src/i_engine.hpp | 2 +- src/i_inout.hpp | 2 +- src/i_poll_events.hpp | 2 +- src/i_signaler.hpp | 2 +- src/io_object.cpp | 2 +- src/io_object.hpp | 2 +- src/io_thread.cpp | 2 +- src/io_thread.hpp | 2 +- src/ip.cpp | 2 +- src/ip.hpp | 2 +- src/kqueue.cpp | 2 +- src/kqueue.hpp | 2 +- src/lb.cpp | 2 +- src/lb.hpp | 2 +- src/likely.hpp | 2 +- src/msg_content.hpp | 2 +- src/mutex.hpp | 2 +- src/object.cpp | 2 +- src/object.hpp | 2 +- src/options.cpp | 2 +- src/options.hpp | 2 +- src/owned.cpp | 2 +- src/owned.hpp | 2 +- src/p2p.cpp | 2 +- src/p2p.hpp | 2 +- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 2 +- src/pgm_socket.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/poll.cpp | 2 +- src/poll.hpp | 2 +- src/poller.hpp | 2 +- src/pub.cpp | 2 +- src/pub.hpp | 2 +- src/rep.cpp | 2 +- src/rep.hpp | 2 +- src/req.cpp | 2 +- src/req.hpp | 2 +- src/select.cpp | 2 +- src/select.hpp | 2 +- src/session.cpp | 2 +- src/session.hpp | 2 +- src/simple_semaphore.hpp | 2 +- src/socket_base.cpp | 2 +- src/socket_base.hpp | 2 +- src/stdint.hpp | 2 +- src/sub.cpp | 2 +- src/sub.hpp | 2 +- src/tcp_connecter.cpp | 2 +- src/tcp_connecter.hpp | 2 +- src/tcp_listener.cpp | 2 +- src/tcp_listener.hpp | 2 +- src/tcp_socket.cpp | 2 +- src/tcp_socket.hpp | 2 +- src/thread.cpp | 2 +- src/thread.hpp | 2 +- src/upstream.cpp | 2 +- src/upstream.hpp | 2 +- src/uuid.cpp | 2 +- src/uuid.hpp | 2 +- src/windows.hpp | 2 +- src/wire.hpp | 2 +- src/xrep.cpp | 2 +- src/xrep.hpp | 2 +- src/xreq.cpp | 2 +- src/xreq.hpp | 2 +- src/yarray.hpp | 2 +- src/yarray_item.hpp | 2 +- src/ypipe.hpp | 2 +- src/ypollset.cpp | 2 +- src/ypollset.hpp | 2 +- src/yqueue.hpp | 2 +- src/zmq.cpp | 2 +- src/zmq_connecter.cpp | 2 +- src/zmq_connecter.hpp | 2 +- src/zmq_decoder.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.cpp | 2 +- src/zmq_encoder.hpp | 2 +- src/zmq_engine.cpp | 2 +- src/zmq_engine.hpp | 2 +- src/zmq_init.cpp | 2 +- src/zmq_init.hpp | 2 +- src/zmq_listener.cpp | 2 +- src/zmq_listener.hpp | 2 +- 184 files changed, 184 insertions(+), 189 deletions(-) commit bf01727f4b5d2e12daa5e4289c556fb3b7ade3f3 Author: malosek Date: Mon Jan 4 16:04:40 2010 +0100 updated to libpgm 2.0.19rc4 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.18rc3.tar.bz2 | Bin 315989 -> 0 bytes foreign/openpgm/libpgm-2.0.19rc4.tar.bz2 | Bin 0 -> 317223 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 1528edb963b2c9d292758f7704eeda336d358db2 Author: malosek Date: Mon Jan 4 16:03:49 2010 +0100 fixed autogen.sh complaining about existing config dir autogen.sh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit f2b235db165e459f7f265993477dae0dc987125a Author: Martin Sustrik Date: Mon Jan 4 15:46:20 2010 +0100 ZMQII-29: Add timeout to zmq_poll function bindings/c/zmq.h | 2 +- bindings/cpp/zmq.hpp | 4 ++-- man/man3/zmq_poll.3 | 10 ++++++++-- src/zmq.cpp | 23 ++++++++++++++++++----- 4 files changed, 29 insertions(+), 10 deletions(-) commit 7884f4541aa6f95b76e0b2429baaf11108c543a1 Author: Martin Sustrik Date: Mon Jan 4 15:13:04 2010 +0100 problem with new version of autoreconf fixed autogen.sh | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) commit 1b90e5f6f50ecb512b22f73850f763a9a009c483 Author: malosek Date: Thu Dec 31 16:53:00 2009 +0100 added missing likely.hpp file into the dist src/Makefile.am | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 9bda63cd6378682af3b685dbbe0c47cdc4455295 Author: malosek Date: Thu Dec 31 16:35:04 2009 +0100 fixed minor gcc warning in src/pgm_receiver.cpp src/pgm_receiver.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 819590c04cb24f1627b140883e4106bb8a6f62eb Author: malosek Date: Thu Dec 31 16:31:13 2009 +0100 libpgm updated to 2.0.18rc3 configure.in | 10 +++++----- foreign/openpgm/libpgm-2.0.17rc2.tar.bz2 | Bin 315051 -> 0 bytes foreign/openpgm/libpgm-2.0.18rc3.tar.bz2 | Bin 0 -> 315989 bytes 3 files changed, 5 insertions(+), 5 deletions(-) commit 9fadf0b218b66e8448a2356f124dc1bb10f1f81d Author: malosek Date: Thu Dec 31 16:18:45 2009 +0100 fixed minor gcc warning in src/pgm_socket.cpp src/pgm_socket.cpp | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit d6da7903d0fc42356adbf4c43e04774a1b465632 Author: malosek Date: Thu Dec 31 15:47:44 2009 +0100 removed unused foreign/openpgm/create_custom_gsi_1.patch file Makefile.am | 1 - foreign/openpgm/create_custom_gsi_1.patch | 43 ----------------------------- 2 files changed, 0 insertions(+), 44 deletions(-) commit 7cb02fb3e7cbe614caefbb5d9ab34936fba2724f Author: malosek Date: Thu Dec 31 15:44:42 2009 +0100 fixed make dist for non pgm configuration configure.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 102077471c5863242b5e9a2e063e272edd5b48ea Author: Martin Sustrik Date: Tue Dec 29 16:50:28 2009 +0100 error in zmq_poll manpage fixed man/man3/zmq_poll.3 | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit e9cebc86ed8eeff2cc5dde49807a4851b43d1232 Author: unknown Date: Tue Dec 29 16:42:56 2009 +0100 EINPROGRESS definition added on Win32 platform bindings/c/zmq.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 23e5c3b342793ca871747b7d6681d445b34925bb Author: Martin Sustrik Date: Tue Dec 29 07:53:33 2009 +0100 polling on SUB socket fixed src/sub.cpp | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) commit 72161fb075025410312c6735d681c3de9a36a4e5 Author: Martin Sustrik Date: Mon Dec 28 21:29:31 2009 +0100 format of subscriptions changed (no * needed anymore) src/socket_base.cpp | 11 ++++-- src/sub.cpp | 90 +++++++++++++++++++++------------------------------ src/sub.hpp | 9 +---- src/zmq_engine.cpp | 7 +++- 4 files changed, 51 insertions(+), 66 deletions(-) commit c97967ed4b70de700db38cc2661bbe43262bc029 Author: unknown Date: Mon Dec 28 16:20:21 2009 +0100 MSVC build fixed builds/msvc/libzmq/libzmq.vcproj | 16 ++++------------ src/zmq_init.cpp | 1 + 2 files changed, 5 insertions(+), 12 deletions(-) commit 5852db451a76905336601c5ba3e4f33006f007fb Author: Martin Sustrik Date: Mon Dec 28 11:51:06 2009 +0100 PGM code cleanup src/pgm_receiver.cpp | 148 ++++++++++++++++------------------------- src/pgm_receiver.hpp | 13 ++-- src/pgm_sender.cpp | 94 ++++++++++----------------- src/pgm_sender.hpp | 16 +---- src/pgm_socket.cpp | 178 +++++++++++++++----------------------------------- src/pgm_socket.hpp | 37 ++--------- 6 files changed, 159 insertions(+), 327 deletions(-) commit aebff623f36efddc0de7a3192832b61802f8cec8 Author: Martin Sustrik Date: Wed Dec 23 19:37:56 2009 +0100 ZMQII-28: Bidirectional introduction on TCP connection establishment src/Makefile.am | 8 +- src/i_inout.hpp | 6 +- src/pgm_receiver.cpp | 3 +- src/pgm_receiver.hpp | 6 +- src/pgm_sender.cpp | 3 +- src/pgm_sender.hpp | 6 +- src/session.cpp | 54 +++++++++--- src/session.hpp | 24 ++++-- src/socket_base.cpp | 83 +++++++++++++------ src/socket_base.hpp | 27 ++++-- src/zmq_connecter.cpp | 15 ++-- src/zmq_connecter.hpp | 8 +- src/zmq_connecter_init.cpp | 132 ------------------------------ src/zmq_connecter_init.hpp | 79 ------------------ src/zmq_engine.cpp | 2 +- src/zmq_init.cpp | 195 ++++++++++++++++++++++++++++++++++++++++++++ src/zmq_init.hpp | 89 ++++++++++++++++++++ src/zmq_listener.cpp | 6 +- src/zmq_listener_init.cpp | 137 ------------------------------- src/zmq_listener_init.hpp | 79 ------------------ 20 files changed, 445 insertions(+), 517 deletions(-) commit b3bd4c15fe869de4f5c530ecc5942968677a85c3 Author: Martin Sustrik Date: Tue Dec 22 09:01:01 2009 +0100 OpenPGM error handling fixed src/pgm_socket.cpp | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) commit 7cf18a2aec8300099e3c3e236ac3cefa3be746d0 Author: Martin Sustrik Date: Mon Dec 21 20:45:52 2009 +0100 minor fixes src/app_thread.cpp | 4 ++-- src/object.hpp | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) commit 5a0674dfeccf0d80dc92e77a8630be280c71fb84 Author: Martin Sustrik Date: Mon Dec 21 18:50:24 2009 +0100 OpenPGM error handling improved bindings/python/pyzmq.cpp | 2 +- src/pgm_socket.cpp | 64 +++++++++++++++++++++++++++++++++++---------- src/pgm_socket.hpp | 12 ++++---- 3 files changed, 57 insertions(+), 21 deletions(-) commit 990a1e8686bdeb3472a27d00cb2436936a4d0d26 Author: Martin Sustrik Date: Fri Dec 18 16:01:58 2009 +0100 zmq_cl(7) man page added man/man7/zmq_cl.7 | 121 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 118 insertions(+), 3 deletions(-) commit bad224251e97205abaf987e8e998bc14af32223c Author: Martin Sustrik Date: Fri Dec 18 15:46:21 2009 +0100 minor errors in zmq_cpp man page fixed man/man7/zmq_cpp.7 | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) commit d50c7daf9eafe36ca2df7210ff2e82487e85f842 Author: Martin Sustrik Date: Fri Dec 18 14:34:57 2009 +0100 hint parameter (zmq_free_fn) added to Lisp binding bindings/cl/zeromq.lisp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) commit 1924cba88985a36cb1422efd2fb287292b41eb44 Author: Martin Sustrik Date: Fri Dec 18 14:33:22 2009 +0100 memory management in Lisp binding fixed bindings/cl/zeromq-api.lisp | 59 +++++++++++++++++++++++++++++------------- 1 files changed, 41 insertions(+), 18 deletions(-) commit 86d68cbcbd24e6dfe6dd1ed230c7806408b70668 Author: Martin Sustrik Date: Fri Dec 18 14:19:28 2009 +0100 memory leaks related to OpenPGM errors fixed src/pgm_socket.cpp | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) commit 500d32a540d762d30a59e952a4f2216d73e4654c Author: Martin Sustrik Date: Wed Dec 16 17:19:20 2009 +0100 examples & perf added to the Debian package packages/debian/control | 50 +++++++++++++++++++++++++++---- packages/debian/dirs | 3 ++ packages/debian/rules | 7 ++-- packages/debian/zeromq-examples.files | 2 + packages/debian/zeromq-examples.install | 2 + packages/debian/zeromq-perf.files | 10 ++++++ packages/debian/zeromq-perf.install | 10 ++++++ 7 files changed, 75 insertions(+), 9 deletions(-) commit 667d1a8280e2dedd7f3ccdbd39605263ba8e98d7 Author: Martin Sustrik Date: Wed Dec 16 15:20:14 2009 +0100 man page updated to match change in zmq_free_fn man/man3/zmq_msg_init_data.3 | 23 +++++++++++++++-------- 1 files changed, 15 insertions(+), 8 deletions(-) commit ab5abf6c7ec7668c4a8373d87c491d22d0db144d Author: Martin Sustrik Date: Wed Dec 16 15:08:37 2009 +0100 hint parameter added to zmq_free function bindings/c/zmq.h | 4 ++-- bindings/cpp/zmq.hpp | 10 ++++++---- src/msg_content.hpp | 1 + src/zmq.cpp | 6 ++++-- 4 files changed, 13 insertions(+), 8 deletions(-) commit 02202ec30ecca9e538cc807ce86b54d822c823bd Author: Martin Sustrik Date: Wed Dec 16 14:54:11 2009 +0100 addition to CREDITS section of AUTHORS file AUTHORS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 5e77a1daa46f1b757b08f65895778f803575469c Author: Martin Sustrik Date: Wed Dec 16 14:43:50 2009 +0100 debian package added packages/debian/README.Debian | 6 ++ packages/debian/changelog | 6 ++ packages/debian/cl-zeromq.files | 7 ++ packages/debian/cl-zeromq.install | 6 ++ packages/debian/cl-zeromq.links | 1 + packages/debian/compat | 1 + packages/debian/control | 123 +++++++++++++++++++++++++++ packages/debian/copyright | 18 ++++ packages/debian/dirs | 2 + packages/debian/docs | 2 + packages/debian/libzeromq-dev.files | 37 ++++++++ packages/debian/libzeromq-dev.install | 19 ++++ packages/debian/libzeromq-python.files | 1 + packages/debian/libzeromq-python.install | 1 + packages/debian/libzeromq-ruby.files | 1 + packages/debian/libzeromq-ruby.install | 1 + packages/debian/libzeromq0.files | 2 + packages/debian/libzeromq0.install | 1 + packages/debian/rules | 135 ++++++++++++++++++++++++++++++ packages/debian/shlibs.local | 1 + packages/debian/zeromq-utils.files | 6 ++ packages/debian/zeromq-utils.install | 6 ++ 22 files changed, 383 insertions(+), 0 deletions(-) commit 7479871cde46371c593f35c0ace3d9e984fddb1a Merge: 8aa0908 3e64083 Author: Martin Sustrik Date: Tue Dec 15 23:50:32 2009 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 8aa0908635f255e2d533539d5330b92b62dc88ba Author: Martin Sustrik Date: Tue Dec 15 23:49:55 2009 +0100 all news converted to nothrow variant src/app_thread.cpp | 23 ++++++++++++----------- src/dispatcher.cpp | 12 ++++++++---- src/epoll.cpp | 3 ++- src/io_thread.cpp | 4 +++- src/kqueue.cpp | 3 ++- src/pgm_receiver.cpp | 4 +++- src/pgm_socket.cpp | 2 ++ src/session.cpp | 8 ++++++-- src/socket_base.cpp | 33 +++++++++++++++++++++------------ src/tcp_listener.cpp | 1 - src/yqueue.hpp | 5 +++-- src/zmq.cpp | 4 ++-- src/zmq_connecter.cpp | 6 ++++-- src/zmq_connecter_init.cpp | 5 ++++- src/zmq_engine.cpp | 4 +++- src/zmq_listener.cpp | 6 ++++-- src/zmq_listener_init.cpp | 9 ++++++--- 17 files changed, 85 insertions(+), 47 deletions(-) commit 3e640836674872961f48efb4dc7badb20d736407 Author: unknown Date: Tue Dec 15 18:00:00 2009 +0100 win32 build fixed builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ src/zmq_listener_init.cpp | 1 + 2 files changed, 17 insertions(+), 0 deletions(-) commit 2cef05d86976784f4bc1083cb0fa548e267ac132 Author: Martin Sustrik Date: Tue Dec 15 17:49:40 2009 +0100 reconnection mechanism added to tcp transport src/i_inout.hpp | 15 +++++++++++++-- src/io_object.hpp | 1 + src/io_thread.hpp | 1 + src/object.hpp | 5 +++-- src/session.cpp | 23 +++++++++++++++++++++-- src/session.hpp | 5 ++++- src/zmq_connecter.cpp | 10 +++++++--- src/zmq_connecter.hpp | 5 ++++- src/zmq_connecter_init.cpp | 36 +++++++++++++++++++++--------------- src/zmq_connecter_init.hpp | 11 +++++++---- src/zmq_engine.cpp | 23 ++++++++++++++++++++--- src/zmq_engine.hpp | 5 ++++- src/zmq_listener_init.cpp | 22 ++++++++++++++++++++-- src/zmq_listener_init.hpp | 5 ++++- 14 files changed, 130 insertions(+), 37 deletions(-) commit 14b112301e62af5115ab870d97ae448c2e3deddb Author: Martin Sustrik Date: Tue Dec 15 13:58:21 2009 +0100 handle error during connecting by eventual reconnection src/zmq_connecter.cpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit e49115224a7957b0e5d49326bc02ae6af186eaf9 Author: Martin Sustrik Date: Tue Dec 15 09:09:19 2009 +0100 zmq_encoder/decoder are able to add/trim prefixes from messages; fair queueing and load balancing algorithms factorised into separate classes src/Makefile.am | 4 ++ src/downstream.cpp | 34 ++------------- src/downstream.hpp | 10 +--- src/fq.cpp | 106 +++++++++++++++++++++++++++++++++++++++++++++++ src/fq.hpp | 64 +++++++++++++++++++++++++++++ src/lb.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/lb.hpp | 63 ++++++++++++++++++++++++++++ src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 2 +- src/sub.cpp | 50 ++++------------------- src/sub.hpp | 21 ++------- src/upstream.cpp | 58 +++----------------------- src/upstream.hpp | 14 +----- src/xrep.cpp | 17 ++++---- src/xrep.hpp | 5 ++- src/xreq.cpp | 28 ++++++------ src/xreq.hpp | 8 +++- src/zmq_decoder.cpp | 40 +++++++++++++++--- src/zmq_decoder.hpp | 7 +++- src/zmq_encoder.cpp | 21 ++++++++-- src/zmq_encoder.hpp | 4 +- src/zmq_engine.cpp | 4 +- 22 files changed, 476 insertions(+), 197 deletions(-) commit bd792faa9d6c78c375dbc52c6d773e157335da36 Author: Martin Sustrik Date: Mon Dec 14 11:46:30 2009 +0100 ZMQ_SNDBUF and ZMQ_RCVBUF honoured in PGM transport src/pgm_socket.cpp | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-) commit 68488215da8e03a74ca4da6b822e4cfa3b71d73a Author: Martin Sustrik Date: Sun Dec 13 18:32:22 2009 +0100 Man pages for XREQ/XREP/zmq_queue updated man/Makefile.am | 2 +- man/convert2pdf.sh | 2 ++ man/man1/zmq_queue.1 | 11 +++++++++++ man/man3/zmq_socket.3 | 37 +++++++++++++++++++++++++++++++++++-- 4 files changed, 49 insertions(+), 3 deletions(-) commit 0637e06387ac0676e9595246eb60a6809664b01a Author: unknown Date: Sun Dec 13 14:59:25 2009 +0100 zmq_streamer & zmq_queue are built under MSVC builds/msvc/libzmq/libzmq.vcproj | 20 +++- builds/msvc/msvc.sln | 18 +++ builds/msvc/zmq_queue/zmq_queue.vcproj | 174 ++++++++++++++++++++++++++ builds/msvc/zmq_streamer/zmq_streamer.vcproj | 174 ++++++++++++++++++++++++++ src/xrep.cpp | 5 + src/xreq.cpp | 5 + 6 files changed, 394 insertions(+), 2 deletions(-) commit fa6bf24d8030b0e54fd25b167064482e4cf08a36 Author: Martin Sustrik Date: Sun Dec 13 14:45:23 2009 +0100 XREP & XREQ socket types added; zmq_queue device added bindings/c/zmq.h | 6 +- bindings/cl/zeromq.lisp | 6 +- bindings/java/org/zmq/Socket.java | 6 +- bindings/python/pyzmq.cpp | 6 ++ bindings/ruby/rbzmq.cpp | 2 + configure.in | 15 +++- devices/Makefile.am | 8 ++- devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- devices/zmq_queue/Makefile.am | 9 ++ devices/zmq_queue/zmq_queue.cpp | 122 +++++++++++++++++++++++++++++++ devices/zmq_streamer/Makefile.am | 2 +- devices/zmq_streamer/zmq_streamer.cpp | 2 +- src/Makefile.am | 4 + src/app_thread.cpp | 8 ++ src/pgm_sender.cpp | 4 - src/xrep.cpp | 95 ++++++++++++++++++++++++ src/xrep.hpp | 57 ++++++++++++++ src/xreq.cpp | 95 ++++++++++++++++++++++++ src/xreq.hpp | 57 ++++++++++++++ 20 files changed, 490 insertions(+), 18 deletions(-) commit c43aded531014895973c283fdd82bb2e5e85c789 Author: Martin Sustrik Date: Sun Dec 13 11:27:43 2009 +0100 debug code removed from PGM engines src/pgm_receiver.cpp | 21 ----------- src/pgm_receiver.hpp | 10 +++-- src/pgm_sender.cpp | 33 +----------------- src/pgm_socket.cpp | 92 ++++--------------------------------------------- src/pgm_socket.hpp | 24 ++++--------- 5 files changed, 24 insertions(+), 156 deletions(-) commit f4ac8d7a443bd1afb35634d1cccb79943cc316e0 Author: Martin Sustrik Date: Sun Dec 13 09:56:02 2009 +0100 OpenPGM v1 support removed Makefile.am | 4 +- configure.in | 134 ++------------------ foreign/openpgm/libpgm-1.2.14.tar.bz2 | Bin 280029 -> 0 bytes foreign/openpgm/lost_data_tsi.patch | 76 ----------- src/Makefile.am | 59 --------- src/pgm_receiver.cpp | 10 -- src/pgm_sender.cpp | 18 --- src/pgm_sender.hpp | 2 - src/pgm_socket.cpp | 226 +-------------------------------- src/pgm_socket.hpp | 16 --- 10 files changed, 18 insertions(+), 527 deletions(-) commit 73b765e4b497f6a505cbf88c524085fa0e58e59c Author: Martin Sustrik Date: Sun Dec 13 09:11:08 2009 +0100 PGM transport fixed src/encoder.hpp | 26 ++++--- src/pgm_receiver.cpp | 5 +- src/pgm_sender.cpp | 6 +- src/pgm_socket.cpp | 193 ++++++++++++++++++++------------------------------ src/pgm_socket.hpp | 5 +- src/zmq_engine.cpp | 4 +- 6 files changed, 105 insertions(+), 134 deletions(-) commit d5670f34baa0751a5b4567a28caea4e4fa208727 Author: Martin Sustrik Date: Fri Dec 11 22:29:04 2009 +0100 ZMQII-26: Use zero-copy for large messages (rx side) src/decoder.hpp | 87 ++++++++++++++++++++++++++++++++++-------- src/encoder.hpp | 107 ++++++++++++++++++++++++++++++--------------------- src/zmq_decoder.cpp | 3 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.cpp | 3 +- src/zmq_encoder.hpp | 2 +- src/zmq_engine.cpp | 72 ++++++++++++++-------------------- src/zmq_engine.hpp | 13 ++---- 8 files changed, 174 insertions(+), 115 deletions(-) commit 770178724f9493e99c832863031aef016f143e9f Author: Martin Sustrik Date: Thu Dec 10 21:34:40 2009 +0100 errors are never predicted in branch prediction (likely/unlikely macros added) src/atomic_counter.hpp | 1 - src/err.hpp | 91 +++++++++++++++++++++++++++++------------------- src/likely.hpp | 32 +++++++++++++++++ 3 files changed, 87 insertions(+), 37 deletions(-) commit d4fdc26efc6b21103e446f712a484af910a57f2f Author: unknown Date: Thu Dec 10 16:46:22 2009 +0100 zmq_poll implemented on Win32 platform bindings/c/zmq.h | 7 +++ src/zmq.cpp | 125 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 125 insertions(+), 7 deletions(-) commit 986ab66b8f260614b2bd18f870ad98402c0f247a Author: unknown Date: Thu Dec 10 10:39:24 2009 +0100 ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (Win32) src/tcp_socket.cpp | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) commit 8d58643655b653c520fcdcc2a89b5067788f32fc Author: unknown Date: Thu Dec 10 10:33:07 2009 +0100 MSVC build for chat example added builds/msvc/display/display.vcproj | 176 ++++++++++++++++++++++++++++++++++++ builds/msvc/msvc.sln | 18 ++++ builds/msvc/prompt/prompt.vcproj | 176 ++++++++++++++++++++++++++++++++++++ examples/chat/prompt.cpp | 5 + 4 files changed, 375 insertions(+), 0 deletions(-) commit 2e39f892c353851fe90261db0a0875abab50539f Author: Martin Sustrik Date: Thu Dec 10 09:47:24 2009 +0100 ZMQII-27: Allow setting SNDBUF and RCVBUF size from 0MQ API (POSIX) bindings/c/zmq.h | 2 ++ bindings/cl/zeromq.lisp | 2 ++ bindings/java/org/zmq/Socket.java | 2 ++ bindings/python/pyzmq.cpp | 6 ++++++ bindings/ruby/rbzmq.cpp | 2 ++ man/man3/zmq_setsockopt.3 | 24 ++++++++++++++++++++++++ src/options.cpp | 18 ++++++++++++++++++ src/options.hpp | 3 +++ src/tcp_socket.cpp | 17 +++++++++++++++-- src/tcp_socket.hpp | 3 ++- src/zmq_connecter_init.cpp | 2 +- src/zmq_engine.cpp | 8 +++++--- src/zmq_engine.hpp | 5 ++++- src/zmq_listener_init.cpp | 2 +- 14 files changed, 87 insertions(+), 9 deletions(-) commit 72dacc35702a14ab0bb5a2650dffbb3bbda63175 Author: Martin Sustrik Date: Thu Dec 10 08:25:21 2009 +0100 zero-copy on tx side optimised to minimise number of user/kernel space transitions src/encoder.hpp | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) commit 1c1dfb50f88002ce7a024f2d8980b968d3aee1ae Author: Martin Sustrik Date: Wed Dec 9 14:12:25 2009 +0100 zmq_cpp(7) man page filled in man/man7/zmq_cpp.7 | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 95 insertions(+), 2 deletions(-) commit cab5a4a1596e5019c7fd306ad49aac67209b467c Author: Martin Sustrik Date: Wed Dec 9 09:19:16 2009 +0100 minor documentation updates examples/chat/README | 4 ++-- src/encoder.hpp | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) commit c98e29fb6e017a667452cd0a50536da691600353 Author: Martin Sustrik Date: Tue Dec 8 21:48:39 2009 +0100 README added to chat example examples/chat/README | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) commit 902d4f2282f4ed59f942be6fa1013b20dd964536 Author: Martin Sustrik Date: Tue Dec 8 16:13:51 2009 +0100 minor fix of zero-copy on tx side src/encoder.hpp | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit 9be877c68503c35f9f72c8b92bd11454e4fcad97 Author: Martin Sustrik Date: Tue Dec 8 15:41:50 2009 +0100 ZMQII-26: Use zero-copy for large messages src/encoder.hpp | 28 +++++++++++++++++++++++----- src/zmq_engine.cpp | 21 +++++++++++++-------- src/zmq_engine.hpp | 12 ++++++++---- 3 files changed, 44 insertions(+), 17 deletions(-) commit bfef2fcd0ba590169ad46ea45da9d36dca1b5b97 Author: Martin Sustrik Date: Mon Dec 7 21:52:10 2009 +0100 autotools build system builds chat example now Makefile.am | 4 ++-- configure.in | 25 ++++++++++++++++++------- examples/Makefile.am | 7 +++++++ examples/chat/Makefile.am | 11 +++++++++++ 4 files changed, 38 insertions(+), 9 deletions(-) commit a08a72dd082e5e62f0d043c71ea7d9b6fb80b57e Author: Martin Sustrik Date: Mon Dec 7 21:06:54 2009 +0100 chat example added examples/chat/display.cpp | 50 ++++++++++++++++++++++++++++++++++++ examples/chat/prompt.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++ src/fd_signaler.cpp | 2 +- 3 files changed, 113 insertions(+), 1 deletions(-) commit 82012667cca5249ba7aa16ac5880b86ac54f3e98 Author: Martin Sustrik Date: Mon Dec 7 17:28:43 2009 +0100 Deadlock on zmq_close src/fd_signaler.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) commit 9f495942736bfc1c1ef5f0b23d5a1bdab56d3757 Author: Martin Sustrik Date: Sat Dec 5 11:20:57 2009 +0100 C & C++ header files clean-up bindings/c/zmq.h | 257 ++++---------------------------------------------- bindings/cpp/zmq.hpp | 62 ++++++------- src/ypipe.hpp | 12 +-- 3 files changed, 53 insertions(+), 278 deletions(-) commit 356ce8fe917c1b3b645555bcd2ff0ff989c6829a Author: Martin Sustrik Date: Fri Dec 4 10:06:46 2009 +0100 man pages updated man/man1/zmq_forwarder.1 | 2 +- man/man1/zmq_streamer.1 | 2 +- man/man7/zmq.7 | 145 +++++++++++++++++++++++++++++++++++++++++++++- man/man7/zmq_cl.7 | 2 +- man/man7/zmq_cpp.7 | 3 +- man/man7/zmq_inproc.7 | 2 +- man/man7/zmq_pgm.7 | 2 +- man/man7/zmq_python.7 | 2 +- man/man7/zmq_ruby.7 | 2 +- man/man7/zmq_tcp.7 | 2 +- man/man7/zmq_udp.7 | 2 +- 11 files changed, 153 insertions(+), 13 deletions(-) commit 3e051e874ad03299cc9a9693cf8f20d6e37af329 Author: Martin Sustrik Date: Fri Dec 4 10:03:38 2009 +0100 Vitaly Mayatskikh added to authors section AUTHORS | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 721e37a371713ddb20c4dfcca253fe01f71a4af7 Author: Martin Sustrik Date: Fri Dec 4 10:02:25 2009 +0100 platform.hpp.in removed from the codebase src/platform.hpp.in | 234 --------------------------------------------------- 1 files changed, 0 insertions(+), 234 deletions(-) commit 734aaa2dcbd130cfc5d8ef0bd31bd259117f6c0c Author: Martin Sustrik Date: Thu Dec 3 12:58:16 2009 +0100 placeholders for new man pages added man/Makefile.am | 9 ++++++--- man/convert2pdf.sh | 18 ++++++++++++++++++ man/man1/zmq_streamer.1 | 11 +++++++++++ man/man7/zmq_cl.7 | 9 +++++++++ man/man7/zmq_cpp.7 | 9 +++++++++ man/man7/zmq_inproc.7 | 9 +++++++++ man/man7/zmq_pgm.7 | 9 +++++++++ man/man7/zmq_python.7 | 9 +++++++++ man/man7/zmq_ruby.7 | 9 +++++++++ man/man7/zmq_tcp.7 | 9 +++++++++ man/man7/zmq_udp.7 | 9 +++++++++ 11 files changed, 107 insertions(+), 3 deletions(-) commit 6fcdc5fa69ea44d38e5505c23a6e9645efd35027 Author: Martin Sustrik Date: Thu Dec 3 10:14:07 2009 +0100 common lisp binding & perf tests added bindings/Makefile.am | 8 +- bindings/cl/Makefile.am | 9 ++ bindings/cl/meta.lisp | 59 +++++++++++ bindings/cl/package.lisp | 108 +++++++++++++++++++ bindings/cl/zeromq-api.lisp | 155 +++++++++++++++++++++++++++ bindings/cl/zeromq.asd | 38 +++++++ bindings/cl/zeromq.lisp | 244 +++++++++++++++++++++++++++++++++++++++++++ configure.in | 21 ++++ perf/Makefile.am | 2 +- perf/cl/Makefile.am | 2 + perf/cl/lat-parms.lisp | 22 ++++ perf/cl/local-lat-poll.lisp | 43 ++++++++ perf/cl/local-lat.lisp | 52 +++++++++ perf/cl/local-thr.lisp | 54 ++++++++++ perf/cl/remote-lat.lisp | 50 +++++++++ perf/cl/remote-thr.lisp | 41 +++++++ perf/cl/thr-parms.lisp | 25 +++++ 17 files changed, 930 insertions(+), 3 deletions(-) commit 7146ef85e96551ce6f7b80d014463f246d09c878 Author: Martin Sustrik Date: Wed Dec 2 21:26:47 2009 +0100 seqnum mechanism automated src/dispatcher.cpp | 2 ++ src/object.cpp | 27 ++++++++++++++++++++------- src/object.hpp | 12 +++++++++--- src/owned.cpp | 26 ++++++++------------------ src/owned.hpp | 14 ++------------ src/session.cpp | 5 ----- src/socket_base.cpp | 12 ++++++------ src/socket_base.hpp | 1 + src/zmq_connecter.cpp | 1 - src/zmq_connecter_init.cpp | 4 ++-- src/zmq_listener.cpp | 2 -- src/zmq_listener_init.cpp | 6 ++++-- 12 files changed, 54 insertions(+), 58 deletions(-) commit cb84580bbced0b5d34ddcbac6e0aed5d0ad7cae6 Author: Martin Sustrik Date: Tue Dec 1 19:09:58 2009 +0100 harmless uninitialised memory read fixed src/yqueue.hpp | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) commit 9bd309bda6522dfdd514dd0c4edae04322c83ed1 Author: Martin Sustrik Date: Tue Dec 1 18:50:54 2009 +0100 annoying optimisation in 'bind' command removed src/command.hpp | 4 +--- src/object.cpp | 11 ++++------- src/object.hpp | 6 +++--- src/session.cpp | 5 ++--- src/socket_base.cpp | 13 +++---------- src/socket_base.hpp | 3 +-- 6 files changed, 14 insertions(+), 28 deletions(-) commit c04583ff6ca3c27de5628a61b6b6ce59fd13c9d9 Author: Martin Sustrik Date: Tue Dec 1 15:12:42 2009 +0100 minor code beautification src/pipe.cpp | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) commit 0d704fceee5e1bd0fe9438fa380452b69cd29114 Author: unknown Date: Tue Dec 1 14:58:00 2009 +0100 MSVC warnings fixed src/pipe.cpp | 32 ++++++++++++++++++++++++-------- src/pipe.hpp | 6 ++++-- 2 files changed, 28 insertions(+), 10 deletions(-) commit 9cff475af849897f669049fd7748f875fa1cd6c3 Author: malosek Date: Mon Nov 30 18:18:13 2009 +0100 added libpgm-2.0.17rc2 into the dist package Makefile.am | 4 ++-- configure.in | 21 +++++++++++++++------ foreign/openpgm/libpgm-2.0.17rc2.tar.bz2 | Bin 0 -> 315051 bytes 3 files changed, 17 insertions(+), 8 deletions(-) commit 82242f6a9e06d855ff2ac5616196a97868838a6c Author: malosek Date: Mon Nov 30 17:48:16 2009 +0100 minor formatting fix in zmq_init.3 man page man/man3/zmq_init.3 | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit c637bf292d0dc97be5c94c5c96a033c2d665576c Merge: 9ccf2b4 fa1641a Author: malosek Date: Mon Nov 30 16:45:36 2009 +0100 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 9ccf2b42cf932b4c29ea20cc9c6e3d5d8e7a62b4 Author: malosek Date: Mon Nov 30 16:45:18 2009 +0100 minor tweaks in pgm code src/pgm_sender.cpp | 4 ++++ src/pgm_socket.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletions(-) commit fa1641afc593be5926e558381861112b584e861a Author: malosek Date: Fri Nov 27 14:30:48 2009 +0100 msvc build fixed bindings/c/zmq.h | 3 +++ builds/msvc/libzmq/libzmq.vcproj | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 0 deletions(-) commit 19ce7c0e77f703ed2ec3b54685ddf4a6f2329ffe Author: Martin Sustrik Date: Thu Nov 26 12:41:50 2009 +0100 zmq_msg_data.3 referenced twice in Makefile.am - fixed AUTHORS | 1 + man/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 8d85638f77ec0aa886170ba6bb49763ef165393b Author: Martin Sustrik Date: Thu Nov 26 12:01:26 2009 +0100 memory leak in message encoder fixed AUTHORS | 1 + perf/c/local_thr.c | 3 +++ src/session.cpp | 4 ---- src/zmq_decoder.cpp | 8 +++++++- src/zmq_encoder.cpp | 7 ++++++- src/zmq_listener_init.cpp | 1 - 6 files changed, 17 insertions(+), 7 deletions(-) commit 92aa9e94e21b652839faa3dda27c67571bad315d Author: Martin Sustrik Date: Wed Nov 25 08:55:03 2009 +0100 experimental code to use futexes instead of mutexes added to simple_semapthore_t src/simple_semaphore.hpp | 60 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 57 insertions(+), 3 deletions(-) commit c98fd6bc3f2a49d7cb0b820a07354168c98f60b7 Author: Martin Sustrik Date: Tue Nov 24 11:23:10 2009 +0100 ZMQII-25: Implement streamed request/reply bindings/c/zmq.h | 6 ++ bindings/java/org/zmq/Socket.java | 2 + bindings/python/pyzmq.cpp | 6 ++ bindings/ruby/rbzmq.cpp | 2 + configure.in | 15 +++- devices/Makefile.am | 8 ++- devices/zmq_forwarder/zmq_forwarder.cpp | 7 +- devices/zmq_streamer/Makefile.am | 9 ++ devices/zmq_streamer/zmq_streamer.cpp | 122 ++++++++++++++++++++++++++ man/man3/zmq_socket.3 | 9 ++ src/Makefile.am | 4 + src/app_thread.cpp | 14 +++- src/downstream.cpp | 131 ++++++++++++++++++++++++++++ src/downstream.hpp | 64 ++++++++++++++ src/p2p.hpp | 4 +- src/pub.hpp | 4 +- src/rep.cpp | 2 +- src/rep.hpp | 4 +- src/req.hpp | 4 +- src/sub.hpp | 4 +- src/upstream.cpp | 143 +++++++++++++++++++++++++++++++ src/upstream.hpp | 69 +++++++++++++++ 22 files changed, 612 insertions(+), 21 deletions(-) commit 5cd98bc575517ea72c435770a5313711484f7d34 Author: Martin Sustrik Date: Mon Nov 23 09:22:25 2009 +0100 the rest of man3 man pages filled in man/man3/zmq_msg_close.3 | 20 +++++++++++++++ man/man3/zmq_msg_copy.3 | 31 ++++++++++++++++++++++++ man/man3/zmq_msg_data.3 | 15 ++++++++++++ man/man3/zmq_msg_init.3 | 21 ++++++++++++++++ man/man3/zmq_msg_init_data.3 | 33 ++++++++++++++++++++++++++ man/man3/zmq_msg_init_size.3 | 32 +++++++++++++++++++++++++ man/man3/zmq_msg_move.3 | 26 ++++++++++++++++++++ man/man3/zmq_msg_size.3 | 18 ++++++++++++++ man/man3/zmq_poll.3 | 53 ++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 249 insertions(+), 0 deletions(-) commit e90ada0d044636201c57786307a49a52f9cf7643 Author: Martin Sustrik Date: Sun Nov 22 16:51:21 2009 +0100 more man pages filled in bindings/c/zmq.h | 2 +- man/man3/zmq_bind.3 | 36 ++++++++++++++++ man/man3/zmq_close.3 | 15 +++++++ man/man3/zmq_connect.3 | 37 ++++++++++++++++- man/man3/zmq_flush.3 | 25 +++++++++++ man/man3/zmq_init.3 | 3 +- man/man3/zmq_recv.3 | 40 +++++++++++++++++ man/man3/zmq_send.3 | 52 +++++++++++++++++++++++ man/man3/zmq_setsockopt.3 | 103 +++++++++++++++++++++++++++++++++++++++++++++ man/man3/zmq_socket.3 | 56 ++++++++++++++++++++++++ man/man3/zmq_term.3 | 2 + 11 files changed, 368 insertions(+), 3 deletions(-) commit 6602cce9af93539df8f1c43235e7e7130a3df60d Author: Martin Sustrik Date: Sun Nov 22 12:05:11 2009 +0100 zmq_init, zmq_term & zmq_strerror man pages added man/Makefile.am | 2 +- man/convert2pdf.sh | 2 ++ man/man3/zmq_init.3 | 26 ++++++++++++++++++++++++++ man/man3/zmq_strerror.3 | 27 +++++++++++++++++++++++++++ man/man3/zmq_term.3 | 11 +++++++++++ 5 files changed, 67 insertions(+), 1 deletions(-) commit ed5563f75285197aa0cdbe8a0dc6f80c5bb1f89c Author: Martin Sustrik Date: Sun Nov 22 10:25:53 2009 +0100 man pages (dummy) added for zmq_msg_* functions man/Makefile.am | 5 ++++- man/convert2pdf.sh | 16 ++++++++++++++++ man/man3/zmq_msg_close.3 | 12 ++++++++++++ man/man3/zmq_msg_copy.3 | 12 ++++++++++++ man/man3/zmq_msg_data.3 | 12 ++++++++++++ man/man3/zmq_msg_init.3 | 12 ++++++++++++ man/man3/zmq_msg_init_data.3 | 15 +++++++++++++++ man/man3/zmq_msg_init_size.3 | 12 ++++++++++++ man/man3/zmq_msg_move.3 | 12 ++++++++++++ man/man3/zmq_msg_size.3 | 12 ++++++++++++ 10 files changed, 119 insertions(+), 1 deletions(-) commit 55b64a02e7f3b1ce9e512240a9f9a337ead3b54c Author: Martin Sustrik Date: Sun Nov 22 08:47:06 2009 +0100 man pages - initial (dummy) version Makefile.am | 8 +++++- configure.in | 8 ++++++- man/Makefile.am | 16 +++++++++++++++ man/convert2pdf.sh | 48 +++++++++++++++++++++++++++++++++++++++++++++ man/man1/zmq_forwarder.1 | 11 ++++++++++ man/man3/zmq_bind.3 | 12 +++++++++++ man/man3/zmq_close.3 | 12 +++++++++++ man/man3/zmq_connect.3 | 12 +++++++++++ man/man3/zmq_flush.3 | 12 +++++++++++ man/man3/zmq_init.3 | 12 +++++++++++ man/man3/zmq_poll.3 | 12 +++++++++++ man/man3/zmq_recv.3 | 12 +++++++++++ man/man3/zmq_send.3 | 12 +++++++++++ man/man3/zmq_setsockopt.3 | 12 +++++++++++ man/man3/zmq_socket.3 | 12 +++++++++++ man/man3/zmq_term.3 | 12 +++++++++++ man/man7/zmq.7 | 9 ++++++++ 17 files changed, 229 insertions(+), 3 deletions(-) commit c41daca3da6ffd033f93c3e24898414567f71eb3 Author: Martin Sustrik Date: Sat Nov 21 21:30:09 2009 +0100 race condition in inproc transport shutdown fixed src/command.hpp | 3 +++ src/object.cpp | 9 ++++++--- src/object.hpp | 6 +++--- src/session.cpp | 4 +++- src/socket_base.cpp | 16 ++++++++++++---- src/socket_base.hpp | 3 ++- 6 files changed, 29 insertions(+), 12 deletions(-) commit 64634605b3ccb90d582cfdf380535c89bf900a0e Author: Martin Sustrik Date: Sat Nov 21 21:13:29 2009 +0100 obsolete parameter removed from 'bind' command src/command.hpp | 1 - src/object.cpp | 9 +++------ src/object.hpp | 6 +++--- src/session.cpp | 2 +- src/socket_base.cpp | 6 ++---- src/socket_base.hpp | 3 +-- 6 files changed, 10 insertions(+), 17 deletions(-) commit 0e9ab2e8a3f5bc22f2c331c14236a2918a5512a8 Author: Martin Sustrik Date: Sat Nov 21 20:59:55 2009 +0100 inproc transport - initial commit src/dispatcher.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 12 ++++++++++ src/object.cpp | 15 ++++++++++++ src/object.hpp | 6 +++++ src/socket_base.cpp | 62 +++++++++++++++++++++++++++++++++++++++++++++++++- src/socket_base.hpp | 12 ++++++++++ src/zmq.cpp | 6 +++- 7 files changed, 165 insertions(+), 4 deletions(-) commit 14f2fecdcd9732fe741c211138a4ba327816a937 Author: Martin Sustrik Date: Thu Nov 19 09:53:49 2009 +0100 ZMQII-24: SEGFAULT when anonymous session disconnects src/pipe.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) commit c2e0661b0afb2f50f47e0275fa6603947f26d240 Author: Martin Sustrik Date: Thu Nov 19 08:06:52 2009 +0100 uninitialised variable in devpoll_t and kqueue_t src/devpoll.cpp | 3 ++- src/kqueue.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 26ca5ed8c62f8a88a32106a5c9e003712f4ca655 Author: Martin Sustrik Date: Sat Nov 14 18:57:04 2009 +0100 Fixing concurrency issue in rep.cpp resulting in broken connections with multiple requesters under heavy load. src/rep.cpp | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) commit 84585a9561b5e3bd39baa8d49b889455362334ea Author: malosek Date: Wed Nov 4 18:59:19 2009 +0100 pgm_transport_recvmsgv in process_upstream returns PGM_IO_STATUS_RATE_LIMITED on busy sender src/pgm_socket.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) commit c2cd7977f7a82e978d77b2d4d8e23d78f71e809c Author: malosek Date: Tue Nov 3 19:54:43 2009 +0100 update pgm_socket to recent openpgm2 src/pgm_socket.cpp | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) commit 08b02a43ae21e833a04d274fb20ef3bbc73c0d09 Author: malosek Date: Tue Nov 3 14:11:53 2009 +0100 fixed get_sender_fds and get_receiver_fds for openpgm2 src/pgm_socket.cpp | 83 +++++++++++++++++++++++++++++++-------------------- src/pgm_socket.hpp | 2 +- 2 files changed, 51 insertions(+), 34 deletions(-) commit 7d672d3ab8c74371b58b293f807db74760b18155 Author: malosek Date: Tue Nov 3 14:06:25 2009 +0100 minor fixes for MSVC++ 2005 build src/app_thread.cpp | 3 +++ src/fd.hpp | 2 +- src/windows.hpp | 5 +++++ 3 files changed, 9 insertions(+), 1 deletions(-) commit 7cbdcc954213b715ce83316538403bbce1fac99f Author: Martin Sustrik Date: Thu Oct 22 13:21:27 2009 +0200 ZMQII-21: Problem with fd_signaler_t::poll on socket close src/fd_signaler.cpp | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) commit 55acf365ea76b908388ca9726232bde90242cdcb Author: Martin Sustrik Date: Tue Oct 20 18:44:17 2009 +0200 releasing python global lock when doing blocking operations bindings/python/pyzmq.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) commit 8b08047cb08dd6ba7ae142007f82607183574ef6 Author: malosek Date: Mon Oct 19 19:00:04 2009 +0200 added --with-pgm2-examples configure option configure.in | 17 ++++++++ perf/c/Makefile.am | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++- src/Makefile.am | 4 +- 3 files changed, 123 insertions(+), 2 deletions(-) commit 71e455bfe5dd1df1220e9280e536be56238d2178 Author: malosek Date: Mon Oct 19 15:19:22 2009 +0200 ZMQII-19: add --disable-eventfd configure option configure.in | 27 +++++++++++++++++++++++++-- 1 files changed, 25 insertions(+), 2 deletions(-) commit 50c7d12be6c10c294143491b479c50349a3c84a3 Author: malosek Date: Mon Oct 12 22:53:11 2009 +0200 added HAVE_LIBWS2_32 into platform.hpp.in src/platform.hpp.in | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 0ce02058ebc35184b91399eee35d44ef01cd9e38 Author: malosek Date: Mon Oct 12 22:51:41 2009 +0200 updated 0MQ to recent OpenPGM2 rev.562 src/Makefile.am | 1 + src/pgm_socket.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) commit ea2f6558fd2a759b78364ded493c598f5ca5a2d3 Author: malosek Date: Mon Oct 12 22:50:01 2009 +0200 mingw fixed winsock linking issue configure.in | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) commit 7afc61ae7c4859fa1a6273e1964d378c00142746 Author: malosek Date: Tue Oct 6 12:57:24 2009 +0200 0MQ compilable on winXP mingw with --with-pgm2 option configure.in | 12 ++++++++-- src/Makefile.am | 53 ++++++++++++++++++++++++++++++++----------------- src/pgm_receiver.cpp | 5 ++++ src/pgm_receiver.hpp | 8 ++++++- src/pgm_sender.cpp | 6 +++- src/pgm_sender.hpp | 4 +++ src/pgm_socket.cpp | 23 ++++++++++++++------- src/pgm_socket.hpp | 13 ++++------- src/platform.hpp.in | 3 ++ 9 files changed, 86 insertions(+), 41 deletions(-) commit ac83175ef0f0084f281a416785679f8b56f551b9 Author: malosek Date: Mon Oct 5 16:57:26 2009 +0200 updated to recent PGM2 changes foreign/openpgm/create_custom_gsi_1.patch | 2 +- src/pgm_socket.cpp | 26 +++++++++++++++++--------- 2 files changed, 18 insertions(+), 10 deletions(-) commit 3daeff2786ce1d6d8e58f0ad15e693f2c48c94f9 Author: malosek Date: Mon Oct 5 15:06:40 2009 +0200 mingw port configure.in | 13 ++++++++----- src/fd.hpp | 4 ++-- src/platform.hpp.in | 3 +++ src/uuid.hpp | 7 ++++++- src/windows.hpp | 6 ++++++ 5 files changed, 25 insertions(+), 8 deletions(-) commit de2e439a52e93a4cb17a19e9ef9cadfd5ebf2cea Author: malosek Date: Mon Oct 5 15:06:08 2009 +0200 1 minor change in xmlParser.cpp foreign/xmlParser/xmlParser.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 14dc1f45cd1a328415db09ef1e06def6179dae00 Author: malosek Date: Mon Oct 5 12:28:34 2009 +0200 build system tuning - fixed make dist Makefile.am | 7 ++++--- configure.in | 15 +++++++++++---- src/Makefile.am | 11 ++++++----- 3 files changed, 21 insertions(+), 12 deletions(-) commit b0c97a5f8b88fca73338c1c173b446515e2ed366 Author: malosek Date: Mon Oct 5 10:37:49 2009 +0200 build system tuning Makefile.am | 1 + src/Makefile.am | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit d57ee0984ac3f8712063a7f83d7200be25ca5513 Merge: ff65e26 4efe236 Author: malosek Date: Mon Oct 5 10:22:31 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit ff65e26ce7567ea6a907e566f8530f4988231d68 Author: malosek Date: Mon Oct 5 10:22:12 2009 +0200 create_custom_gsi.patch renamed to create_custom_gsi_1.patch configure.in | 4 +- foreign/openpgm/create_custom_gsi.patch | 43 ----------------------------- foreign/openpgm/create_custom_gsi_1.patch | 43 +++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 45 deletions(-) commit e1b9fcd4b185cdcfd460a5d2ecb29d085856bb20 Author: malosek Date: Mon Oct 5 10:18:24 2009 +0200 moved pgm_create_custom_gsi into PGM1 and drop ssl dependency configure.in | 18 ++++++------- foreign/openpgm/create_custom_gsi.patch | 43 +++++++++++++++++++++++++++++++ foreign/openpgm/lost_data_tsi.patch | 4 +- src/pgm_socket.cpp | 18 +------------ src/pgm_socket.hpp | 3 -- src/platform.hpp.in | 6 ---- 6 files changed, 54 insertions(+), 38 deletions(-) commit 4efe2366d7394e8969fc9aa64c50be6842d8455f Author: Martin Sustrik Date: Fri Oct 2 10:46:36 2009 +0200 poller is a concept now rather than virtualised class src/Makefile.am | 2 +- src/devpoll.cpp | 41 +++++++++++-------------- src/devpoll.hpp | 13 ++++---- src/epoll.cpp | 16 ++++------ src/epoll.hpp | 14 ++++---- src/i_poller.hpp | 84 ----------------------------------------------------- src/io_object.cpp | 2 +- src/io_object.hpp | 6 ++- src/io_thread.cpp | 41 +------------------------ src/io_thread.hpp | 8 ++-- src/kqueue.cpp | 17 +++++------ src/kqueue.hpp | 13 ++++---- src/poll.cpp | 18 +++++------ src/poll.hpp | 13 ++++---- src/poller.hpp | 68 ++++++++++++++++++++++++++++++++++++++++++ src/select.cpp | 33 +++++++++------------ src/select.hpp | 13 ++++---- 17 files changed, 170 insertions(+), 232 deletions(-) commit 4a3b4dadead8fe2af65443d0be4cc8462b9aa597 Author: Martin Sustrik Date: Fri Oct 2 09:42:13 2009 +0200 ZMQII-9: Check and implement speculative reads & writes src/ypollset.cpp | 1 - src/zmq_engine.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletions(-) commit 49a9ef5fcb661827ee174415b4608e609bd0a65b Author: unknown Date: Thu Oct 1 13:48:04 2009 +0200 windows error handling improved bindings/c/zmq.h | 12 ++++++++++++ src/err.cpp | 43 +++++++++++++++++++++++++++++++++++++++++-- src/err.hpp | 1 + src/tcp_connecter.cpp | 10 +++++----- src/tcp_listener.cpp | 17 ++++++++++++----- src/zmq.cpp | 8 ++++++++ 6 files changed, 79 insertions(+), 12 deletions(-) commit cc631c4c6649b0d67114db13386a949426e35dbf Author: Martin Sustrik Date: Thu Oct 1 10:56:17 2009 +0200 ZMQII-18: Implement I/O multiplexing (first approximation) bindings/c/zmq.h | 33 ++++++++++++++ bindings/cpp/zmq.hpp | 5 ++ src/fd_signaler.hpp | 2 - src/i_signaler.hpp | 6 +++ src/p2p.cpp | 11 +++++ src/p2p.hpp | 2 + src/pub.cpp | 11 +++++ src/pub.hpp | 2 + src/rep.cpp | 17 +++++++ src/rep.hpp | 2 + src/req.cpp | 13 ++++++ src/req.hpp | 2 + src/socket_base.cpp | 15 ++++++ src/socket_base.hpp | 12 +++++ src/sub.cpp | 13 ++++++ src/sub.hpp | 2 + src/ypollset.cpp | 6 +++ src/ypollset.hpp | 1 + src/zmq.cpp | 117 +++++++++++++++++++++++++++++++++++++++++++++++++- 19 files changed, 269 insertions(+), 3 deletions(-) commit f2ff2c6e5c4e244dea28e1ac6ec3f886b7ebc356 Author: Martin Sustrik Date: Wed Sep 30 10:08:35 2009 +0200 checking for available messages added to ypipe/pipe src/pipe.cpp | 11 +++++++++++ src/pipe.hpp | 3 +++ src/ypipe.hpp | 24 ++++++++++++++++-------- 3 files changed, 30 insertions(+), 8 deletions(-) commit 84d854a088d27b642355d4e835a2d93e405452ae Author: Martin Sustrik Date: Tue Sep 29 15:40:29 2009 +0200 documentation error in zmq.h fixed bindings/c/zmq.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit 64e68e748607473befbcf2d96590d45dc7bc98db Author: malosek Date: Tue Sep 29 13:56:19 2009 +0200 detecting data loss for PGM2 receiver src/pgm_receiver.cpp | 10 ++++++++++ src/pgm_socket.cpp | 40 ++++++++++++++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) commit 39d915ded8ccb612ae1f9aaefcd93f349f4c8f4c Author: malosek Date: Mon Sep 28 18:06:06 2009 +0200 PGM2 sender src/pgm_receiver.cpp | 2 +- src/pgm_sender.cpp | 26 +++++++++++++-- src/pgm_sender.hpp | 3 ++ src/pgm_socket.cpp | 85 +++++++++++++++++++++++++++++++++++++++---------- src/pgm_socket.hpp | 8 +++- 5 files changed, 100 insertions(+), 24 deletions(-) commit cf6cc0128ff4d26e0059f399bbb8342ce259b996 Author: malosek Date: Fri Sep 25 17:50:12 2009 +0200 pgm2 receiver working (partly) src/Makefile.am | 3 +- src/pgm_socket.cpp | 161 +++++++++++++++++++++++++++++++++++---------------- src/pgm_socket.hpp | 14 ++++- src/socket_base.cpp | 4 +- 4 files changed, 129 insertions(+), 53 deletions(-) commit 72c5c5fff42fc0b4c9d1eaaaebe9d6e1dd8824f2 Author: malosek Date: Thu Sep 24 16:23:49 2009 +0200 --with-pgm2 compilable configure.in | 10 +++--- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 91 +++++++++++++++++++++++++++++++++++++++++++------ src/pgm_socket.hpp | 9 +---- 7 files changed, 89 insertions(+), 29 deletions(-) commit 33afdcd1adccd19ebd9f4ec9cc6d23a37975d135 Author: malosek Date: Thu Sep 24 12:43:35 2009 +0200 added --with-pgm2 into build system configure.in | 116 +++++++++++++++++++++++++++++++++++++++++--------- src/Makefile.am | 89 +++++++++++++++++++++++++++++++++++++- src/pgm_receiver.cpp | 2 +- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 2 +- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 2 +- src/pgm_socket.hpp | 2 +- src/platform.hpp.in | 8 +++- src/socket_base.cpp | 4 +- 10 files changed, 196 insertions(+), 33 deletions(-) commit 5aee5fd0cfc6351e843de1540eafa4e757066edc Author: malosek Date: Wed Sep 23 12:14:44 2009 +0200 Updated libzmq.vcproj file builds/msvc/libzmq/libzmq.vcproj | 28 ++++++++++++++++++++++++++++ 1 files changed, 28 insertions(+), 0 deletions(-) commit 27d8627cb5d8c91df2f09ecc1272e84be4fe3c80 Author: malosek Date: Wed Sep 23 11:31:03 2009 +0200 Updated changelog for alpha3 release ChangeLog | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) commit b0a1a16fc2a84afa0eb2715f680297caef521b54 Merge: 088a2db 2521130 Author: Martin Sustrik Date: Wed Sep 23 10:23:53 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 088a2db6746488c1ce4a73c357caaece50bbdf60 Author: Martin Sustrik Date: Wed Sep 23 10:22:54 2009 +0200 ZMQII-16: Change "struct zmq_msg_t" to "zmq_msg_t" in C binding bindings/c/zmq.h | 24 ++++++++++++------------ perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- src/p2p.cpp | 4 ++-- src/p2p.hpp | 4 ++-- src/pipe.cpp | 2 +- src/pipe.hpp | 4 ++-- src/pub.cpp | 4 ++-- src/pub.hpp | 4 ++-- src/rep.cpp | 4 ++-- src/rep.hpp | 4 ++-- src/req.cpp | 4 ++-- src/req.hpp | 4 ++-- src/socket_base.hpp | 10 ++++++---- src/sub.cpp | 4 ++-- src/sub.hpp | 6 +++--- 18 files changed, 46 insertions(+), 44 deletions(-) commit 25211307696752acc17e91783aa662dc9e423b21 Author: malosek Date: Wed Sep 23 10:22:39 2009 +0200 ZMQII-14: Change default for ZMQ_MCAST_LOOP to true src/options.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 85cbd7f83c10c70da8fa44fe7673143703f9710d Author: malosek Date: Tue Sep 22 15:12:51 2009 +0200 added PGM bus functionality Makefile.am | 1 + configure.in | 20 ++++- foreign/openpgm/lost_data_tsi.patch | 76 +++++++++++++++ src/pgm_receiver.cpp | 176 ++++++++++++++++++----------------- src/pgm_receiver.hpp | 37 +++++--- src/pgm_socket.cpp | 159 ++++++++----------------------- src/pgm_socket.hpp | 19 ++-- src/platform.hpp.in | 6 + 8 files changed, 265 insertions(+), 229 deletions(-) commit 3bd8f83f6d412221e4673ceb90b8ca7fa74ff2f1 Author: Martin Sustrik Date: Tue Sep 22 13:00:05 2009 +0200 language bindings use zmq_strerror instead of strerror bindings/cpp/zmq.hpp | 9 +-------- bindings/java/Context.cpp | 12 +++--------- bindings/java/Socket.cpp | 11 ++--------- bindings/python/pyzmq.cpp | 20 ++++++++++---------- bindings/ruby/rbzmq.cpp | 18 +++++++++--------- 5 files changed, 25 insertions(+), 45 deletions(-) commit a0db7f6b811e687eda452a7de9f5db112f715544 Author: Martin Sustrik Date: Tue Sep 22 12:08:18 2009 +0200 POSIX error codes unsupported on win platform faked bindings/c/zmq.h | 16 +++++++++++++--- src/zmq.cpp | 13 +++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit e136d923b7060ef64d44264f88e49057e6638f31 Author: Martin Sustrik Date: Tue Sep 22 11:52:35 2009 +0200 ZMQ-specific error codes added bindings/c/zmq.h | 34 +++++++++++++++++++++++++++++----- src/dispatcher.cpp | 2 +- src/err.cpp | 5 +++++ src/pub.cpp | 2 +- src/rep.cpp | 6 +++--- src/req.cpp | 8 ++++---- src/socket_base.cpp | 10 +++++----- src/sub.cpp | 4 ++-- src/zmq.cpp | 15 +++++++++++++++ 9 files changed, 65 insertions(+), 21 deletions(-) commit cc8136896d30890efb24aadc2d3058652aa43d45 Author: Martin Sustrik Date: Tue Sep 22 10:57:46 2009 +0200 documentation in zmq.h improved bindings/c/zmq.h | 283 ++++++++++++++++++++++++++++++++++++-------------- bindings/cpp/zmq.hpp | 13 --- src/zmq.cpp | 28 +---- 3 files changed, 208 insertions(+), 116 deletions(-) commit e6ca5da1815023e90306914dab101eeef4b6f199 Author: Martin Sustrik Date: Tue Sep 22 08:30:15 2009 +0200 Windows build fixed src/fd_signaler.cpp | 31 ++++++++++++++++--------------- src/p2p.cpp | 3 +++ src/rep.cpp | 2 ++ 3 files changed, 21 insertions(+), 15 deletions(-) commit b15f695976d21300beabc3e0ecef87c1a0b4dc4c Author: Martin Sustrik Date: Mon Sep 21 17:20:13 2009 +0200 different fixes to req/rep src/dispatcher.cpp | 8 ++++---- src/fd_signaler.cpp | 22 +++++++++++----------- src/options.cpp | 4 +++- src/options.hpp | 5 +++++ src/p2p.cpp | 14 +++----------- src/p2p.hpp | 2 -- src/pub.cpp | 14 +++----------- src/pub.hpp | 2 -- src/rep.cpp | 14 +++----------- src/rep.hpp | 2 -- src/req.cpp | 14 +++----------- src/req.hpp | 2 -- src/session.cpp | 36 ++++++++++++++++++++++++------------ src/socket_base.cpp | 40 +++++++++++++--------------------------- src/socket_base.hpp | 13 ++++--------- src/sub.cpp | 14 +++----------- src/sub.hpp | 2 -- 17 files changed, 79 insertions(+), 129 deletions(-) commit cb1b6fe32cbf3c7cf5961bb4156f2de743693a3a Author: Martin Sustrik Date: Mon Sep 21 14:39:59 2009 +0200 initial version of req/rep sockets src/Makefile.am | 8 + src/app_thread.cpp | 20 ++- src/app_thread.hpp | 3 +- src/i_endpoint.hpp | 7 +- src/options.cpp | 80 +++++++++ src/options.hpp | 3 + src/p2p.cpp | 92 ++++++++++ src/p2p.hpp | 56 ++++++ src/pipe.cpp | 28 +--- src/pipe.hpp | 19 +-- src/pub.cpp | 129 ++++++++++++++- src/pub.hpp | 24 +++- src/rep.cpp | 204 +++++++++++++++++++++++ src/rep.hpp | 79 +++++++++ src/req.cpp | 206 +++++++++++++++++++++++ src/req.hpp | 84 ++++++++++ src/session.cpp | 49 +++--- src/session.hpp | 6 +- src/socket_base.cpp | 460 ++++++++++++++------------------------------------- src/socket_base.hpp | 77 ++++----- src/sub.cpp | 88 +++++++++- src/sub.hpp | 38 ++++- src/yarray.hpp | 110 ++++++++++++ src/yarray_item.hpp | 62 +++++++ 24 files changed, 1460 insertions(+), 472 deletions(-) commit 7668b246fc3cf4a2a3b3ee9b1283ad8a4b12ac4f Author: Martin Sustrik Date: Sun Sep 20 12:03:14 2009 +0200 ZMQ_POLL option forces fd_signaler to be used in app_thread src/app_thread.cpp | 18 +++++++++++++++--- src/app_thread.hpp | 5 ++--- src/fd_signaler.cpp | 39 ++++++++++++++++++++++++--------------- src/fd_signaler.hpp | 3 --- src/i_signaler.hpp | 4 ++-- src/ypollset.cpp | 4 ++++ src/ypollset.hpp | 2 +- 7 files changed, 48 insertions(+), 27 deletions(-) commit 495a2228cd08a29946f9e9ce2e0721e789203e35 Author: Martin Sustrik Date: Sun Sep 20 10:58:00 2009 +0200 MSVC warnings removed src/fd_signaler.cpp | 11 ++++------- 1 files changed, 4 insertions(+), 7 deletions(-) commit f99b8fc921bc0e6aa55276d8c55e43c9d7f4375a Author: Martin Sustrik Date: Sun Sep 20 10:47:27 2009 +0200 receiving side of signaler virtualised src/app_thread.cpp | 4 +- src/fd_signaler.cpp | 55 ++++++++++++++++++++++++++++++++++++++------------ src/fd_signaler.hpp | 12 ++-------- src/i_signaler.hpp | 11 ++++++++++ src/io_thread.cpp | 4 +- src/ypollset.cpp | 8 +++--- src/ypollset.hpp | 18 +++++----------- 7 files changed, 70 insertions(+), 42 deletions(-) commit 50a8b9ea0c4a819073b46449dee8fc839b837ae5 Author: Martin Sustrik Date: Sun Sep 20 10:14:21 2009 +0200 'flags' parameter added to zmq_init bindings/c/zmq.h | 6 +++++- bindings/cpp/zmq.hpp | 4 ++-- bindings/java/Context.cpp | 4 ++-- bindings/java/org/zmq/Context.java | 8 +++++--- bindings/python/pyzmq.cpp | 13 ++++++++----- bindings/ruby/rbzmq.cpp | 11 +++++++---- perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 2 +- perf/c/remote_lat.c | 2 +- perf/c/remote_thr.c | 2 +- perf/java/local_lat.java | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_lat.java | 2 +- perf/java/remote_thr.java | 2 +- perf/ruby/local_lat.rb | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_lat.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- src/app_thread.cpp | 3 ++- src/app_thread.hpp | 3 ++- src/dispatcher.cpp | 8 +++++--- src/dispatcher.hpp | 2 +- src/fd_signaler.cpp | 6 ++++++ src/io_thread.cpp | 3 ++- src/io_thread.hpp | 3 ++- src/zmq.cpp | 8 ++++---- 26 files changed, 65 insertions(+), 41 deletions(-) commit edecf75b611cf0e6b1c2658846cff013434edad4 Author: Martin Sustrik Date: Thu Sep 17 12:29:32 2009 +0200 python binding checks ctx argument type bindings/python/pyzmq.cpp | 22 ++++++++++++---------- 1 files changed, 12 insertions(+), 10 deletions(-) commit 8cdf75327d847c464415ab32554d155febcf7c5e Author: Martin Sustrik Date: Thu Sep 17 11:44:39 2009 +0200 ChangeLog updated ChangeLog | 336 ++++++++++++++++++++++++++++++++----------------------------- 1 files changed, 175 insertions(+), 161 deletions(-) commit dffbdbb60c5d5caf01d13063a3d1babab0411338 Author: malosek Date: Thu Sep 17 11:31:28 2009 +0200 fixed compiler warning cast from uint64 to bool in socket_base.cpp src/socket_base.cpp | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) commit 1bd6d5e0f6a6013b2d43abb2a82f0027a92fcc96 Author: malosek Date: Thu Sep 17 11:26:39 2009 +0200 fixed missing xmlParser in dist package Makefile.am | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) commit 2be152967c90834bf02ab84e39980281d3f05002 Author: malosek Date: Thu Sep 17 10:49:02 2009 +0200 java binding Makefile.am cleanup bindings/java/Makefile.am | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) commit cff6eb43766ddbbc894237c1ffffc824ca3c79b6 Author: malosek Date: Thu Sep 17 10:29:02 2009 +0200 msvc directory moved into builds dir bindings/java/Socket.cpp | 2 +- builds/msvc/c_local_lat/c_local_lat.vcproj | 176 +++++++ builds/msvc/c_local_thr/c_local_thr.vcproj | 176 +++++++ builds/msvc/c_remote_lat/c_remote_lat.vcproj | 176 +++++++ builds/msvc/c_remote_thr/c_remote_thr.vcproj | 176 +++++++ builds/msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 +++++++ builds/msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 +++++++ builds/msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 +++++++ builds/msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 +++++++ builds/msvc/j_local_lat/j_local_lat.vcproj | 78 +++ builds/msvc/j_local_thr/j_local_thr.vcproj | 78 +++ builds/msvc/j_remote_lat/j_remote_lat.vcproj | 78 +++ builds/msvc/j_remote_thr/j_remote_thr.vcproj | 78 +++ builds/msvc/java/java.vcproj | 244 ++++++++++ builds/msvc/libzmq/libzmq.vcproj | 562 ++++++++++++++++++++++ builds/msvc/msvc.sln | 154 ++++++ builds/msvc/platform.hpp | 59 +++ builds/msvc/python/python.vcproj | 176 +++++++ builds/msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 +++++++ msvc/c_local_lat/c_local_lat.vcproj | 176 ------- msvc/c_local_thr/c_local_thr.vcproj | 176 ------- msvc/c_remote_lat/c_remote_lat.vcproj | 176 ------- msvc/c_remote_thr/c_remote_thr.vcproj | 176 ------- msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 ------- msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 ------- msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 ------- msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 ------- msvc/j_local_lat/j_local_lat.vcproj | 78 --- msvc/j_local_thr/j_local_thr.vcproj | 78 --- msvc/j_remote_lat/j_remote_lat.vcproj | 78 --- msvc/j_remote_thr/j_remote_thr.vcproj | 78 --- msvc/java/java.vcproj | 244 ---------- msvc/libzmq/libzmq.vcproj | 538 --------------------- msvc/msvc.sln | 154 ------ msvc/platform.hpp | 59 --- msvc/python/python.vcproj | 176 ------- msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 ------- 37 files changed, 3090 insertions(+), 3066 deletions(-) commit 3ebe9932f9c208966f8cb97d631d26df0367c151 Merge: 1a65504 d16b3bc Author: malosek Date: Wed Sep 16 17:07:15 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 1a655045951c29edda0b616640b9dac507cda164 Author: malosek Date: Wed Sep 16 17:06:59 2009 +0200 ruby directory moved into bindings dir Makefile.am | 9 +- bindings/Makefile.am | 8 +- bindings/ruby/Makefile.am | 11 ++ bindings/ruby/extconf.rb | 24 ++++ bindings/ruby/rbzmq.cpp | 277 +++++++++++++++++++++++++++++++++++++++++++++ configure.in | 2 +- ruby/Makefile.am | 11 -- ruby/extconf.rb | 24 ---- ruby/rbzmq.cpp | 277 --------------------------------------------- 9 files changed, 322 insertions(+), 321 deletions(-) commit c63387ca3657848c0eaa8014a863148c1e6525ff Author: malosek Date: Wed Sep 16 17:00:32 2009 +0200 python directory moved into bindings dir Makefile.am | 8 +- bindings/Makefile.am | 11 + bindings/python/Makefile.am | 7 + bindings/python/pyzmq.cpp | 528 +++++++++++++++++++++++++++++++++++++++++++ bindings/python/setup.py.in | 14 ++ configure.in | 3 +- python/Makefile.am | 7 - python/pyzmq.cpp | 528 ------------------------------------------- python/setup.py.in | 14 -- 9 files changed, 564 insertions(+), 556 deletions(-) commit 1b2a426656134b85ff4c75cb0cccbc53f2b83447 Author: malosek Date: Wed Sep 16 16:49:09 2009 +0200 c and cpp directories moved into bindings directory bindings/c/zmq.h | 216 +++++++++++++++++++++++ bindings/cpp/zmq.hpp | 283 +++++++++++++++++++++++++++++++ bindings/java/Makefile.am | 2 +- c/zmq.h | 216 ----------------------- cpp/zmq.hpp | 283 ------------------------------- devices/zmq_forwarder/Makefile.am | 2 +- devices/zmq_forwarder/zmq_forwarder.cpp | 2 +- perf/c/Makefile.am | 2 +- perf/cpp/Makefile.am | 2 +- perf/java/Makefile.am | 2 +- src/Makefile.am | 4 +- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/msg_content.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/pub.cpp | 2 +- src/socket_base.cpp | 2 +- src/sub.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 24 files changed, 520 insertions(+), 520 deletions(-) commit 6bfb9e6aaf0adad441d693a679c30ef30aeb5c14 Author: malosek Date: Wed Sep 16 16:22:23 2009 +0200 java directory moved into bindings directory II Makefile.am | 8 ++------ bindings/java/Makefile.am | 2 +- configure.in | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) commit 3de435a07d460e7eb2423a75e71a409b0f1143e2 Author: malosek Date: Wed Sep 16 16:22:00 2009 +0200 java directory moved into bindings directory bindings/java/Context.cpp | 96 +++++++++++++ bindings/java/Makefile.am | 58 ++++++++ bindings/java/Socket.cpp | 272 ++++++++++++++++++++++++++++++++++++ bindings/java/org/zmq/Context.java | 50 +++++++ bindings/java/org/zmq/Socket.java | 112 +++++++++++++++ java/Context.cpp | 96 ------------- java/Makefile.am | 58 -------- java/Socket.cpp | 272 ------------------------------------ java/org/zmq/Context.java | 50 ------- java/org/zmq/Socket.java | 112 --------------- 10 files changed, 588 insertions(+), 588 deletions(-) commit d16b3bc0c93452a4be7d06525793ac5190e38031 Merge: 35c58dc 10dd8c5 Author: Martin Sustrik Date: Wed Sep 16 15:52:39 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 35c58dc7331e3c5033b16829dff40437efe97a81 Author: Martin Sustrik Date: Wed Sep 16 15:37:20 2009 +0200 ZMQII-1: fix for devpoll, kqueue & poll src/devpoll.cpp | 3 ++- src/kqueue.cpp | 3 ++- src/poll.cpp | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) commit 10dd8c53460a28849aacf7d2e24b63d7fae11ae0 Merge: 03d494d fc7715b Author: malosek Date: Wed Sep 16 15:36:56 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 03d494d4f074a8707274e6d5fd21ac6dca917344 Author: malosek Date: Wed Sep 16 15:36:38 2009 +0200 added udp:// transport prefix for PGM UDP encapsulation src/pgm_receiver.cpp | 4 ++-- src/pgm_receiver.hpp | 2 +- src/pgm_sender.cpp | 10 ++++------ src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 33 +++++++-------------------------- src/pgm_socket.hpp | 2 +- src/socket_base.cpp | 13 +++++++++---- 7 files changed, 25 insertions(+), 41 deletions(-) commit fc7715b4636be7a0d49f27234359ddfddce23f5b Merge: f1c72d6 c6665f4 Author: Martin Sustrik Date: Wed Sep 16 15:27:39 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit f1c72d693e3bd252866a1f78e575493573eb57fe Author: Martin Sustrik Date: Wed Sep 16 15:26:49 2009 +0200 ZMQII-4: Failure in dev/poll poller src/zmq_connecter.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit c6665f46be7eb701866441087c35cdb1a08fc641 Author: malosek Date: Wed Sep 16 14:57:22 2009 +0200 set rc to 0 in its declaration (pyzmq.cpp) python/pyzmq.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 3b2c3cae095abf9b61cd72cf19f053071a8c614a Author: malosek Date: Wed Sep 16 14:55:11 2009 +0200 setsockopt cleanup in rbzmq perf/ruby/local_thr.rb | 2 +- ruby/rbzmq.cpp | 106 +++++++++++++++++++----------------------------- 2 files changed, 43 insertions(+), 65 deletions(-) commit 3534732c0614a764731fbea2431247068fa63330 Merge: 17800ac a71d002 Author: malosek Date: Wed Sep 16 14:26:04 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 17800ac85e667d18124d0e90f9387d6c90887570 Author: malosek Date: Wed Sep 16 14:25:49 2009 +0200 setsockopt cleanup in pyzmq.cpp python/pyzmq.cpp | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-) commit a71d00288008b7ed1dc91b6ad3d5fdf25a5e683e Merge: 4631fde 7a5db60 Author: Martin Sustrik Date: Wed Sep 16 14:03:42 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 4631fde7e385ea31e85f41290614afb9bda391c9 Author: Martin Sustrik Date: Wed Sep 16 14:02:43 2009 +0200 ZMQII-8: Failure during orphan pipe deallocation src/dispatcher.cpp | 4 ++-- src/session.cpp | 6 +++++- src/zmq_connecter_init.cpp | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) commit 7a5db6041f4f11ed502fa7446da900509dedb00f Author: malosek Date: Wed Sep 16 12:22:36 2009 +0200 added newly added socket options to all language bindings, P2P model changed to PUB/SUB for throughput tests c/zmq.h | 2 +- java/Socket.cpp | 1 + java/org/zmq/Socket.java | 1 + perf/c/local_thr.c | 8 ++++- perf/c/remote_thr.c | 5 ++- perf/cpp/local_thr.cpp | 8 ++++- perf/cpp/remote_thr.cpp | 6 +++- perf/java/local_thr.java | 68 ++++++++++++++++++++++++-------------------- perf/java/remote_thr.java | 60 +++++++++++++++++++++------------------ perf/python/local_thr.py | 8 ++++- perf/python/remote_thr.py | 6 +++- perf/ruby/local_thr.rb | 7 ++++- perf/ruby/remote_thr.rb | 6 +++- python/pyzmq.cpp | 18 +++++++++++- ruby/rbzmq.cpp | 5 +++ src/socket_base.cpp | 11 ++++++- 16 files changed, 149 insertions(+), 71 deletions(-) commit 9c522dccaf0b2c8074bd96fbfb4c968f45748ba4 Author: Martin Sustrik Date: Wed Sep 16 11:02:18 2009 +0200 reconnect added to zmq_connecter perf/c/remote_lat.c | 10 ++++++---- perf/cpp/remote_lat.cpp | 5 ++++- src/session.cpp | 9 ++++++--- src/session.hpp | 5 ++++- src/socket_base.cpp | 4 ++-- src/zmq_connecter.cpp | 22 +++++++++++++++++----- src/zmq_connecter.hpp | 5 ++++- src/zmq_connecter_init.cpp | 22 ++++++++++++++++++++-- src/zmq_engine.cpp | 1 + src/zmq_engine.hpp | 1 + src/zmq_listener_init.cpp | 2 +- 11 files changed, 66 insertions(+), 20 deletions(-) commit 6e03cb2f3eb083e1de8e7161d3ab21b52c87eece Merge: bce2e60 9fbdcc7 Author: Martin Sustrik Date: Wed Sep 16 10:56:55 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 9fbdcc7940823634d82f51d2b124ccfbca6e9b17 Author: malosek Date: Wed Sep 16 10:35:23 2009 +0200 removed reset method from zmq_decoder_t src/pgm_receiver.cpp | 25 +++++++++++++++---------- src/pgm_receiver.hpp | 2 +- src/zmq_decoder.cpp | 10 ---------- src/zmq_decoder.hpp | 2 -- 4 files changed, 16 insertions(+), 23 deletions(-) commit 969522bbf55467b6f6e8113be28451d087060843 Author: malosek Date: Wed Sep 16 10:11:01 2009 +0200 added OpenPGM receiver - ZMQ_SUB c/zmq.h | 1 + src/Makefile.am | 2 + src/options.cpp | 3 +- src/options.hpp | 7 +- src/pgm_receiver.cpp | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/pgm_receiver.hpp | 98 ++++++++++++++++++++++++ src/pgm_sender.cpp | 7 +-- src/pgm_sender.hpp | 2 +- src/pgm_socket.cpp | 17 +++-- src/socket_base.cpp | 75 +++++++++++++++++-- src/sub.cpp | 6 ++ 11 files changed, 395 insertions(+), 25 deletions(-) commit bce2e60bbb3b7f799a532d9b8f2e171c570b9fea Author: Martin Sustrik Date: Wed Sep 16 09:50:39 2009 +0200 more errors from send & recv handled decently on windows src/tcp_socket.cpp | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) commit 0381a78c0484012e760d61051f325c71136df17e Author: malosek Date: Tue Sep 15 13:47:15 2009 +0200 added reset method into zmq_decoder_t class src/zmq_decoder.cpp | 10 ++++++++++ src/zmq_decoder.hpp | 2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) commit 79d4a6debf2f4a6970c1137f15426ba0c3535ac0 Merge: 7653f34 98b8e9b Author: malosek Date: Tue Sep 15 12:01:07 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 7653f34df0aae4689d0ccc563a2f111f4793e539 Author: malosek Date: Tue Sep 15 12:00:48 2009 +0200 fixed pub_t class creating ZMQ_SUB socket_base_t src/pub.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 98b8e9b54dd8c67006422106b478a3a6eab07869 Merge: a841774 3a3bcd3 Author: Martin Sustrik Date: Tue Sep 15 10:06:42 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit a841774cbd6363e6ddccc7a56e9a97d1c1481a76 Author: Martin Sustrik Date: Tue Sep 15 10:04:43 2009 +0200 forwarder renamed to zmq_forwarder (MSVC build) msvc/forwarder/forwarder.vcproj | 174 ------------------------------- msvc/msvc.sln | 10 +- msvc/zmq_forwarder/zmq_forwarder.vcproj | 174 +++++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+), 179 deletions(-) commit 3a3bcd337fb8000aef6c8f5ca3dd1b10475d7ab0 Author: malosek Date: Tue Sep 15 09:57:11 2009 +0200 pgm_sender code beautiication src/pgm_sender.hpp | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-) commit f44b215a60f50e8730a50522d7b9f2d5b4381d19 Author: malosek Date: Tue Sep 15 09:47:25 2009 +0200 added out_event call into pgm_sender_t revive src/pgm_sender.cpp | 23 +---------------------- 1 files changed, 1 insertions(+), 22 deletions(-) commit 712c7bd8954a801526e87e652840f7087f9af706 Merge: 3642813 35e82b4 Author: malosek Date: Tue Sep 15 09:46:08 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 35e82b460549e227f6c3409be32d2c657955628c Author: Martin Sustrik Date: Tue Sep 15 09:45:32 2009 +0200 forwarder renamed to zmq_forwarder configure.in | 2 +- devices/Makefile.am | 4 +- devices/forwarder/Makefile.am | 9 -- devices/forwarder/forwarder.cpp | 122 ------------------------------- devices/zmq_forwarder/Makefile.am | 9 ++ devices/zmq_forwarder/zmq_forwarder.cpp | 122 +++++++++++++++++++++++++++++++ 6 files changed, 134 insertions(+), 134 deletions(-) commit 364281343ce0fd03b25bc6b1b451ee7ba8db436b Merge: bdf22e9 f7ad4a2 Author: malosek Date: Tue Sep 15 09:44:44 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit bdf22e9c2fe82366283f4edc02fd59c37fdb2c4b Author: malosek Date: Tue Sep 15 09:43:42 2009 +0200 deleted useles iostream include from socket_base.cpp src/socket_base.cpp | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) commit f7ad4a203ad184d97002111f4ffb8bfe6a8f7c01 Author: Martin Sustrik Date: Mon Sep 14 17:04:57 2009 +0200 forwarder device compilable on windows foreign/xmlParser/xmlParser.cpp | 12 +++- msvc/forwarder/forwarder.vcproj | 174 +++++++++++++++++++++++++++++++++++++++ msvc/msvc.sln | 9 ++ python/pyzmq.cpp | 3 - ruby/rbzmq.cpp | 3 +- 5 files changed, 196 insertions(+), 5 deletions(-) commit 6cfd175e31eec44d215bbc237f2f1d94bfeac06d Author: Martin Sustrik Date: Mon Sep 14 16:45:53 2009 +0200 forwarder device added Makefile.am | 4 +- configure.in | 39 +++++++++--- devices/Makefile.am | 6 ++ devices/forwarder/Makefile.am | 9 +++ devices/forwarder/forwarder.cpp | 122 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+), 12 deletions(-) commit e2900ce0a1b11ec212aeaf42bbefb26a54697c25 Author: Martin Sustrik Date: Mon Sep 14 14:30:15 2009 +0200 xmlParser added foreign/xmlParser/xmlParser.cpp | 2888 +++++++++++++++++++++++++++++++++++++++ foreign/xmlParser/xmlParser.hpp | 762 +++++++++++ 2 files changed, 3650 insertions(+), 0 deletions(-) commit 2bc9419ced21151fe90c530758dc85b7024fdb70 Author: Martin Sustrik Date: Mon Sep 14 13:54:30 2009 +0200 ZMQII-10: Make connections interrupted during the init phase be closed silently src/zmq_decoder.cpp | 13 +++++++++++-- src/zmq_listener_init.cpp | 7 +++++-- 2 files changed, 16 insertions(+), 4 deletions(-) commit 37cacc5700eaaaddbe2df6e3affeca4a335b023a Author: Martin Sustrik Date: Mon Sep 14 12:28:13 2009 +0200 ZMQII-1: Win32 - failure on shutdown java/Socket.cpp | 2 ++ msvc/libzmq/libzmq.vcproj | 4 ++++ src/select.cpp | 4 ++-- src/socket_base.cpp | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) commit c806aabb2d3e6b1ba9e3f61319f23d45c7f9a007 Author: Martin Sustrik Date: Mon Sep 14 11:25:57 2009 +0200 java binding sets socket options using setsockopt function c/zmq.h | 19 ++++---- java/Socket.cpp | 114 +++++++++++++++++++--------------------------- java/org/zmq/Socket.java | 58 ++++++----------------- src/options.cpp | 5 +- src/options.hpp | 1 - src/socket_base.cpp | 16 ++----- 6 files changed, 77 insertions(+), 136 deletions(-) commit 36707529a7d82b164b59d42fe0d5d8a35c3dd279 Author: Martin Sustrik Date: Mon Sep 14 09:40:35 2009 +0200 minor merge problem corrected src/pub.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 89b1f2782ca6a1db9c68b7d642b5a41cc4d56414 Merge: 47350ad 1a4d6f9 Author: Martin Sustrik Date: Fri Sep 11 18:18:25 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 47350adcb6ea48512d732bc323eb1835a5ac9908 Author: Martin Sustrik Date: Fri Sep 11 18:16:47 2009 +0200 separate class for PUB-style socket added c/zmq.h | 6 +++--- src/Makefile.am | 2 ++ src/app_thread.cpp | 5 ++++- src/pub.cpp | 39 +++++++++++++++++++++++++++++++++++++++ src/pub.hpp | 41 +++++++++++++++++++++++++++++++++++++++++ src/sub.cpp | 12 ++++++++++++ src/sub.hpp | 2 ++ 7 files changed, 103 insertions(+), 4 deletions(-) commit 1a4d6f91194c52795808baa07dcd61a20ff599be Author: malosek Date: Fri Sep 11 17:58:37 2009 +0200 added OpenPGM sender - ZMQ_PUB Makefile.am | 4 +- c/zmq.h | 2 + src/Makefile.am | 6 +- src/app_thread.cpp | 2 +- src/config.hpp | 4 +- src/options.cpp | 4 +- src/options.hpp | 6 + src/pgm_sender.cpp | 224 +++++++++++++++ src/pgm_sender.hpp | 109 ++++++++ src/pgm_socket.cpp | 754 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/pgm_socket.hpp | 153 +++++++++++ src/socket_base.cpp | 105 +++++++- src/socket_base.hpp | 5 +- src/sub.cpp | 2 +- 14 files changed, 1360 insertions(+), 20 deletions(-) commit e940878b3f8ff332df534c4df463cfdf085cc787 Author: Martin Sustrik Date: Fri Sep 11 16:59:47 2009 +0200 build on win32 fixed msvc/libzmq/libzmq.vcproj | 8 ++++++++ src/socket_base.cpp | 2 +- src/tcp_connecter.cpp | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) commit 7be7962f9802b48e66663416097eb76edfa83e1e Author: Martin Sustrik Date: Fri Sep 11 16:23:16 2009 +0200 prefix-style message filtering added src/sub.cpp | 61 +++++++++++++++++++++++++++++++++++++++++++++------------- src/sub.hpp | 10 +++++++- 2 files changed, 55 insertions(+), 16 deletions(-) commit 42ad2aa02d3b14eaa3c36c3f1a5a5789546ba411 Author: Martin Sustrik Date: Fri Sep 11 15:51:35 2009 +0200 ZMQII-7: Pipe detach fails on shutdown src/socket_base.cpp | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) commit 29c5930d0b9a4a1df3b90819bdfbfff6a66fedd0 Author: Martin Sustrik Date: Fri Sep 11 14:17:57 2009 +0200 asserts for invalid indexes in pipe reader & writer added src/pipe.cpp | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit e0d1294c4bae51a2bc83a09225e89dddc9b6dcf4 Merge: 5daa0de a91b449 Author: Martin Sustrik Date: Fri Sep 11 13:20:57 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 5daa0dec0f473c84aab6b12cdc5541335e74f07f Author: Martin Sustrik Date: Fri Sep 11 13:20:24 2009 +0200 ZMQII-5: Only one consumer in a process gets the message src/session.cpp | 23 ++++++++++++++--------- src/zmq_connecter_init.cpp | 4 +++- src/zmq_engine.cpp | 2 ++ src/zmq_listener_init.cpp | 4 +++- 4 files changed, 22 insertions(+), 11 deletions(-) commit a91b44977201e4b3891c70da0472a332f60a39fc Author: malosek Date: Fri Sep 11 11:21:40 2009 +0200 Revert "link libzmq with glib when congifured --with-pgm" This reverts commit 88695aaee607e6f4db1f4fd052e2596653fb18b2. c/zmq.h | 2 - perf/cpp/remote_thr.cpp | 13 +------- src/Makefile.am | 6 +--- src/config.hpp | 4 +-- src/options.cpp | 4 +-- src/options.hpp | 6 ---- src/socket_base.cpp | 74 +++++++--------------------------------------- 7 files changed, 16 insertions(+), 93 deletions(-) commit 88695aaee607e6f4db1f4fd052e2596653fb18b2 Author: malosek Date: Fri Sep 11 11:13:15 2009 +0200 link libzmq with glib when congifured --with-pgm c/zmq.h | 2 + perf/cpp/remote_thr.cpp | 13 +++++++- src/Makefile.am | 6 +++- src/config.hpp | 4 ++- src/options.cpp | 4 ++- src/options.hpp | 6 ++++ src/socket_base.cpp | 74 +++++++++++++++++++++++++++++++++++++++------- 7 files changed, 93 insertions(+), 16 deletions(-) commit f824b8a067c60b32260c56020742d6428ed3bb98 Author: Martin Sustrik Date: Thu Sep 10 16:59:22 2009 +0200 classify error from async connect as network related or 0MQ bugs src/tcp_connecter.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) commit f674c9269e04546da22e45ef6fff9303441680ea Author: Martin Sustrik Date: Thu Sep 10 16:32:06 2009 +0200 ZMQII-2: SIGSEGV in zmq_connecter_init_t::read src/zmq_decoder.cpp | 2 +- src/zmq_encoder.cpp | 2 +- src/zmq_engine.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) commit 93e70ee583489034c9f3b92fb87b374707afd5d5 Author: Martin Sustrik Date: Thu Sep 10 15:20:54 2009 +0200 throughput tests use P2P sockets consistently perf/cpp/remote_thr.cpp | 2 +- perf/java/local_thr.java | 2 +- perf/java/remote_thr.java | 2 +- perf/ruby/local_thr.rb | 2 +- perf/ruby/remote_thr.rb | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) commit 95944551be93665fe4dcadbe00168da553b7d82f Merge: 5acef9f b3f32e2 Author: malosek Date: Thu Sep 10 12:04:26 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit b3f32e219ec15a582b6fd03b155e0861443690f6 Author: Martin Sustrik Date: Thu Sep 10 12:00:47 2009 +0200 ZMQII-3: cheap and nasty implementation of message filtering c/zmq.h | 2 + src/Makefile.am | 2 + src/app_thread.cpp | 18 ++++++++++- src/socket_base.cpp | 5 +++ src/socket_base.hpp | 2 +- src/sub.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/sub.hpp | 51 +++++++++++++++++++++++++++++++ 7 files changed, 159 insertions(+), 3 deletions(-) commit 5acef9fc96280df934176b02de724eb904e4bba3 Author: malosek Date: Thu Sep 10 11:21:05 2009 +0200 added --with-pgm option, libpgm-1.2.14 build within 0mq build system Makefile.am | 3 + configure.in | 119 +++++++++++++++++++++++++++++++- foreign/openpgm/libpgm-1.2.14.tar.bz2 | Bin 0 -> 280029 bytes src/Makefile.am | 64 +++++++++++++++++- src/platform.hpp.in | 3 + 5 files changed, 183 insertions(+), 6 deletions(-) commit d81d3412520c9fed36f39462840c7d35815f4a87 Merge: 1864832 4cc923b Author: Martin Sustrik Date: Wed Sep 9 12:14:04 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 1864832adaa173b7c85d4321b8ff8c396ce6b9af Author: Martin Sustrik Date: Wed Sep 9 12:13:19 2009 +0200 building zmq.jar on win32 fixed msvc/java/java.vcproj | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 4cc923b0252a0f1f0ee52508b7a3108e8e3c0950 Author: malosek Date: Wed Sep 9 11:19:05 2009 +0200 Stop configure, when could not link with libuuid configure.in | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 65b8b2d2c78867ee2671f995f5f7c805abd00df2 Merge: 305b81d d743d97 Author: Martin Sustrik Date: Wed Sep 9 11:08:39 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit 305b81dbdf63ab1b66733a330b2c64a980712b8b Author: Martin Sustrik Date: Wed Sep 9 11:07:48 2009 +0200 higher precision time measurement in python perf tests perf/python/local_thr.py | 8 ++++---- perf/python/remote_lat.py | 11 ++++++----- 2 files changed, 10 insertions(+), 9 deletions(-) commit d743d97e365b1d430b6c63de2782392a5f8f5305 Author: malosek Date: Wed Sep 9 10:37:40 2009 +0200 Updated AUTHORS, ChangeLog, README and added COPYING.LESSER files AUTHORS | 38 +++++++++ COPYING.LESSER | 166 ++++++++++++++++++++++++++++++++++++++++ ChangeLog | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ README | 4 + 4 files changed, 439 insertions(+), 0 deletions(-) commit 4d07d7cabe1a865812cf5d95a84557880e3c3096 Author: Martin Sustrik Date: Wed Sep 9 10:08:46 2009 +0200 fix of async connect on win32 src/tcp_connecter.cpp | 4 +++- src/zmq_connecter.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) commit c99f39abc669084fd3a94675ee98e235448ad5a4 Merge: 37d8371 cb78991 Author: Martin Sustrik Date: Wed Sep 9 09:07:11 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 37d8371967308ab1e541cf58b91e368b3e0b526c Author: Martin Sustrik Date: Wed Sep 9 09:03:30 2009 +0200 async connect bug fixed src/zmq_connecter.cpp | 19 ++++++------------- 1 files changed, 6 insertions(+), 13 deletions(-) commit cb78991f8e20fa35d99fa209be659c0aed59de47 Merge: 734a62c d3fb9f9 Author: malosek Date: Tue Sep 8 16:55:28 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 734a62c12d2e2fb009ccf97d7d188060a474cc17 Author: malosek Date: Tue Sep 8 16:55:03 2009 +0200 Sparc solaris port configure.in | 1 + src/devpoll.cpp | 6 ++++-- src/object.hpp | 2 +- src/tcp_socket.cpp | 3 ++- src/zmq.cpp | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) commit d3fb9f90af73a46e02b7e8780a8db95a31360d56 Author: Martin Sustrik Date: Tue Sep 8 16:16:01 2009 +0200 missing java MSVC project added msvc/java/java.vcproj | 244 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 244 insertions(+), 0 deletions(-) commit dadfd243649fbde768a24c677fa952f90d00589d Merge: ef34c94 844b590 Author: Martin Sustrik Date: Tue Sep 8 15:11:19 2009 +0200 Merge branch 'master' of github.com:sustrik/zeromq2 commit ef34c94c3a9cbda87b0a4512ec56415b023aff0b Author: Martin Sustrik Date: Tue Sep 8 15:10:10 2009 +0200 win build for python msvc/msvc.sln | 8 ++ msvc/python/python.vcproj | 176 +++++++++++++++++++++++++++++++++++++++++++++ python/pyzmq.cpp | 9 +++ 3 files changed, 193 insertions(+), 0 deletions(-) commit 844b590b5e348d8513ed574f6548cc0be41574af Author: malosek Date: Tue Sep 8 15:06:08 2009 +0200 added libzmq.pc.in file configure.in | 2 +- src/Makefile.am | 2 ++ src/libzmq.pc.in | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletions(-) commit b3fc14522574ccad233bee02ea135d8a93fb2441 Merge: 2a4a10c 3069b6b Author: malosek Date: Tue Sep 8 14:54:52 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 2a4a10c8be92c5ce6314378fc4de163888075279 Author: malosek Date: Tue Sep 8 14:54:04 2009 +0200 build system tuning Makefile.am | 8 ++++++-- configure.in | 37 +++++++++++++++++++++++++++++++++---- java/Makefile.am | 6 +++--- perf/Makefile.am | 25 +++++++++++++++++++++++-- perf/java/Makefile.am | 5 +++++ perf/python/Makefile.am | 6 +----- perf/ruby/Makefile.am | 1 + python/pyzmq.cpp | 2 +- ruby/rbzmq.cpp | 3 ++- src/Makefile.am | 2 +- 10 files changed, 76 insertions(+), 19 deletions(-) commit 3069b6bd54486346f7bfcce58d6a5e34d129965c Author: Martin Sustrik Date: Tue Sep 8 13:55:13 2009 +0200 win port of java binding + java perf tests java/Context.cpp | 7 ++ java/Message.cpp | 138 --------------------------------- java/Socket.cpp | 7 ++ java/org/zmq/Socket.java | 2 +- msvc/j_local_lat/j_local_lat.vcproj | 78 ++++++++++++++++++ msvc/j_local_thr/j_local_thr.vcproj | 78 ++++++++++++++++++ msvc/j_remote_lat/j_remote_lat.vcproj | 78 ++++++++++++++++++ msvc/j_remote_thr/j_remote_thr.vcproj | 78 ++++++++++++++++++ msvc/msvc.sln | 45 +++++++++++ perf/c/local_thr.c | 3 +- 10 files changed, 374 insertions(+), 140 deletions(-) commit ec6822a477b89ac77afc90425bf36c4829dbef3d Author: unknown Date: Tue Sep 8 11:30:49 2009 +0200 win port for c and cpp perf tests c/zmq.h | 8 +- cpp/zmq.hpp | 7 + msvc/c_local_lat/c_local_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_local_thr/c_local_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_remote_lat/c_remote_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/c_remote_thr/c_remote_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_local_lat/cpp_local_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_local_thr/cpp_local_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_remote_lat/cpp_remote_lat.vcproj | 176 +++++++++++++++++++++++++++++ msvc/cpp_remote_thr/cpp_remote_thr.vcproj | 176 +++++++++++++++++++++++++++++ msvc/libzmq/libzmq.vcproj | 10 ++- msvc/msvc.sln | 72 ++++++++++++ perf/c/local_lat.c | 3 +- perf/c/local_thr.c | 24 +--- perf/c/remote_lat.c | 19 +--- perf/c/remote_thr.c | 3 +- perf/cpp/local_lat.cpp | 3 +- perf/cpp/local_thr.cpp | 20 +--- perf/cpp/remote_lat.cpp | 16 +-- perf/cpp/remote_thr.cpp | 3 +- src/fd_signaler.cpp | 2 +- src/tcp_connecter.cpp | 18 +++- src/tcp_listener.cpp | 89 ++++++++++++++- src/tcp_socket.cpp | 5 + src/zmq.cpp | 67 +++++++++++- 25 files changed, 1702 insertions(+), 75 deletions(-) commit b71c3005e68d02f800ff09bcacece79d167bff75 Author: malosek Date: Mon Sep 7 17:06:47 2009 +0200 include directory split into c and cpp dirs, added --with-c and --with-cpp configure options Makefile.am | 2 - autogen.sh | 8 ++- c/zmq.h | 206 +++++++++++++++++++++++++++++++++++++ configure.in | 45 ++++++--- cpp/zmq.hpp | 276 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/zmq.h | 206 ------------------------------------- include/zmq.hpp | 276 -------------------------------------------------- perf/c/Makefile.am | 4 +- perf/cpp/Makefile.am | 4 +- src/Makefile.am | 15 ++- src/app_thread.cpp | 2 +- src/dispatcher.cpp | 2 +- src/i_inout.hpp | 2 +- src/io_thread.cpp | 2 +- src/msg_content.hpp | 2 +- src/pipe.cpp | 2 +- src/pipe.hpp | 2 +- src/socket_base.cpp | 2 +- src/zmq.cpp | 2 +- src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- 21 files changed, 547 insertions(+), 517 deletions(-) commit f895426c1885729f4a4a20b1eb543a92915aed85 Author: unknown Date: Mon Sep 7 15:41:43 2009 +0200 initial changes for win port include/zmq.h | 5 +- msvc/libzmq/libzmq.vcproj | 520 +++++++++++++++++++++++++++++++++++++++++++++ msvc/msvc.sln | 20 ++ msvc/platform.hpp | 59 +++++ src/app_thread.cpp | 2 + src/fd_signaler.cpp | 1 + src/options.hpp | 2 + src/pipe.cpp | 4 +- src/tcp_connecter.cpp | 75 +++++++- src/tcp_listener.cpp | 1 - src/tcp_socket.cpp | 74 ++++++- src/uuid.cpp | 13 +- src/uuid.hpp | 11 +- src/zmq_connecter.cpp | 2 +- 14 files changed, 764 insertions(+), 25 deletions(-) commit 87ccbb9fae0f9234f82f9a9ec6a215f5e73209d3 Merge: 67253f3 d62c742 Author: Martin Sustrik Date: Mon Sep 7 11:10:58 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit d62c74232a4c1edd38004933afd0c7dc119bd98b Merge: 11a6cb9 63b56d7 Author: Martin Sustrik Date: Mon Sep 7 11:01:42 2009 +0200 Merge branch 'master' of git://github.com/sustrik/zeromq2 commit 11a6cb925f7ff3d17f48edccc886839b4d49ef0b Author: Martin Sustrik Date: Mon Sep 7 11:00:20 2009 +0200 Ruby binding functional perf/ruby/local_lat.rb | 66 ++----- perf/ruby/local_thr.rb | 90 +++------- perf/ruby/remote_lat.rb | 64 +++---- perf/ruby/remote_thr.rb | 48 ++---- ruby/Makefile.am | 2 +- ruby/rbzmq.cpp | 292 ++++++++++++++++++++++++++++++ ruby/zmq.cpp | 460 ----------------------------------------------- 7 files changed, 382 insertions(+), 640 deletions(-) commit 67253f3186488db93dee23bd9194419f58f0b1d3 Author: Martin Sustrik Date: Sat Sep 5 09:30:12 2009 +0200 Java perf tests added java/Context.cpp | 15 ++--- java/Makefile.am | 22 +------ java/Socket.cpp | 140 +++++++++++++++++++++++--------------------- java/org/zmq/Context.java | 3 + java/org/zmq/Message.java | 66 --------------------- java/org/zmq/Socket.java | 42 +++++++------- perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 6 +- perf/java/local_lat.java | 55 ++++++++++++++++++ perf/java/local_thr.java | 65 +++++++++++++++++++++ perf/java/remote_lat.java | 60 +++++++++++++++++++ perf/java/remote_thr.java | 53 +++++++++++++++++ 12 files changed, 343 insertions(+), 186 deletions(-) commit 63b56d7fb38624c32111f9188d54b6fefb10a0e5 Author: Martin Sustrik Date: Fri Sep 4 16:21:39 2009 +0200 python perf tests are included into distribution package configure.in | 3 ++- perf/Makefile.am | 4 ++-- perf/python/Makefile.am | 5 +++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit 4307baf7bcc71ca91da0175e79cdfbf6cc1ad770 Author: Martin Sustrik Date: Fri Sep 4 16:02:41 2009 +0200 python binding functional perf/c/local_lat.c | 11 +++++++---- perf/c/local_thr.c | 10 ++++++---- perf/c/remote_lat.c | 11 +++++++---- perf/c/remote_thr.c | 11 +++++++---- perf/cpp/local_lat.cpp | 8 ++++---- perf/cpp/local_thr.cpp | 8 ++++---- perf/cpp/remote_lat.cpp | 8 ++++---- perf/cpp/remote_thr.cpp | 8 ++++---- perf/python/local_lat.py | 6 +++--- perf/python/remote_lat.py | 4 ++-- perf/python/remote_thr.py | 2 +- src/app_thread.cpp | 4 +--- src/dispatcher.cpp | 36 +++++++++++++++++++++++++++++++++++- src/dispatcher.hpp | 25 ++++++++++++++++++++++--- src/object.cpp | 5 +++++ src/object.hpp | 1 + src/session.cpp | 7 ++++++- src/socket_base.cpp | 12 +++++++++++- src/zmq.cpp | 3 +-- 19 files changed, 131 insertions(+), 49 deletions(-) commit 450b31c3b263ee6ceea27517a2a969d0c74bcd7e Author: Martin Sustrik Date: Fri Sep 4 11:08:13 2009 +0200 bug in python binding fixed python/pyzmq.cpp | 25 ++++++++----------------- 1 files changed, 8 insertions(+), 17 deletions(-) commit 103cbee6a509e55ff5def82eb5ec3ef7feb319a3 Author: Martin Sustrik Date: Fri Sep 4 09:51:42 2009 +0200 couple of bugs fixed src/Makefile.am | 6 +++++- src/tcp_socket.cpp | 2 +- src/zmq_connecter_init.cpp | 1 - src/zmq_engine.cpp | 7 ++----- src/zmq_listener_init.cpp | 3 ++- 5 files changed, 10 insertions(+), 9 deletions(-) commit 4914e5c9d192ac6763e5da6fa28ea503ee769bf0 Author: Martin Sustrik Date: Wed Sep 2 16:16:25 2009 +0200 O(1) socket removal src/app_thread.cpp | 12 ++++++------ src/socket_base.cpp | 14 +++++++++++++- src/socket_base.hpp | 7 +++++++ 3 files changed, 26 insertions(+), 7 deletions(-) commit f92de9b2a9ad73fd7cd966e65b5a06b725e779fc Author: Martin Sustrik Date: Wed Sep 2 14:59:53 2009 +0200 bug during terminal shutdown fixed perf/c/local_lat.c | 13 +++++++++---- perf/c/local_thr.c | 5 ++++- perf/c/remote_lat.c | 15 ++++++++++----- perf/c/remote_thr.c | 3 +++ perf/cpp/local_thr.cpp | 2 +- perf/cpp/remote_lat.cpp | 2 +- src/session.cpp | 18 +++++++++++++----- 7 files changed, 41 insertions(+), 17 deletions(-) commit 702fdbb5dd6a83e7f656e8d1190e695ebb636765 Author: Martin Sustrik Date: Wed Sep 2 11:58:39 2009 +0200 messages that may have been received in the init phase are flushed immediately after engine is plugged in src/zmq_engine.cpp | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) commit 75a5a8732cd5be1bb3bff608e352bf4ac624ffd4 Author: Martin Sustrik Date: Wed Sep 2 10:59:31 2009 +0200 --disable-shared & C perf tests: a better way configure.in | 1 + perf/c/Makefile.am | 8 ++++---- src/platform.hpp.in | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) commit 947b46319314dfab0e545282e9ccfc708d6f57e3 Author: Martin Sustrik Date: Wed Sep 2 10:46:10 2009 +0200 building C perf tests with --disable-shared fixed perf/c/Makefile.am | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) commit 5e08a89d1c0edf44e15f262dd0f27a1c03bcd699 Merge: 6a5120b 1f06d99 Author: Martin Sustrik Date: Wed Sep 2 10:23:01 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 6a5120b1f1c48d19b777f76ac756b00fb624d110 Author: Martin Sustrik Date: Wed Sep 2 10:22:23 2009 +0200 python extension & perf tests include/zmq.h | 6 +- perf/c/local_thr.c | 6 +- perf/cpp/local_thr.cpp | 5 +- perf/python/local_lat.py | 42 +-- perf/python/local_thr.py | 44 +-- perf/python/remote_lat.py | 43 ++- perf/python/remote_thr.py | 17 +- python/pyzmq.cpp | 924 ++++++++++++++++----------------------------- src/i_endpoint.hpp | 2 + src/session.cpp | 29 +- src/session.hpp | 13 +- src/socket_base.cpp | 30 +- src/socket_base.hpp | 2 + 13 files changed, 452 insertions(+), 711 deletions(-) commit 1f06d99a0f563fdc32e9c00392f9875ba3009593 Author: Martin Hurton Date: Mon Aug 31 13:11:46 2009 +0200 Add Java binding Makefile.am | 8 +- configure.in | 54 +++++++++- java/Context.cpp | 92 +++++++++++++++ java/Makefile.am | 72 ++++++++++++ java/Message.cpp | 138 ++++++++++++++++++++++ java/Socket.cpp | 276 +++++++++++++++++++++++++++++++++++++++++++++ java/org/zmq/Context.java | 47 ++++++++ java/org/zmq/Message.java | 66 +++++++++++ java/org/zmq/Socket.java | 141 +++++++++++++++++++++++ 9 files changed, 891 insertions(+), 3 deletions(-) commit 0aacee389fdb553ef9925d0135eefcb501a67726 Author: Martin Hurton Date: Mon Aug 31 11:31:32 2009 +0200 POSIX threads don't use errno to report errors Fix simple_semaphore to follow POSIX threads convention for reporting errors. src/err.hpp | 9 +++++---- src/simple_semaphore.hpp | 12 ++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) commit 72fdf47d16c8d3ecd9da657b4649978e414d775c Author: Martin Sustrik Date: Mon Aug 31 12:50:53 2009 +0200 python perf tests added perf/python/local_lat.py | 67 ++++++++++++++++++++++++++++++++++++++++++++ perf/python/local_thr.py | 68 +++++++++++++++++++++++++++++++++++++++++++++ perf/python/remote_lat.py | 59 +++++++++++++++++++++++++++++++++++++++ perf/python/remote_thr.py | 50 +++++++++++++++++++++++++++++++++ 4 files changed, 244 insertions(+), 0 deletions(-) commit b6d345f4a6402cf2e831a8b9d113f036b394a0bc Author: Martin Sustrik Date: Mon Aug 31 12:45:42 2009 +0200 Ruby perf tests added perf/ruby/local_lat.rb | 75 +++++++++++++++++++++++++++++++++++++++ perf/ruby/local_thr.rb | 90 +++++++++++++++++++++++++++++++++++++++++++++++ perf/ruby/remote_lat.rb | 61 ++++++++++++++++++++++++++++++++ perf/ruby/remote_thr.rb | 55 ++++++++++++++++++++++++++++ 4 files changed, 281 insertions(+), 0 deletions(-) commit 314deb61851a0ddc37228d24e9f4eb106461370a Author: Martin Sustrik Date: Sun Aug 30 15:47:39 2009 +0200 build system for perf/C and perf/C++ Makefile.am | 4 ++-- configure.in | 3 ++- include/zmq.h | 24 ++++++++++++------------ perf/Makefile.am | 2 ++ perf/c/Makefile.am | 20 ++++++++++++++++++++ perf/c/local_lat.c | 2 +- perf/c/local_thr.c | 19 ++++++++++--------- perf/c/remote_lat.c | 7 +++---- perf/c/remote_thr.c | 4 ++-- perf/cpp/Makefile.am | 20 ++++++++++++++++++++ perf/cpp/local_lat.cpp | 3 ++- perf/cpp/local_thr.cpp | 10 ++++++---- perf/cpp/remote_lat.cpp | 3 ++- perf/cpp/remote_thr.cpp | 3 ++- 14 files changed, 86 insertions(+), 38 deletions(-) commit 6c36673949b2256158e8914119d218dce311c585 Author: Martin Sustrik Date: Sun Aug 30 15:03:16 2009 +0200 C perf tests added perf/c/local_lat.c | 70 +++++++++++++++++++++++++++++++++++++++ perf/c/local_thr.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++ perf/c/remote_lat.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ perf/c/remote_thr.c | 67 +++++++++++++++++++++++++++++++++++++ 4 files changed, 318 insertions(+), 0 deletions(-) commit 4617fd9e9c50a9fa3a8cbf3b25e6061e3a8f10c8 Author: Martin Sustrik Date: Sun Aug 30 09:14:15 2009 +0200 c++ perf tests added .gitignore | 12 +++++++- perf/cpp/local_lat.cpp | 52 ++++++++++++++++++++++++++++++++++ perf/cpp/local_thr.cpp | 72 +++++++++++++++++++++++++++++++++++++++++++++++ perf/cpp/remote_lat.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++++ perf/cpp/remote_thr.cpp | 50 ++++++++++++++++++++++++++++++++ 5 files changed, 254 insertions(+), 1 deletions(-) commit 176879e5bbce6115ff5741f2426f689bda312109 Author: Martin Sustrik Date: Sun Aug 30 08:18:31 2009 +0200 engine virtualised; chatroom example removed .gitignore | 5 +++ Makefile.am | 5 +-- configure.in | 3 +- examples/Makefile.am | 2 - examples/chat/Makefile.am | 15 --------- examples/chat/chatroom.cpp | 74 -------------------------------------------- examples/chat/display.cpp | 55 -------------------------------- examples/chat/prompt.cpp | 61 ------------------------------------ src/Makefile.am | 1 + src/command.hpp | 2 +- src/i_engine.hpp | 43 +++++++++++++++++++++++++ src/object.cpp | 5 +-- src/object.hpp | 4 +- src/owned.cpp | 2 +- src/owned.hpp | 2 +- src/session.cpp | 4 +- src/session.hpp | 4 +- src/zmq_engine.hpp | 9 ++--- 18 files changed, 67 insertions(+), 229 deletions(-) commit 1d650934e477be32db9a3c64de077deed0416689 Author: tamara Date: Sat Aug 29 11:31:32 2009 +0200 Ruby bidning added Makefile.am | 8 +- configure.in | 57 ++++++- ruby/Makefile.am | 11 ++ ruby/extconf.rb | 24 +++ ruby/zmq.cpp | 460 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/platform.hpp.in | 3 + 6 files changed, 559 insertions(+), 4 deletions(-) commit 3666a49022f84b3d1888f630a78f3f8f28aadde1 Author: Martin Sustrik Date: Sat Aug 29 10:32:21 2009 +0200 bug in identifying current thread fixed src/app_thread.cpp | 8 +++++--- src/app_thread.hpp | 9 ++++++--- src/thread.cpp | 20 ++++++++++++++++++++ src/thread.hpp | 9 +++++++++ 4 files changed, 40 insertions(+), 6 deletions(-) commit 6996ef6f1a0a50a754608df9444e425d0900b143 Author: Martin Sustrik Date: Sat Aug 29 09:41:50 2009 +0200 improved error handling include/zmq.hpp | 127 +++++++++++++++++++++----------------------------- src/ip.cpp | 3 +- src/tcp_listener.cpp | 9 ++-- src/tcp_listener.hpp | 5 +-- src/zmq_listener.cpp | 4 -- 5 files changed, 61 insertions(+), 87 deletions(-) commit cb09c6951e2c4405318b422a1f9213af3e4b6b8a Author: Martin Sustrik Date: Fri Aug 28 16:51:46 2009 +0200 pipe deallocation added src/command.hpp | 11 +++++++ src/dispatcher.cpp | 20 ++++++++++++ src/dispatcher.hpp | 18 +++++++++++ src/i_endpoint.hpp | 2 + src/object.cpp | 44 +++++++++++++++++++++++++++ src/object.hpp | 8 +++++ src/pipe.cpp | 81 +++++++++++++++++++++++++++++++++++++++++++++++++-- src/pipe.hpp | 30 ++++++++++++++++-- src/session.cpp | 18 +++++++++++ src/session.hpp | 2 + src/socket_base.cpp | 80 +++++++++++++++++++++++++++++++++++++------------- src/socket_base.hpp | 13 ++------ 12 files changed, 290 insertions(+), 37 deletions(-) commit 2dd501651592baa7f9e49f52e1321ae2b9b4e126 Author: Martin Sustrik Date: Thu Aug 27 16:24:21 2009 +0200 multiple bugs fixed src/i_inout.hpp | 8 ++++++++ src/pipe.hpp | 3 ++- src/session.cpp | 13 ++++++++++++- src/session.hpp | 1 + src/zmq_connecter_init.cpp | 6 ++++++ src/zmq_connecter_init.hpp | 1 + src/zmq_encoder.cpp | 1 - src/zmq_engine.cpp | 5 ++++- src/zmq_listener_init.cpp | 33 ++++++++++++++++++++++----------- src/zmq_listener_init.hpp | 5 +++++ 10 files changed, 61 insertions(+), 15 deletions(-) commit 67194267f89d63391288600f127205a2b7a8a5ae Merge: 99c5d92 67c69f9 Author: Martin Sustrik Date: Thu Aug 27 10:55:26 2009 +0200 Merge branch 'master' of git@github.com:sustrik/zeromq2 commit 99c5d9283622a0b37ee80f83ff4875c059fc5990 Author: Martin Sustrik Date: Thu Aug 27 10:54:28 2009 +0200 pipes added include/zmq.h | 2 +- src/Makefile.am | 2 + src/app_thread.cpp | 26 +++--- src/app_thread.hpp | 4 +- src/command.hpp | 11 ++- src/config.hpp | 8 ++ src/i_endpoint.hpp | 33 +++++++ src/object.cpp | 30 ++++++- src/object.hpp | 9 +- src/pipe.cpp | 112 ++++++++++++++++++++++ src/pipe.hpp | 102 ++++++++++++++++++++ src/session.cpp | 56 ++++++++++- src/session.hpp | 24 +++++- src/socket_base.cpp | 227 +++++++++++++++++++++++++++++++++++++++++++- src/socket_base.hpp | 42 ++++++++- src/ypipe.hpp | 22 ++-- src/yqueue.hpp | 2 +- src/zmq_encoder.cpp | 4 +- src/zmq_engine.cpp | 7 +- src/zmq_engine.hpp | 4 + src/zmq_listener_init.cpp | 3 +- 21 files changed, 680 insertions(+), 50 deletions(-) commit 67c69f952c956fb151c654726b4fc67e122722ff Author: Martin Hurton Date: Wed Aug 26 15:50:37 2009 +0200 make configure respect --with-python option configure.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) commit aacdb7a454686bfac93164d0e67e785658d48a3c Author: tamara Date: Mon Aug 24 12:04:15 2009 +0200 python build fix Makefile.am | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) commit 77bc3790fa9e781ad26ec881175d22d807e16acf Author: tamara Date: Mon Aug 24 11:17:16 2009 +0200 python extension added Makefile.am | 4 +- configure.in | 59 ++++- python/Makefile.am | 7 + python/pyzmq.cpp | 756 ++++++++++++++++++++++++++++++++++++++++++++++++++++ python/setup.py.in | 14 + 5 files changed, 837 insertions(+), 3 deletions(-) commit 6be4b0143793ab5ceebc5d9d6bbe5c2f1333a0d2 Author: Martin Sustrik Date: Fri Aug 21 14:29:22 2009 +0200 session management implemented include/zmq.h | 28 ++++++------ include/zmq.hpp | 11 ++-- src/Makefile.am | 10 ++-- src/i_inout.hpp | 4 +- src/msg.hpp | 49 ------------------- src/msg_content.hpp | 50 +++++++++++++++++++ src/object.cpp | 5 +- src/object.hpp | 4 ++ src/owned.cpp | 10 ++++- src/owned.hpp | 4 ++ src/pipe.hpp | 2 +- src/session.cpp | 39 ++++++++++++---- src/session.hpp | 15 ++++-- src/socket_base.cpp | 77 +++++++++++++++++++++--------- src/socket_base.hpp | 24 ++++++---- src/zmq.cpp | 111 +++++++++++++++++++++++-------------------- src/zmq_connecter.cpp | 11 +++-- src/zmq_connecter.hpp | 10 +++- src/zmq_connecter_init.cpp | 94 +++++++++++++++++++++++++++++++++++++ src/zmq_connecter_init.hpp | 75 +++++++++++++++++++++++++++++ src/zmq_decoder.hpp | 2 +- src/zmq_encoder.hpp | 2 +- src/zmq_init.cpp | 112 -------------------------------------------- src/zmq_init.hpp | 82 -------------------------------- src/zmq_listener.cpp | 5 +- src/zmq_listener_init.cpp | 96 +++++++++++++++++++++++++++++++++++++ src/zmq_listener_init.hpp | 71 ++++++++++++++++++++++++++++ 27 files changed, 621 insertions(+), 382 deletions(-) commit a801b6d8b37557ccfb53030dca22f89a3f99b59c Author: Martin Sustrik Date: Thu Aug 20 11:32:23 2009 +0200 couple of bugs in shutdown mechanism fixed src/command.hpp | 11 +++++++-- src/object.cpp | 43 +++++++++++++++++++++++++++++++++------ src/object.hpp | 19 +++++++++++------ src/owned.cpp | 53 ++++++++++++++++++++++++------------------------- src/owned.hpp | 33 +++++++++++++++++++++--------- src/session.cpp | 5 +++- src/session.hpp | 2 +- src/socket_base.cpp | 40 +++++++++++++++++++++++++++++++++++- src/socket_base.hpp | 26 +++++++++++++++++++++-- src/zmq_connecter.cpp | 4 +- src/zmq_connecter.hpp | 2 +- src/zmq_engine.cpp | 3 +- src/zmq_init.cpp | 8 ++++-- src/zmq_init.hpp | 2 +- src/zmq_listener.cpp | 4 +- src/zmq_listener.hpp | 2 +- 16 files changed, 184 insertions(+), 73 deletions(-) commit 131f2e309668d1e64cfcb4aeb869665d8018bcfe Author: Martin Sustrik Date: Mon Aug 17 14:07:34 2009 +0200 subscribe API removed examples/chat/display.cpp | 1 - include/zmq.h | 3 --- include/zmq.hpp | 6 ------ src/socket_base.cpp | 5 ----- src/socket_base.hpp | 1 - src/zmq.cpp | 5 ----- 6 files changed, 0 insertions(+), 21 deletions(-) commit 059beca59d39d90a8ee0e1b07f840994962ea89e Author: Martin Sustrik Date: Wed Aug 12 09:40:16 2009 +0200 listener/connecter/init/session added include/zmq.h | 2 +- src/Makefile.am | 13 ++ src/atomic.hpp | 310 ------------------------------------------------- src/i_inout.hpp | 37 ++++++ src/io_object.cpp | 47 +------- src/io_object.hpp | 50 ++------ src/options.cpp | 29 +++++ src/options.hpp | 42 +++++++ src/owned.cpp | 74 ++++++++++++ src/owned.hpp | 82 +++++++++++++ src/session.cpp | 58 +++++++++ src/session.hpp | 57 +++++++++ src/socket_base.cpp | 29 ++--- src/socket_base.hpp | 8 +- src/zmq_connecter.cpp | 36 ++++--- src/zmq_connecter.hpp | 17 ++- src/zmq_decoder.cpp | 78 ++++++++++++ src/zmq_decoder.hpp | 57 +++++++++ src/zmq_encoder.cpp | 76 ++++++++++++ src/zmq_encoder.hpp | 55 +++++++++ src/zmq_engine.cpp | 107 +++++++++++++++++- src/zmq_engine.hpp | 33 +++++- src/zmq_init.cpp | 110 +++++++++++++++++ src/zmq_init.hpp | 82 +++++++++++++ src/zmq_listener.cpp | 25 ++-- src/zmq_listener.hpp | 11 ++- 26 files changed, 1070 insertions(+), 455 deletions(-) commit bda766ab401b6c565fe9c2d0bc80c11bbbe84488 Author: Martin Sustrik Date: Sun Aug 9 16:30:22 2009 +0200 redundant interface (i_api) removed src/Makefile.am | 2 - src/app_thread.cpp | 5 +-- src/app_thread.hpp | 6 ++-- src/dispatcher.cpp | 3 +- src/dispatcher.hpp | 2 +- src/i_api.hpp | 43 ----------------------------------- src/i_poll_events.hpp | 60 ++++++++++++++++++++++++------------------------ src/socket_base.hpp | 21 ++++++++--------- src/zmq.cpp | 19 ++++++++------- 9 files changed, 57 insertions(+), 104 deletions(-) commit 9f1f823b7b69ced56bdb0416feef71230cc7fd55 Author: Martin Sustrik Date: Sun Aug 9 16:12:09 2009 +0200 zmq_listener/zmq_connecter implemented src/Makefile.am | 2 + src/io_object.cpp | 13 +++--- src/io_object.hpp | 18 +++++--- src/socket_base.cpp | 12 ++++- src/tcp_connecter.cpp | 24 ++++++----- src/tcp_connecter.hpp | 9 ++++- src/zmq_connecter.cpp | 110 +++++++++++++++++++++++++++++++++++++++++++++++++ src/zmq_connecter.hpp | 70 +++++++++++++++++++++++++++++++ src/zmq_listener.cpp | 9 +++- src/zmq_listener.hpp | 5 +- 10 files changed, 239 insertions(+), 33 deletions(-) commit 3147ff8523d9736039c4582f5f62c323b23940d1 Author: Martin Sustrik Date: Sun Aug 9 11:57:21 2009 +0200 getsockopt implemented include/zmq.h | 1 + src/socket_base.cpp | 69 +++++++++++++++++++++++++++++++++++++++++++++++--- src/socket_base.hpp | 10 +++++++ 3 files changed, 75 insertions(+), 5 deletions(-) commit bde396f1561fb5e57e6e413a40d904586e186d42 Author: Martin Sustrik Date: Sun Aug 9 11:21:47 2009 +0200 fix to 3-thread synchronisation algorithm src/io_object.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++++- src/io_object.hpp | 21 ++++++++++++++++++++- src/socket_base.cpp | 6 +++++- src/tcp_listener.cpp | 19 +++++++++++-------- src/tcp_listener.hpp | 11 +++++++++-- src/zmq_listener.cpp | 36 +++++++++++++++++++++++++++++++++++- src/zmq_listener.hpp | 15 +++++++++++++++ 7 files changed, 142 insertions(+), 14 deletions(-) commit 5b5b513330e96e3e08d0c2c60d03044091976420 Author: Martin Sustrik Date: Sun Aug 9 09:24:48 2009 +0200 socket options interface modeled as in BSD sockets include/zmq.h | 28 ++++++++++++++-------------- include/zmq.hpp | 14 ++++++++++---- src/Makefile.am | 2 ++ src/epoll.cpp | 4 +++- src/i_api.hpp | 6 ++++-- src/io_object.cpp | 45 ++++++++++++++++++++++++++++++++++++++++++++- src/io_object.hpp | 23 ++++++++++++++++++----- src/io_thread.hpp | 2 +- src/socket_base.cpp | 33 ++++++++++++++++++++------------- src/socket_base.hpp | 9 +++++---- src/zmq.cpp | 13 +++++++++---- src/zmq_engine.cpp | 35 +++++++++++++++++++++++++++++++++++ src/zmq_engine.hpp | 47 +++++++++++++++++++++++++++++++++++++++++++++++ src/zmq_listener.cpp | 9 +++++++-- src/zmq_listener.hpp | 5 +++-- 15 files changed, 222 insertions(+), 53 deletions(-) commit a8b410e66c3c75809c8e9c01dd3e35c579f02347 Author: Martin Sustrik Date: Sat Aug 8 16:01:58 2009 +0200 lockfree interaction patter for 3 theads implemented include/zmq.hpp | 8 +- src/Makefile.am | 14 +++- src/app_thread.cpp | 37 +++++++++--- src/app_thread.hpp | 13 +++- src/command.hpp | 59 ++++++++----------- src/context.cpp | 153 ------------------------------------------------ src/context.hpp | 122 -------------------------------------- src/dispatcher.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 122 ++++++++++++++++++++++++++++++++++++++ src/err.hpp | 6 ++ src/i_api.hpp | 34 ++++++----- src/i_socket.hpp | 36 ----------- src/io_object.cpp | 41 +++++++++++++ src/io_object.hpp | 62 ++++++++++++++++++++ src/io_thread.cpp | 8 +- src/io_thread.hpp | 2 +- src/mutex.hpp | 30 +++++---- src/object.cpp | 158 +++++++++++++++----------------------------------- src/object.hpp | 42 +++++--------- src/socket_base.cpp | 129 ++++++++++++++++++++++++++++++++++++++++ src/socket_base.hpp | 72 +++++++++++++++++++++++ src/zmq.cpp | 19 +++--- src/zmq_listener.cpp | 35 +++++++++++ src/zmq_listener.hpp | 46 +++++++++++++++ 24 files changed, 849 insertions(+), 548 deletions(-) commit 0b5cc026fbe7ccc6de66907be29471562a2d344d Author: Martin Sustrik Date: Thu Aug 6 12:51:32 2009 +0200 clean up - session/socket/engine stuff removed src/Makefile.am | 51 +-------- src/app_thread.cpp | 106 ++---------------- src/app_thread.hpp | 27 +---- src/connecter.cpp | 189 ------------------------------- src/connecter.hpp | 99 ---------------- src/context.cpp | 139 ++--------------------- src/context.hpp | 52 +-------- src/data_distributor.cpp | 155 ------------------------- src/data_distributor.hpp | 70 ------------ src/devpoll.cpp | 9 +- src/devpoll.hpp | 3 +- src/dummy_aggregator.cpp | 111 ------------------ src/dummy_aggregator.hpp | 73 ------------ src/dummy_distributor.cpp | 85 -------------- src/dummy_distributor.hpp | 68 ----------- src/epoll.cpp | 10 +- src/epoll.hpp | 3 +- src/fair_aggregator.cpp | 143 ----------------------- src/fair_aggregator.hpp | 77 ------------- src/i_api.hpp | 42 ++++---- src/i_demux.hpp | 57 ---------- src/i_engine.hpp | 53 --------- src/i_mux.hpp | 60 ---------- src/i_poller.hpp | 7 +- src/i_session.hpp | 37 ------ src/i_socket.hpp | 36 ++++++ src/i_thread.hpp | 38 ------ src/io_object.cpp | 37 ------ src/io_object.hpp | 51 --------- src/io_thread.cpp | 31 ----- src/io_thread.hpp | 27 +---- src/kqueue.cpp | 9 +- src/kqueue.hpp | 3 +- src/listener.cpp | 170 ---------------------------- src/listener.hpp | 110 ------------------ src/load_balancer.cpp | 130 --------------------- src/load_balancer.hpp | 73 ------------ src/object.cpp | 33 ------ src/object.hpp | 8 -- src/p2p.cpp | 29 ----- src/p2p.hpp | 42 ------- src/pipe.cpp | 47 -------- src/pipe.hpp | 23 +---- src/pipe_reader.cpp | 118 ------------------- src/pipe_reader.hpp | 89 --------------- src/pipe_writer.cpp | 120 -------------------- src/pipe_writer.hpp | 88 --------------- src/poll.cpp | 13 ++- src/poll.hpp | 3 +- src/pub.cpp | 38 ------ src/pub.hpp | 45 -------- src/rep.cpp | 29 ----- src/rep.hpp | 42 ------- src/req.cpp | 29 ----- src/req.hpp | 42 ------- src/safe_object.cpp | 76 ------------- src/safe_object.hpp | 68 ----------- src/select.cpp | 13 ++- src/select.hpp | 2 +- src/session.cpp | 273 --------------------------------------------- src/session.hpp | 107 ------------------ src/session_stub.cpp | 110 ------------------ src/session_stub.hpp | 83 -------------- src/socket_base.cpp | 267 -------------------------------------------- src/socket_base.hpp | 96 ---------------- src/sub.cpp | 45 -------- src/sub.hpp | 46 -------- src/zmq.cpp | 2 +- src/zmq_decoder.cpp | 79 ------------- src/zmq_decoder.hpp | 57 ---------- src/zmq_encoder.cpp | 75 ------------ src/zmq_encoder.hpp | 54 --------- src/zmq_tcp_engine.cpp | 185 ------------------------------ src/zmq_tcp_engine.hpp | 92 --------------- 74 files changed, 131 insertions(+), 4878 deletions(-) commit b8b4acef4c2ba1a169ce84c1fb4c70a5676ebba3 Author: Martin Sustrik Date: Thu Aug 6 10:47:34 2009 +0200 dispatcher renamed to context src/Makefile.am | 4 +- src/app_thread.cpp | 8 +- src/app_thread.hpp | 4 +- src/context.cpp | 266 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/context.hpp | 170 ++++++++++++++++++++++++++++++++ src/dispatcher.cpp | 266 --------------------------------------------------- src/dispatcher.hpp | 170 -------------------------------- src/io_thread.cpp | 8 +- src/io_thread.hpp | 2 +- src/object.cpp | 26 +++--- src/object.hpp | 6 +- src/pipe.hpp | 8 +- src/pipe_reader.cpp | 2 +- src/pipe_reader.hpp | 6 +- src/pipe_writer.hpp | 6 +- src/safe_object.cpp | 6 +- src/safe_object.hpp | 2 +- src/zmq.cpp | 15 ++-- 18 files changed, 487 insertions(+), 488 deletions(-) commit 43fa72b7ee6b6d97b84a555ce8902cee855aeb72 Author: Martin Hurton Date: Mon Aug 3 11:59:55 2009 +0200 C++ binding uses exceptions to signal failure include/zmq.hpp | 83 ++++++++++++++++++++++++++++++++++++++++++++++++------ 1 files changed, 73 insertions(+), 10 deletions(-) commit cc3755a16f00026af882ed14d122cc8aa6d50e82 Author: Martin Sustrik Date: Mon Aug 3 11:30:13 2009 +0200 renamed from zs to zmq .gitignore | 3 + Makefile.am | 2 +- configure.in | 38 ++++---- examples/chat/Makefile.am | 6 +- examples/chat/chatroom.cpp | 12 +- examples/chat/display.cpp | 10 +- examples/chat/prompt.cpp | 8 +- include/zmq.h | 207 +++++++++++++++++++++++++++++++++++++++ include/zmq.hpp | 231 ++++++++++++++++++++++++++++++++++++++++++++ include/zs.h | 206 --------------------------------------- include/zs.hpp | 231 -------------------------------------------- src/Makefile.am | 10 +- src/app_thread.cpp | 70 +++++++------- src/app_thread.hpp | 8 +- src/atomic.hpp | 62 ++++++------ src/atomic_bitmap.hpp | 82 ++++++++-------- src/atomic_counter.hpp | 72 +++++++------- src/atomic_ptr.hpp | 72 +++++++------- src/command.hpp | 6 +- src/config.hpp | 6 +- src/connecter.cpp | 48 +++++----- src/connecter.hpp | 12 +- src/data_distributor.cpp | 42 ++++---- src/data_distributor.hpp | 10 +- src/decoder.hpp | 6 +- src/devpoll.cpp | 38 ++++---- src/devpoll.hpp | 8 +- src/dispatcher.cpp | 52 +++++----- src/dispatcher.hpp | 8 +- src/dummy_aggregator.cpp | 34 +++--- src/dummy_aggregator.hpp | 8 +- src/dummy_distributor.cpp | 28 +++--- src/dummy_distributor.hpp | 8 +- src/encoder.hpp | 6 +- src/epoll.cpp | 36 ++++---- src/epoll.hpp | 8 +- src/err.cpp | 8 +- src/err.hpp | 16 ++-- src/fair_aggregator.cpp | 30 +++--- src/fair_aggregator.hpp | 8 +- src/fd.hpp | 8 +- src/fd_signaler.cpp | 54 +++++----- src/fd_signaler.hpp | 8 +- src/i_api.hpp | 14 ++-- src/i_demux.hpp | 11 +- src/i_engine.hpp | 8 +- src/i_mux.hpp | 11 +- src/i_poll_events.hpp | 6 +- src/i_poller.hpp | 6 +- src/i_session.hpp | 10 +- src/i_signaler.hpp | 6 +- src/i_thread.hpp | 6 +- src/io_object.cpp | 6 +- src/io_object.hpp | 6 +- src/io_thread.cpp | 72 +++++++------- src/io_thread.hpp | 8 +- src/ip.cpp | 36 ++++---- src/ip.hpp | 8 +- src/kqueue.cpp | 40 ++++---- src/kqueue.hpp | 8 +- src/listener.cpp | 42 ++++---- src/listener.hpp | 6 +- src/load_balancer.cpp | 32 +++--- src/load_balancer.hpp | 10 +- src/msg.hpp | 16 ++-- src/mutex.hpp | 10 +- src/object.cpp | 88 +++++++++--------- src/object.hpp | 6 +- src/p2p.cpp | 4 +- src/p2p.hpp | 6 +- src/pipe.cpp | 14 ++-- src/pipe.hpp | 10 +- src/pipe_reader.cpp | 26 +++--- src/pipe_reader.hpp | 8 +- src/pipe_writer.cpp | 30 +++--- src/pipe_writer.hpp | 8 +- src/platform.hpp.in | 26 +++--- src/poll.cpp | 40 ++++---- src/poll.hpp | 14 ++-- src/pub.cpp | 6 +- src/pub.hpp | 8 +- src/rep.cpp | 4 +- src/rep.hpp | 6 +- src/req.cpp | 4 +- src/req.hpp | 6 +- src/safe_object.cpp | 14 ++-- src/safe_object.hpp | 6 +- src/select.cpp | 40 ++++---- src/select.hpp | 10 +- src/session.cpp | 46 +++++----- src/session.hpp | 10 +- src/session_stub.cpp | 30 +++--- src/session_stub.hpp | 10 +- src/simple_semaphore.hpp | 12 +- src/socket_base.cpp | 56 ++++++------ src/socket_base.hpp | 14 ++-- src/stdint.hpp | 6 +- src/sub.cpp | 8 +- src/sub.hpp | 8 +- src/tcp_connecter.cpp | 20 ++-- src/tcp_connecter.hpp | 6 +- src/tcp_listener.cpp | 20 ++-- src/tcp_listener.hpp | 6 +- src/tcp_socket.cpp | 18 ++-- src/tcp_socket.hpp | 6 +- src/thread.cpp | 14 ++-- src/thread.hpp | 10 +- src/uuid.cpp | 40 ++++---- src/uuid.hpp | 18 ++-- src/windows.hpp | 4 +- src/wire.hpp | 6 +- src/ypipe.hpp | 8 +- src/ypollset.cpp | 10 +- src/ypollset.hpp | 6 +- src/yqueue.hpp | 10 +- src/zmq.cpp | 223 ++++++++++++++++++++++++++++++++++++++++++ src/zmq_decoder.cpp | 25 +++--- src/zmq_decoder.hpp | 10 +- src/zmq_encoder.cpp | 18 ++-- src/zmq_encoder.hpp | 10 +- src/zmq_tcp_engine.cpp | 44 ++++---- src/zmq_tcp_engine.hpp | 6 +- src/zs.cpp | 222 ------------------------------------------ 123 files changed, 1778 insertions(+), 1770 deletions(-) commit 183b6887644ac05c951a3f9143248ed86e91052f Author: Martin Sustrik Date: Thu Jul 30 13:53:46 2009 +0200 git ignoring intermediary files 0 files changed, 0 insertions(+), 0 deletions(-) commit 4ed70a930202b103e7e80b8dc925e0aaa4622595 Author: Martin Sustrik Date: Wed Jul 29 12:07:54 2009 +0200 initial commit Makefile.am | 4 + autogen.sh | 29 ++++ configure.in | 188 +++++++++++++++++++++++++++ examples/Makefile.am | 2 + examples/chat/Makefile.am | 15 ++ examples/chat/chatroom.cpp | 74 +++++++++++ examples/chat/display.cpp | 56 ++++++++ examples/chat/prompt.cpp | 61 +++++++++ include/zs.h | 206 +++++++++++++++++++++++++++++ include/zs.hpp | 231 +++++++++++++++++++++++++++++++++ src/Makefile.am | 120 +++++++++++++++++ src/app_thread.cpp | 221 +++++++++++++++++++++++++++++++ src/app_thread.hpp | 95 ++++++++++++++ src/atomic.hpp | 310 ++++++++++++++++++++++++++++++++++++++++++++ src/atomic_bitmap.hpp | 286 ++++++++++++++++++++++++++++++++++++++++ src/atomic_counter.hpp | 197 ++++++++++++++++++++++++++++ src/atomic_ptr.hpp | 189 +++++++++++++++++++++++++++ src/command.hpp | 98 ++++++++++++++ src/config.hpp | 71 ++++++++++ src/connecter.cpp | 189 +++++++++++++++++++++++++++ src/connecter.hpp | 99 ++++++++++++++ src/data_distributor.cpp | 155 ++++++++++++++++++++++ src/data_distributor.hpp | 70 ++++++++++ src/decoder.hpp | 101 ++++++++++++++ src/devpoll.cpp | 224 ++++++++++++++++++++++++++++++++ src/devpoll.hpp | 110 ++++++++++++++++ src/dispatcher.cpp | 266 +++++++++++++++++++++++++++++++++++++ src/dispatcher.hpp | 170 ++++++++++++++++++++++++ src/dummy_aggregator.cpp | 111 ++++++++++++++++ src/dummy_aggregator.hpp | 73 +++++++++++ src/dummy_distributor.cpp | 85 ++++++++++++ src/dummy_distributor.hpp | 68 ++++++++++ src/encoder.hpp | 108 +++++++++++++++ src/epoll.cpp | 214 ++++++++++++++++++++++++++++++ src/epoll.hpp | 107 +++++++++++++++ src/err.cpp | 146 +++++++++++++++++++++ src/err.hpp | 90 +++++++++++++ src/fair_aggregator.cpp | 143 ++++++++++++++++++++ src/fair_aggregator.hpp | 77 +++++++++++ src/fd.hpp | 44 ++++++ src/fd_signaler.cpp | 278 +++++++++++++++++++++++++++++++++++++++ src/fd_signaler.hpp | 92 +++++++++++++ src/i_api.hpp | 39 ++++++ src/i_demux.hpp | 56 ++++++++ src/i_engine.hpp | 53 ++++++++ src/i_mux.hpp | 59 +++++++++ src/i_poll_events.hpp | 45 +++++++ src/i_poller.hpp | 89 +++++++++++++ src/i_session.hpp | 37 ++++++ src/i_signaler.hpp | 38 ++++++ src/i_thread.hpp | 38 ++++++ src/io_object.cpp | 37 ++++++ src/io_object.hpp | 51 +++++++ src/io_thread.cpp | 177 +++++++++++++++++++++++++ src/io_thread.hpp | 99 ++++++++++++++ src/ip.cpp | 310 ++++++++++++++++++++++++++++++++++++++++++++ src/ip.hpp | 47 +++++++ src/kqueue.cpp | 214 ++++++++++++++++++++++++++++++ src/kqueue.hpp | 112 ++++++++++++++++ src/listener.cpp | 170 ++++++++++++++++++++++++ src/listener.hpp | 110 ++++++++++++++++ src/load_balancer.cpp | 130 ++++++++++++++++++ src/load_balancer.hpp | 73 +++++++++++ src/msg.hpp | 49 +++++++ src/mutex.hpp | 116 +++++++++++++++++ src/object.cpp | 294 +++++++++++++++++++++++++++++++++++++++++ src/object.hpp | 105 +++++++++++++++ src/p2p.cpp | 29 ++++ src/p2p.hpp | 42 ++++++ src/pipe.cpp | 47 +++++++ src/pipe.hpp | 57 ++++++++ src/pipe_reader.cpp | 118 +++++++++++++++++ src/pipe_reader.hpp | 89 +++++++++++++ src/pipe_writer.cpp | 120 +++++++++++++++++ src/pipe_writer.hpp | 88 +++++++++++++ src/platform.hpp.in | 210 ++++++++++++++++++++++++++++++ src/poll.cpp | 205 +++++++++++++++++++++++++++++ src/poll.hpp | 112 ++++++++++++++++ src/pub.cpp | 38 ++++++ src/pub.hpp | 45 +++++++ src/rep.cpp | 29 ++++ src/rep.hpp | 42 ++++++ src/req.cpp | 29 ++++ src/req.hpp | 42 ++++++ src/safe_object.cpp | 76 +++++++++++ src/safe_object.hpp | 68 ++++++++++ src/select.cpp | 236 +++++++++++++++++++++++++++++++++ src/select.hpp | 122 +++++++++++++++++ src/session.cpp | 273 ++++++++++++++++++++++++++++++++++++++ src/session.hpp | 107 +++++++++++++++ src/session_stub.cpp | 110 ++++++++++++++++ src/session_stub.hpp | 83 ++++++++++++ src/simple_semaphore.hpp | 188 +++++++++++++++++++++++++++ src/socket_base.cpp | 267 ++++++++++++++++++++++++++++++++++++++ src/socket_base.hpp | 96 ++++++++++++++ src/stdint.hpp | 70 ++++++++++ src/sub.cpp | 45 +++++++ src/sub.hpp | 46 +++++++ src/tcp_connecter.cpp | 138 ++++++++++++++++++++ src/tcp_connecter.hpp | 65 +++++++++ src/tcp_listener.cpp | 165 +++++++++++++++++++++++ src/tcp_listener.hpp | 65 +++++++++ src/tcp_socket.cpp | 116 +++++++++++++++++ src/tcp_socket.hpp | 70 ++++++++++ src/thread.cpp | 88 +++++++++++++ src/thread.hpp | 77 +++++++++++ src/uuid.cpp | 136 +++++++++++++++++++ src/uuid.hpp | 82 ++++++++++++ src/windows.hpp | 56 ++++++++ src/wire.hpp | 98 ++++++++++++++ src/ypipe.hpp | 209 +++++++++++++++++++++++++++++ src/ypollset.cpp | 56 ++++++++ src/ypollset.hpp | 74 +++++++++++ src/yqueue.hpp | 138 ++++++++++++++++++++ src/zmq_decoder.cpp | 78 +++++++++++ src/zmq_decoder.hpp | 57 ++++++++ src/zmq_encoder.cpp | 75 +++++++++++ src/zmq_encoder.hpp | 54 ++++++++ src/zmq_tcp_engine.cpp | 185 ++++++++++++++++++++++++++ src/zmq_tcp_engine.hpp | 92 +++++++++++++ src/zs.cpp | 222 +++++++++++++++++++++++++++++++ 121 files changed, 13546 insertions(+), 0 deletions(-) zeromq-2.2.0.orig/src/0000775000000000000000000000000011741762443013267 5ustar rootrootzeromq-2.2.0.orig/src/blob.hpp0000664000000000000000000000216211732125604014707 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_BLOB_HPP_INCLUDED__ #define __ZMQ_BLOB_HPP_INCLUDED__ #include #if (defined(__GNUC__) && (__GNUC__ == 3)) #include "gcc_421_char_traits.hpp" #endif namespace zmq { // Object to hold dynamically allocated opaque binary data. typedef std::basic_string blob_t; } #endif zeromq-2.2.0.orig/src/atomic_ptr.hpp0000664000000000000000000001071311732125604016133 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ATOMIC_PTR_HPP_INCLUDED__ #define __ZMQ_ATOMIC_PTR_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_FORCE_MUTEXES #define ZMQ_ATOMIC_PTR_MUTEX #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_PTR_X86 #elif defined ZMQ_HAVE_WINDOWS #define ZMQ_ATOMIC_PTR_WINDOWS #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_NETBSD) #define ZMQ_ATOMIC_PTR_ATOMIC_H #else #define ZMQ_ATOMIC_PTR_MUTEX #endif #if defined ZMQ_ATOMIC_PTR_MUTEX #include "mutex.hpp" #elif defined ZMQ_ATOMIC_PTR_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H #include #endif namespace zmq { // This class encapsulates several atomic operations on pointers. template class atomic_ptr_t { public: // Initialise atomic pointer inline atomic_ptr_t () { ptr = NULL; } // Destroy atomic pointer inline ~atomic_ptr_t () { } // Set value of atomic pointer in a non-threadsafe way // Use this function only when you are sure that at most one // thread is accessing the pointer at the moment. inline void set (T *ptr_) { this->ptr = ptr_; } // Perform atomic 'exchange pointers' operation. Pointer is set // to the 'val' value. Old value is returned. inline T *xchg (T *val_) { #if defined ZMQ_ATOMIC_PTR_WINDOWS return (T*) InterlockedExchangePointer ((PVOID*) &ptr, val_); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_swap_ptr (&ptr, val_); #elif defined ZMQ_ATOMIC_PTR_X86 T *old; __asm__ volatile ( "lock; xchg %0, %2" : "=r" (old), "=m" (ptr) : "m" (ptr), "0" (val_)); return old; #elif defined ZMQ_ATOMIC_PTR_MUTEX sync.lock (); T *old = (T*) ptr; ptr = val_; sync.unlock (); return old; #else #error atomic_ptr is not implemented for this platform #endif } // Perform atomic 'compare and swap' operation on the pointer. // The pointer is compared to 'cmp' argument and if they are // equal, its value is set to 'val'. Old value of the pointer // is returned. inline T *cas (T *cmp_, T *val_) { #if defined ZMQ_ATOMIC_PTR_WINDOWS return (T*) InterlockedCompareExchangePointer ( (volatile PVOID*) &ptr, val_, cmp_); #elif defined ZMQ_ATOMIC_PTR_ATOMIC_H return (T*) atomic_cas_ptr (&ptr, cmp_, val_); #elif defined ZMQ_ATOMIC_PTR_X86 T *old; __asm__ volatile ( "lock; cmpxchg %2, %3" : "=a" (old), "=m" (ptr) : "r" (val_), "m" (ptr), "0" (cmp_) : "cc"); return old; #elif defined ZMQ_ATOMIC_PTR_MUTEX sync.lock (); T *old = (T*) ptr; if (ptr == cmp_) ptr = val_; sync.unlock (); return old; #else #error atomic_ptr is not implemented for this platform #endif } private: volatile T *ptr; #if defined ZMQ_ATOMIC_PTR_MUTEX mutex_t sync; #endif atomic_ptr_t (const atomic_ptr_t&); const atomic_ptr_t &operator = (const atomic_ptr_t&); }; } // Remove macros local to this file. #if defined ZMQ_ATOMIC_PTR_WINDOWS #undef ZMQ_ATOMIC_PTR_WINDOWS #endif #if defined ZMQ_ATOMIC_PTR_ATOMIC_H #undef ZMQ_ATOMIC_PTR_ATOMIC_H #endif #if defined ZMQ_ATOMIC_PTR_X86 #undef ZMQ_ATOMIC_PTR_X86 #endif #if defined ZMQ_ATOMIC_PTR_MUTEX #undef ZMQ_ATOMIC_PTR_MUTEX #endif #endif zeromq-2.2.0.orig/src/thread.hpp0000664000000000000000000000432111732125604015237 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_THREAD_HPP_INCLUDED__ #define __ZMQ_THREAD_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif namespace zmq { typedef void (thread_fn) (void*); // Class encapsulating OS thread. Thread initiation/termination is done // using special functions rather than in constructor/destructor so that // thread isn't created during object construction by accident, causing // newly created thread to access half-initialised object. Same applies // to the destruction process: Thread should be terminated before object // destruction begins, otherwise it can access half-destructed object. class thread_t { public: inline thread_t () { } // Creates OS thread. 'tfn' is main thread function. It'll be passed // 'arg' as an argument. void start (thread_fn *tfn_, void *arg_); // Waits for thread termination. void stop (); // These are internal members. They should be private, however then // they would not be accessible from the main C routine of the thread. thread_fn *tfn; void *arg; private: #ifdef ZMQ_HAVE_WINDOWS HANDLE descriptor; #else pthread_t descriptor; #endif thread_t (const thread_t&); const thread_t &operator = (const thread_t&); }; } #endif zeromq-2.2.0.orig/src/reaper.cpp0000664000000000000000000000537711732125604015255 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "reaper.hpp" #include "socket_base.hpp" #include "err.hpp" zmq::reaper_t::reaper_t (class ctx_t *ctx_, uint32_t tid_) : object_t (ctx_, tid_), sockets (0), terminating (false) { poller = new (std::nothrow) poller_t; alloc_assert (poller); mailbox_handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (mailbox_handle); } zmq::reaper_t::~reaper_t () { delete poller; } zmq::mailbox_t *zmq::reaper_t::get_mailbox () { return &mailbox; } void zmq::reaper_t::start () { // Start the thread. poller->start (); } void zmq::reaper_t::stop () { send_stop (); } void zmq::reaper_t::in_event () { while (true) { // Get the next command. If there is none, exit. command_t cmd; int rc = mailbox.recv (&cmd, 0); if (rc != 0 && errno == EINTR) continue; if (rc != 0 && errno == EAGAIN) break; errno_assert (rc == 0); // Process the command. cmd.destination->process_command (cmd); } } void zmq::reaper_t::out_event () { zmq_assert (false); } void zmq::reaper_t::timer_event (int id_) { zmq_assert (false); } void zmq::reaper_t::process_stop () { terminating = true; // If there are no sockets beig reaped finish immediately. if (!sockets) { send_done (); poller->rm_fd (mailbox_handle); poller->stop (); } } void zmq::reaper_t::process_reap (socket_base_t *socket_) { // Add the socket to the poller. socket_->start_reaping (poller); // Start termination of associated I/O object hierarchy. socket_->terminate (); socket_->check_destroy (); ++sockets; } void zmq::reaper_t::process_reaped () { --sockets; // If reaped was already asked to terminate and there are no more sockets, // finish immediately. if (!sockets && terminating) { send_done (); poller->rm_fd (mailbox_handle); poller->stop (); } } zeromq-2.2.0.orig/src/swap.hpp0000664000000000000000000000634111732125604014746 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SWAP_HPP_INCLUDED__ #define __ZMQ_SWAP_HPP_INCLUDED__ #include "../include/zmq.h" #include #include "stdint.hpp" namespace zmq { // This class implements a message swap. Messages are retrieved from // the swap in the same order as they entered it. class swap_t { public: enum { default_block_size = 8192 }; // Creates the swap. swap_t (int64_t filesize_); ~swap_t (); int init (); // Stores the message into the swap. The function // returns false if the swap is full; true otherwise. bool store (zmq_msg_t *msg_); // Fetches the oldest message from the swap. It is an error // to call this function when the swap is empty. void fetch (zmq_msg_t *msg_); void commit (); void rollback (); // Returns true if the swap is empty; false otherwise. bool empty (); // // Returns true if and only if the swap is full. // bool full (); // Returns true if the message fits into swap. bool fits (zmq_msg_t *msg_); private: // Copies data from a memory buffer to the backing file. // Wraps around when reaching maximum file size. void copy_from_file (void *buffer_, size_t count_); // Copies data from the backing file to the memory buffer. // Wraps around when reaching end-of-file. void copy_to_file (const void *buffer_, size_t count_); // Returns the buffer space available. int64_t buffer_space (); void fill_buf (char *buf, int64_t pos); void save_write_buf (); // File descriptor to the backing file. int fd; // Name of the backing file. std::string filename; // Maximum size of the backing file. int64_t filesize; // File offset associated with the fd file descriptor. int64_t file_pos; // File offset the next message will be stored at. int64_t write_pos; // File offset the next message will be read from. int64_t read_pos; int64_t commit_pos; size_t block_size; char *buf1; char *buf2; char *read_buf; char *write_buf; int64_t write_buf_start_addr; // Disable copying of the swap object. swap_t (const swap_t&); const swap_t &operator = (const swap_t&); }; } #endif zeromq-2.2.0.orig/src/tcp_socket.hpp0000664000000000000000000000434211732125604016131 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_SOCKET_HPP_INCLUDED__ #define __ZMQ_TCP_SOCKET_HPP_INCLUDED__ #include "fd.hpp" #include "stdint.hpp" namespace zmq { // The class encapsulating simple TCP read/write socket. class tcp_socket_t { public: tcp_socket_t (); ~tcp_socket_t (); // Associates a socket with a native socket descriptor. int open (fd_t fd_, uint64_t sndbuf_, uint64_t rcvbuf_); // Closes the underlying socket. int close (); // Returns the underlying socket. Returns retired_fd when the socket // is in the closed state. fd_t get_fd (); // Writes data to the socket. Returns the number of bytes actually // written (even zero is to be considered to be a success). In case // of error or orderly shutdown by the other peer -1 is returned. int write (const void *data, int size); // Reads data from the socket (up to 'size' bytes). Returns the number // of bytes actually read (even zero is to be considered to be // a success). In case of error or orderly shutdown by the other // peer -1 is returned. int read (void *data, int size); private: // Underlying socket. fd_t s; // Disable copy construction of tcp_socket. tcp_socket_t (const tcp_socket_t&); const tcp_socket_t &operator = (const tcp_socket_t&); }; } #endif zeromq-2.2.0.orig/src/platform.hpp.in0000664000000000000000000001425711737024126016234 0ustar rootroot/* src/platform.hpp.in. Generated from configure.in by autoheader. */ /* Define to 1 if you have the header file. */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the `freeifaddrs' function. */ #undef HAVE_FREEIFADDRS /* Define to 1 if you have the `gethrtime' function. */ #undef HAVE_GETHRTIME /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_IFADDRS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO /* Define to 1 if you have the `dcekt' library (-ldcekt). */ #undef HAVE_LIBDCEKT /* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */ #undef HAVE_LIBIPHLPAPI /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the `rpcrt4' library (-lrpcrt4). */ #undef HAVE_LIBRPCRT4 /* Define to 1 if you have the `rt' library (-lrt). */ #undef HAVE_LIBRT /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `uuid' library (-luuid). */ #undef HAVE_LIBUUID /* Define to 1 if you have the `ws2_32' library (-lws2_32). */ #undef HAVE_LIBWS2_32 /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_TCP_H /* Define to 1 if you have the `perror' function. */ #undef HAVE_PERROR /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Whether SOCK_CLOEXEC is defined and functioning. */ #undef HAVE_SOCK_CLOEXEC /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_WINDOWS_H /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Force to use mutexes */ #undef ZMQ_FORCE_MUTEXES /* Have AIX OS */ #undef ZMQ_HAVE_AIX /* Have Android OS */ #undef ZMQ_HAVE_ANDROID /* Have Cygwin */ #undef ZMQ_HAVE_CYGWIN /* Have FreeBSD OS */ #undef ZMQ_HAVE_FREEBSD /* Have HPUX OS */ #undef ZMQ_HAVE_HPUX /* Have ifaddrs.h header. */ #undef ZMQ_HAVE_IFADDRS /* Have Linux OS */ #undef ZMQ_HAVE_LINUX /* Have MinGW32 */ #undef ZMQ_HAVE_MINGW32 /* Have NetBSD OS */ #undef ZMQ_HAVE_NETBSD /* Have OpenBSD OS */ #undef ZMQ_HAVE_OPENBSD /* Have OpenPGM extension */ #undef ZMQ_HAVE_OPENPGM /* Have DarwinOSX OS */ #undef ZMQ_HAVE_OSX /* Have QNX Neutrino OS */ #undef ZMQ_HAVE_QNXNTO /* Have Solaris OS */ #undef ZMQ_HAVE_SOLARIS /* Have Windows OS */ #undef ZMQ_HAVE_WINDOWS /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ #undef volatile zeromq-2.2.0.orig/src/poll.hpp0000664000000000000000000000540011732125604014735 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLL_HPP_INCLUDED__ #define __ZMQ_POLL_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #include #include #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { // Implements socket polling mechanism using the POSIX.1-2001 // poll() system call. class poll_t : public poller_base_t { public: typedef fd_t handle_t; poll_t (); ~poll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, struct i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); struct fd_entry_t { fd_t index; struct i_poll_events *events; }; // This table stores data for registered descriptors. typedef std::vector fd_table_t; fd_table_t fd_table; // Pollset to pass to the poll function. typedef std::vector pollset_t; pollset_t pollset; // If true, there's at least one retired event source. bool retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; poll_t (const poll_t&); const poll_t &operator = (const poll_t&); }; } #endif #endif zeromq-2.2.0.orig/src/stdint.hpp0000664000000000000000000000271611732125604015303 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_STDINT_HPP_INCLUDED__ #define __ZMQ_STDINT_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_OPENVMS #include #elif defined _MSC_VER #ifndef int8_t typedef __int8 int8_t; #endif #ifndef int16_t typedef __int16 int16_t; #endif #ifndef int32_t typedef __int32 int32_t; #endif #ifndef int64_t typedef __int64 int64_t; #endif #ifndef uint8_t typedef unsigned __int8 uint8_t; #endif #ifndef uint16_t typedef unsigned __int16 uint16_t; #endif #ifndef uint32_t typedef unsigned __int32 uint32_t; #endif #ifndef uint64_t typedef unsigned __int64 uint64_t; #endif #else #include #endif #endif zeromq-2.2.0.orig/src/pgm_socket.cpp0000664000000000000000000005436411732125604016132 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #ifdef ZMQ_HAVE_LINUX #include #endif #include #include #include #include "options.hpp" #include "pgm_socket.hpp" #include "config.hpp" #include "err.hpp" #include "uuid.hpp" #include "stdint.hpp" #ifndef MSG_ERRQUEUE #define MSG_ERRQUEUE 0x2000 #endif zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) : sock (NULL), options (options_), receiver (receiver_), pgm_msgv (NULL), pgm_msgv_len (0), nbytes_rec (0), nbytes_processed (0), pgm_msgv_processed (0) { } // Create, bind and connect PGM socket. // network_ of the form : // e.g. eth0;239.192.0.1:7500 // link-local;224.250.0.1,224.250.0.2;224.250.0.3:8000 // ;[fe80::1%en0]:7500 int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_) { // Can not open transport before destroying old one. zmq_assert (sock == NULL); // Parse port number, start from end for IPv6 const char *port_delim = strrchr (network_, ':'); if (!port_delim) { errno = EINVAL; return -1; } uint16_t port_number = atoi (port_delim + 1); char network [256]; if (port_delim - network_ >= (int) sizeof (network) - 1) { errno = EINVAL; return -1; } memset (network, '\0', sizeof (network)); memcpy (network, network_, port_delim - network_); // Validate socket options // Data rate is in [B/s]. options.rate is in [kb/s]. if (options.rate <= 0) { errno = EINVAL; return -1; } // Recovery interval [s] or [ms] - based on the user's call if ((options.recovery_ivl <= 0) && (options.recovery_ivl_msec <= 0)) { errno = EINVAL; return -1; } // Zero counter used in msgrecv. nbytes_rec = 0; nbytes_processed = 0; pgm_msgv_processed = 0; pgm_error_t *pgm_error = NULL; struct pgm_addrinfo_t hints, *res = NULL; sa_family_t sa_family; memset (&hints, 0, sizeof (hints)); hints.ai_family = AF_UNSPEC; if (!pgm_getaddrinfo (network, NULL, &res, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_IF && ( // NB: cannot catch EAI_BADFLAGS. pgm_error->code != PGM_ERROR_SERVICE && pgm_error->code != PGM_ERROR_SOCKTNOSUPPORT)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } zmq_assert (res != NULL); // Pick up detected IP family. sa_family = res->ai_send_addrs[0].gsr_group.ss_family; // Create IP/PGM or UDP/PGM socket. if (udp_encapsulation_) { if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_UDP, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && ( pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT && pgm_error->code != PGM_ERROR_NOPROTOOPT && pgm_error->code != PGM_ERROR_FAILED)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } // All options are of data type int const int encapsulation_port = port_number; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_UCAST_PORT, &encapsulation_port, sizeof (encapsulation_port))) goto err_abort; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_UDP_ENCAP_MCAST_PORT, &encapsulation_port, sizeof (encapsulation_port))) goto err_abort; } else { if (!pgm_socket (&sock, sa_family, SOCK_SEQPACKET, IPPROTO_PGM, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET && ( pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT && pgm_error->code != PGM_ERROR_NOPROTOOPT && pgm_error->code != PGM_ERROR_FAILED)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } } { const int rcvbuf = (int) options.rcvbuf, sndbuf = (int) options.sndbuf, max_tpdu = (int) pgm_max_tpdu; if (rcvbuf) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof (rcvbuf))) goto err_abort; } if (sndbuf) { if (!pgm_setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof (sndbuf))) goto err_abort; } // Set maximum transport protocol data unit size (TPDU). if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MTU, &max_tpdu, sizeof (max_tpdu))) goto err_abort; } if (receiver) { const int recv_only = 1, rxw_max_tpdu = (int) pgm_max_tpdu, rxw_sqns = compute_sqns (rxw_max_tpdu), peer_expiry = pgm_secs (300), spmr_expiry = pgm_msecs (25), nak_bo_ivl = pgm_msecs (50), nak_rpt_ivl = pgm_msecs (200), nak_rdata_ivl = pgm_msecs (200), nak_data_retries = 50, nak_ncf_retries = 50; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_RECV_ONLY, &recv_only, sizeof (recv_only)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_RXW_SQNS, &rxw_sqns, sizeof (rxw_sqns)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_PEER_EXPIRY, &peer_expiry, sizeof (peer_expiry)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_SPMR_EXPIRY, &spmr_expiry, sizeof (spmr_expiry)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_BO_IVL, &nak_bo_ivl, sizeof (nak_bo_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RPT_IVL, &nak_rpt_ivl, sizeof (nak_rpt_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_RDATA_IVL, &nak_rdata_ivl, sizeof (nak_rdata_ivl)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_DATA_RETRIES, &nak_data_retries, sizeof (nak_data_retries)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_NAK_NCF_RETRIES, &nak_ncf_retries, sizeof (nak_ncf_retries))) goto err_abort; } else { const int send_only = 1, max_rte = (int) ((options.rate * 1000) / 8), txw_max_tpdu = (int) pgm_max_tpdu, txw_sqns = compute_sqns (txw_max_tpdu), ambient_spm = pgm_secs (30), heartbeat_spm[] = { pgm_msecs (100), pgm_msecs (100), pgm_msecs (100), pgm_msecs (100), pgm_msecs (1300), pgm_secs (7), pgm_secs (16), pgm_secs (25), pgm_secs (30) }; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_ONLY, &send_only, sizeof (send_only)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_ODATA_MAX_RTE, &max_rte, sizeof (max_rte)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_TXW_SQNS, &txw_sqns, sizeof (txw_sqns)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_AMBIENT_SPM, &ambient_spm, sizeof (ambient_spm)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_HEARTBEAT_SPM, &heartbeat_spm, sizeof (heartbeat_spm))) goto err_abort; } // PGM transport GSI. struct pgm_sockaddr_t addr; memset (&addr, 0, sizeof(addr)); addr.sa_port = port_number; addr.sa_addr.sport = DEFAULT_DATA_SOURCE_PORT; if (options.identity.size () > 0) { // Create gsi from identity. if (!pgm_gsi_create_from_data (&addr.sa_addr.gsi, options.identity.data (), options.identity.size ())) goto err_abort; } else { // Generate random gsi. std::string gsi_base = uuid_t ().to_string (); if (!pgm_gsi_create_from_string (&addr.sa_addr.gsi, gsi_base.c_str (), -1)) goto err_abort; } // Bind a transport to the specified network devices. struct pgm_interface_req_t if_req; memset (&if_req, 0, sizeof(if_req)); if_req.ir_interface = res->ai_recv_addrs[0].gsr_interface; if_req.ir_scope_id = 0; if (AF_INET6 == sa_family) { struct sockaddr_in6 sa6; memcpy (&sa6, &res->ai_recv_addrs[0].gsr_group, sizeof (sa6)); if_req.ir_scope_id = sa6.sin6_scope_id; } if (!pgm_bind3 (sock, &addr, sizeof (addr), &if_req, sizeof (if_req), &if_req, sizeof (if_req), &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); if ((pgm_error->domain == PGM_ERROR_DOMAIN_SOCKET || pgm_error->domain == PGM_ERROR_DOMAIN_IF) && ( pgm_error->code != PGM_ERROR_INVAL && pgm_error->code != PGM_ERROR_BADF && pgm_error->code != PGM_ERROR_FAULT)) // User, host, or network configuration or transient error. goto err_abort; // Fatal OpenPGM internal error. zmq_assert (false); } // Join IP multicast groups. for (unsigned i = 0; i < res->ai_recv_addrs_len; i++) { if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_JOIN_GROUP, &res->ai_recv_addrs [i], sizeof (struct group_req))) goto err_abort; } if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_SEND_GROUP, &res->ai_send_addrs [0], sizeof (struct group_req))) goto err_abort; pgm_freeaddrinfo (res); res = NULL; // Set IP level parameters. { const int nonblocking = 1, multicast_loop = options.use_multicast_loop ? 1 : 0, multicast_hops = 16, // Expedited Forwarding PHB for network elements, no ECN. dscp = 0x2e << 2; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_LOOP, &multicast_loop, sizeof (multicast_loop)) || !pgm_setsockopt (sock, IPPROTO_PGM, PGM_MULTICAST_HOPS, &multicast_hops, sizeof (multicast_hops))) goto err_abort; if (AF_INET6 != sa_family && !pgm_setsockopt (sock, IPPROTO_PGM, PGM_TOS, &dscp, sizeof (dscp))) goto err_abort; if (!pgm_setsockopt (sock, IPPROTO_PGM, PGM_NOBLOCK, &nonblocking, sizeof (nonblocking))) goto err_abort; } // Connect PGM transport to start state machine. if (!pgm_connect (sock, &pgm_error)) { // Invalid parameters don't set pgm_error_t. zmq_assert (pgm_error != NULL); goto err_abort; } // For receiver transport preallocate pgm_msgv array. if (receiver) { zmq_assert (in_batch_size > 0); size_t max_tsdu_size = get_max_tsdu_size (); pgm_msgv_len = (int) in_batch_size / max_tsdu_size; if ((int) in_batch_size % max_tsdu_size) pgm_msgv_len++; zmq_assert (pgm_msgv_len); pgm_msgv = (pgm_msgv_t*) malloc (sizeof (pgm_msgv_t) * pgm_msgv_len); alloc_assert (pgm_msgv); } return 0; err_abort: if (sock != NULL) { pgm_close (sock, FALSE); sock = NULL; } if (res != NULL) { pgm_freeaddrinfo (res); res = NULL; } if (pgm_error != NULL) { pgm_error_free (pgm_error); pgm_error = NULL; } errno = EINVAL; return -1; } zmq::pgm_socket_t::~pgm_socket_t () { if (pgm_msgv) free (pgm_msgv); if (sock) pgm_close (sock, TRUE); } // Get receiver fds. receive_fd_ is signaled for incoming packets, // waiting_pipe_fd_ is signaled for state driven events and data. void zmq::pgm_socket_t::get_receiver_fds (fd_t *receive_fd_, fd_t *waiting_pipe_fd_) { socklen_t socklen; bool rc; zmq_assert (receive_fd_); zmq_assert (waiting_pipe_fd_); socklen = sizeof (*receive_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*waiting_pipe_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK, waiting_pipe_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*waiting_pipe_fd_)); } // Get fds and store them into user allocated memory. // send_fd is for non-blocking send wire notifications. // receive_fd_ is for incoming back-channel protocol packets. // rdata_notify_fd_ is raised for waiting repair transmissions. // pending_notify_fd_ is for state driven events. void zmq::pgm_socket_t::get_sender_fds (fd_t *send_fd_, fd_t *receive_fd_, fd_t *rdata_notify_fd_, fd_t *pending_notify_fd_) { socklen_t socklen; bool rc; zmq_assert (send_fd_); zmq_assert (receive_fd_); zmq_assert (rdata_notify_fd_); zmq_assert (pending_notify_fd_); socklen = sizeof (*send_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_SEND_SOCK, send_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*receive_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RECV_SOCK, receive_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*receive_fd_)); socklen = sizeof (*rdata_notify_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_REPAIR_SOCK, rdata_notify_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*rdata_notify_fd_)); socklen = sizeof (*pending_notify_fd_); rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_PENDING_SOCK, pending_notify_fd_, &socklen); zmq_assert (rc); zmq_assert (socklen == sizeof (*pending_notify_fd_)); } // Send one APDU, transmit window owned memory. // data_len_ must be less than one TPDU. size_t zmq::pgm_socket_t::send (unsigned char *data_, size_t data_len_) { size_t nbytes = 0; const int status = pgm_send (sock, data_, data_len_, &nbytes); // We have to write all data as one packet. if (nbytes > 0) { zmq_assert (status == PGM_IO_STATUS_NORMAL); zmq_assert ((ssize_t) nbytes == (ssize_t) data_len_); } else { zmq_assert (status == PGM_IO_STATUS_RATE_LIMITED || status == PGM_IO_STATUS_WOULD_BLOCK); if (status == PGM_IO_STATUS_RATE_LIMITED) errno = ENOMEM; else errno = EBUSY; } // Save return value. last_tx_status = status; return nbytes; } long zmq::pgm_socket_t::get_rx_timeout () { if (last_rx_status != PGM_IO_STATUS_RATE_LIMITED && last_rx_status != PGM_IO_STATUS_TIMER_PENDING) return -1; struct timeval tv; socklen_t optlen = sizeof (tv); const bool rc = pgm_getsockopt (sock, IPPROTO_PGM, last_rx_status == PGM_IO_STATUS_RATE_LIMITED ? PGM_RATE_REMAIN : PGM_TIME_REMAIN, &tv, &optlen); zmq_assert (rc); const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); return timeout; } long zmq::pgm_socket_t::get_tx_timeout () { if (last_tx_status != PGM_IO_STATUS_RATE_LIMITED) return -1; struct timeval tv; socklen_t optlen = sizeof (tv); const bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_RATE_REMAIN, &tv, &optlen); zmq_assert (rc); const long timeout = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); return timeout; } // Return max TSDU size without fragmentation from current PGM transport. size_t zmq::pgm_socket_t::get_max_tsdu_size () { int max_tsdu = 0; socklen_t optlen = sizeof (max_tsdu); bool rc = pgm_getsockopt (sock, IPPROTO_PGM, PGM_MSS, &max_tsdu, &optlen); zmq_assert (rc); zmq_assert (optlen == sizeof (max_tsdu)); return (size_t) max_tsdu; } // pgm_recvmsgv is called to fill the pgm_msgv array up to pgm_msgv_len. // In subsequent calls data from pgm_msgv structure are returned. ssize_t zmq::pgm_socket_t::receive (void **raw_data_, const pgm_tsi_t **tsi_) { size_t raw_data_len = 0; // We just sent all data from pgm_transport_recvmsgv up // and have to return 0 that another engine in this thread is scheduled. if (nbytes_rec == nbytes_processed && nbytes_rec > 0) { // Reset all the counters. nbytes_rec = 0; nbytes_processed = 0; pgm_msgv_processed = 0; errno = EAGAIN; return 0; } // If we have are going first time or if we have processed all pgm_msgv_t // structure previously read from the pgm socket. if (nbytes_rec == nbytes_processed) { // Check program flow. zmq_assert (pgm_msgv_processed == 0); zmq_assert (nbytes_processed == 0); zmq_assert (nbytes_rec == 0); // Receive a vector of Application Protocol Domain Unit's (APDUs) // from the transport. pgm_error_t *pgm_error = NULL; const int status = pgm_recvmsgv (sock, pgm_msgv, pgm_msgv_len, MSG_ERRQUEUE, &nbytes_rec, &pgm_error); // Invalid parameters. zmq_assert (status != PGM_IO_STATUS_ERROR); last_rx_status = status; // In a case when no ODATA/RDATA fired POLLIN event (SPM...) // pgm_recvmsg returns PGM_IO_STATUS_TIMER_PENDING. if (status == PGM_IO_STATUS_TIMER_PENDING) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is // returned. nbytes_rec = 0; errno = EBUSY; return 0; } // Send SPMR, NAK, ACK is rate limited. if (status == PGM_IO_STATUS_RATE_LIMITED) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is returned. nbytes_rec = 0; errno = ENOMEM; return 0; } // No peers and hence no incoming packets. if (status == PGM_IO_STATUS_WOULD_BLOCK) { zmq_assert (nbytes_rec == 0); // In case if no RDATA/ODATA caused POLLIN 0 is returned. nbytes_rec = 0; errno = EAGAIN; return 0; } // Data loss. if (status == PGM_IO_STATUS_RESET) { struct pgm_sk_buff_t* skb = pgm_msgv [0].msgv_skb [0]; // Save lost data TSI. *tsi_ = &skb->tsi; nbytes_rec = 0; // In case of dala loss -1 is returned. errno = EINVAL; pgm_free_skb (skb); return -1; } zmq_assert (status == PGM_IO_STATUS_NORMAL); } else { zmq_assert (pgm_msgv_processed <= pgm_msgv_len); } // Zero byte payloads are valid in PGM, but not 0MQ protocol. zmq_assert (nbytes_rec > 0); // Only one APDU per pgm_msgv_t structure is allowed. zmq_assert (pgm_msgv [pgm_msgv_processed].msgv_len == 1); struct pgm_sk_buff_t* skb = pgm_msgv [pgm_msgv_processed].msgv_skb [0]; // Take pointers from pgm_msgv_t structure. *raw_data_ = skb->data; raw_data_len = skb->len; // Save current TSI. *tsi_ = &skb->tsi; // Move the the next pgm_msgv_t structure. pgm_msgv_processed++; zmq_assert (pgm_msgv_processed <= pgm_msgv_len); nbytes_processed +=raw_data_len; return raw_data_len; } void zmq::pgm_socket_t::process_upstream () { pgm_msgv_t dummy_msg; size_t dummy_bytes = 0; pgm_error_t *pgm_error = NULL; const int status = pgm_recvmsgv (sock, &dummy_msg, 1, MSG_ERRQUEUE, &dummy_bytes, &pgm_error); // Invalid parameters. zmq_assert (status != PGM_IO_STATUS_ERROR); // No data should be returned. zmq_assert (dummy_bytes == 0 && (status == PGM_IO_STATUS_TIMER_PENDING || status == PGM_IO_STATUS_RATE_LIMITED || status == PGM_IO_STATUS_WOULD_BLOCK)); last_rx_status = status; if (status == PGM_IO_STATUS_TIMER_PENDING) errno = EBUSY; else if (status == PGM_IO_STATUS_RATE_LIMITED) errno = ENOMEM; else errno = EAGAIN; } int zmq::pgm_socket_t::compute_sqns (int tpdu_) { // Convert rate into B/ms. uint64_t rate = ((uint64_t) options.rate) / 8; // Get recovery interval in milliseconds. uint64_t interval = options.recovery_ivl_msec >= 0 ? options.recovery_ivl_msec : options.recovery_ivl * 1000; // Compute the size of the buffer in bytes. uint64_t size = interval * rate; // Translate the size into number of packets. uint64_t sqns = size / tpdu_; // Buffer should be able to contain at least one packet. if (sqns == 0) sqns = 1; return (int) sqns; } #endif zeromq-2.2.0.orig/src/mailbox.cpp0000664000000000000000000000456611732125604015431 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "mailbox.hpp" #include "platform.hpp" #include "err.hpp" zmq::mailbox_t::mailbox_t () { // Get the pipe into passive state. That way, if the users starts by // polling on the associated file descriptor it will get woken up when // new command is posted. bool ok = cpipe.read (NULL); zmq_assert (!ok); active = false; } zmq::mailbox_t::~mailbox_t () { // TODO: Retrieve and deallocate commands inside the cpipe. // Work around problem that other threads might still be in our // send() method, by waiting on the mutex before disappearing. sync.lock (); sync.unlock (); } zmq::fd_t zmq::mailbox_t::get_fd () { return signaler.get_fd (); } void zmq::mailbox_t::send (const command_t &cmd_) { sync.lock (); cpipe.write (cmd_, false); bool ok = cpipe.flush (); sync.unlock (); if (!ok) signaler.send (); } int zmq::mailbox_t::recv (command_t *cmd_, int timeout_) { // Try to get the command straight away. if (active) { bool ok = cpipe.read (cmd_); if (ok) return 0; // If there are no more commands available, switch into passive state. active = false; signaler.recv (); } // Wait for signal from the command sender. int rc = signaler.wait (timeout_); if (rc != 0 && (errno == EAGAIN || errno == EINTR)) return -1; // We've got the signal. Now we can switch into active state. active = true; // Get a command. errno_assert (rc == 0); bool ok = cpipe.read (cmd_); zmq_assert (ok); return 0; } zeromq-2.2.0.orig/src/atomic_counter.hpp0000664000000000000000000001126211732125604017005 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ATOMIC_COUNTER_HPP_INCLUDED__ #define __ZMQ_ATOMIC_COUNTER_HPP_INCLUDED__ #include "stdint.hpp" #include "platform.hpp" #if defined ZMQ_FORCE_MUTEXES #define ZMQ_ATOMIC_COUNTER_MUTEX #elif (defined __i386__ || defined __x86_64__) && defined __GNUC__ #define ZMQ_ATOMIC_COUNTER_X86 #elif defined ZMQ_HAVE_WINDOWS #define ZMQ_ATOMIC_COUNTER_WINDOWS #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_NETBSD) #define ZMQ_ATOMIC_COUNTER_ATOMIC_H #else #define ZMQ_ATOMIC_COUNTER_MUTEX #endif #if defined ZMQ_ATOMIC_COUNTER_MUTEX #include "mutex.hpp" #elif defined ZMQ_ATOMIC_COUNTER_WINDOWS #include "windows.hpp" #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H #include #endif namespace zmq { // This class represents an integer that can be incremented/decremented // in atomic fashion. class atomic_counter_t { public: typedef uint32_t integer_t; inline atomic_counter_t (integer_t value_ = 0) : value (value_) { } inline ~atomic_counter_t () { } // Set counter value (not thread-safe). inline void set (integer_t value_) { value = value_; } // Atomic addition. Returns the old value. inline integer_t add (integer_t increment_) { integer_t old_value; #if defined ZMQ_ATOMIC_COUNTER_WINDOWS old_value = InterlockedExchangeAdd ((LONG*) &value, increment_); #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H integer_t new_value = atomic_add_32_nv (&value, increment_); old_value = new_value - increment_; #elif defined ZMQ_ATOMIC_COUNTER_X86 __asm__ volatile ( "lock; xadd %0, %1 \n\t" : "=r" (old_value), "=m" (value) : "0" (increment_), "m" (value) : "cc", "memory"); #elif defined ZMQ_ATOMIC_COUNTER_MUTEX sync.lock (); old_value = value; value += increment_; sync.unlock (); #else #error atomic_counter is not implemented for this platform #endif return old_value; } // Atomic subtraction. Returns false if the counter drops to zero. inline bool sub (integer_t decrement) { #if defined ZMQ_ATOMIC_COUNTER_WINDOWS LONG delta = - ((LONG) decrement); integer_t old = InterlockedExchangeAdd ((LONG*) &value, delta); return old - decrement != 0; #elif defined ZMQ_ATOMIC_COUNTER_ATOMIC_H int32_t delta = - ((int32_t) decrement); integer_t nv = atomic_add_32_nv (&value, delta); return nv != 0; #elif defined ZMQ_ATOMIC_COUNTER_X86 integer_t oldval = -decrement; volatile integer_t *val = &value; __asm__ volatile ("lock; xaddl %0,%1" : "=r" (oldval), "=m" (*val) : "0" (oldval), "m" (*val) : "cc", "memory"); return oldval != decrement; #elif defined ZMQ_ATOMIC_COUNTER_MUTEX sync.lock (); value -= decrement; bool result = value ? true : false; sync.unlock (); return result; #else #error atomic_counter is not implemented for this platform #endif } inline integer_t get () { return value; } private: volatile integer_t value; #if defined ZMQ_ATOMIC_COUNTER_MUTEX mutex_t sync; #endif atomic_counter_t (const atomic_counter_t&); const atomic_counter_t& operator = (const atomic_counter_t&); }; } // Remove macros local to this file. #if defined ZMQ_ATOMIC_COUNTER_WINDOWS #undef ZMQ_ATOMIC_COUNTER_WINDOWS #endif #if defined ZMQ_ATOMIC_COUNTER_ATOMIC_H #undef ZMQ_ATOMIC_COUNTER_ATOMIC_H #endif #if defined ZMQ_ATOMIC_COUNTER_X86 #undef ZMQ_ATOMIC_COUNTER_X86 #endif #if defined ZMQ_ATOMIC_COUNTER_MUTEX #undef ZMQ_ATOMIC_COUNTER_MUTEX #endif #endif zeromq-2.2.0.orig/src/epoll.hpp0000664000000000000000000000461211732125604015106 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_EPOLL_HPP_INCLUDED__ #define __ZMQ_EPOLL_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_LINUX #include #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { // This class implements socket polling mechanism using the Linux-specific // epoll mechanism. class epoll_t : public poller_base_t { public: typedef void* handle_t; epoll_t (); ~epoll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, struct i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // Main epoll file descriptor fd_t epoll_fd; struct poll_entry_t { fd_t fd; epoll_event ev; struct i_poll_events *events; }; // List of retired event sources. typedef std::vector retired_t; retired_t retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; epoll_t (const epoll_t&); const epoll_t &operator = (const epoll_t&); }; } #endif #endif zeromq-2.2.0.orig/src/zmq_connecter.cpp0000664000000000000000000001117311732125604016635 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #endif #include "zmq_connecter.hpp" #include "zmq_engine.hpp" #include "zmq_init.hpp" #include "io_thread.hpp" #include "err.hpp" zmq::zmq_connecter_t::zmq_connecter_t (class io_thread_t *io_thread_, class session_t *session_, const options_t &options_, const char *protocol_, const char *address_, bool wait_) : own_t (io_thread_, options_), io_object_t (io_thread_), handle_valid (false), wait (wait_), session (session_), current_reconnect_ivl(options.reconnect_ivl) { int rc = tcp_connecter.set_address (protocol_, address_); zmq_assert (rc == 0); } zmq::zmq_connecter_t::~zmq_connecter_t () { if (wait) cancel_timer (reconnect_timer_id); if (handle_valid) rm_fd (handle); } void zmq::zmq_connecter_t::process_plug () { if (wait) add_reconnect_timer(); else start_connecting (); } void zmq::zmq_connecter_t::in_event () { // We are not polling for incomming data, so we are actually called // because of error here. However, we can get error on out event as well // on some platforms, so we'll simply handle both events in the same way. out_event (); } void zmq::zmq_connecter_t::out_event () { fd_t fd = tcp_connecter.connect (); rm_fd (handle); handle_valid = false; // Handle the error condition by attempt to reconnect. if (fd == retired_fd) { tcp_connecter.close (); wait = true; add_reconnect_timer(); return; } // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create an init object. zmq_init_t *init = new (std::nothrow) zmq_init_t (io_thread, NULL, session, fd, options); alloc_assert (init); launch_sibling (init); // Shut the connecter down. terminate (); } void zmq::zmq_connecter_t::timer_event (int id_) { zmq_assert (id_ == reconnect_timer_id); wait = false; start_connecting (); } void zmq::zmq_connecter_t::start_connecting () { // Open the connecting socket. int rc = tcp_connecter.open (); // Connect may succeed in synchronous manner. if (rc == 0) { handle = add_fd (tcp_connecter.get_fd ()); handle_valid = true; out_event (); return; } // Connection establishment may be dealyed. Poll for its completion. else if (rc == -1 && errno == EAGAIN) { handle = add_fd (tcp_connecter.get_fd ()); handle_valid = true; set_pollout (handle); return; } // Handle any other error condition by eventual reconnect. wait = true; add_reconnect_timer(); } void zmq::zmq_connecter_t::add_reconnect_timer() { add_timer (get_new_reconnect_ivl(), reconnect_timer_id); } int zmq::zmq_connecter_t::get_new_reconnect_ivl () { #if defined ZMQ_HAVE_WINDOWS int pid = (int) GetCurrentProcessId (); #else int pid = (int) getpid (); #endif // The new interval is the current interval + random value. int this_interval = current_reconnect_ivl + ((pid * 13) % options.reconnect_ivl); // Only change the current reconnect interval if the maximum reconnect // interval was set and if it's larger than the reconnect interval. if (options.reconnect_ivl_max > 0 && options.reconnect_ivl_max > options.reconnect_ivl) { // Calculate the next interval current_reconnect_ivl = current_reconnect_ivl * 2; if(current_reconnect_ivl >= options.reconnect_ivl_max) { current_reconnect_ivl = options.reconnect_ivl_max; } } return this_interval; } zeromq-2.2.0.orig/src/encoder.hpp0000664000000000000000000001377111732125604015420 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ENCODER_HPP_INCLUDED__ #define __ZMQ_ENCODER_HPP_INCLUDED__ #include #include #include #include #include "err.hpp" #include "../include/zmq.h" namespace zmq { // Helper base class for encoders. It implements the state machine that // fills the outgoing buffer. Derived classes should implement individual // state machine actions. template class encoder_base_t { public: inline encoder_base_t (size_t bufsize_) : bufsize (bufsize_) { buf = (unsigned char*) malloc (bufsize_); alloc_assert (buf); } // The destructor doesn't have to be virtual. It is made virtual // just to keep ICC and code checking tools from complaining. inline virtual ~encoder_base_t () { free (buf); } // The function returns a batch of binary data. The data // are filled to a supplied buffer. If no buffer is supplied (data_ // points to NULL) decoder object will provide buffer of its own. // If offset is not NULL, it is filled by offset of the first message // in the batch.If there's no beginning of a message in the batch, // offset is set to -1. inline void get_data (unsigned char **data_, size_t *size_, int *offset_ = NULL) { unsigned char *buffer = !*data_ ? buf : *data_; size_t buffersize = !*data_ ? bufsize : *size_; size_t pos = 0; if (offset_) *offset_ = -1; while (true) { // If there are no more data to return, run the state machine. // If there are still no data, return what we already have // in the buffer. if (!to_write) { if (!(static_cast (this)->*next) ()) { *data_ = buffer; *size_ = pos; return; } // If beginning of the message was processed, adjust the // first-message-offset. if (beginning) { if (offset_ && *offset_ == -1) *offset_ = pos; beginning = false; } } // If there are no data in the buffer yet and we are able to // fill whole buffer in a single go, let's use zero-copy. // There's no disadvantage to it as we cannot stuck multiple // messages into the buffer anyway. Note that subsequent // write(s) are non-blocking, thus each single write writes // at most SO_SNDBUF bytes at once not depending on how large // is the chunk returned from here. // As a consequence, large messages being sent won't block // other engines running in the same I/O thread for excessive // amounts of time. if (!pos && !*data_ && to_write >= buffersize) { *data_ = write_pos; *size_ = to_write; write_pos = NULL; to_write = 0; return; } // Copy data to the buffer. If the buffer is full, return. size_t to_copy = std::min (to_write, buffersize - pos); memcpy (buffer + pos, write_pos, to_copy); pos += to_copy; write_pos += to_copy; to_write -= to_copy; if (pos == buffersize) { *data_ = buffer; *size_ = pos; return; } } } protected: // Prototype of state machine action. typedef bool (T::*step_t) (); // This function should be called from derived class to write the data // to the buffer and schedule next state machine action. Set beginning // to true when you are writing first byte of a message. inline void next_step (void *write_pos_, size_t to_write_, step_t next_, bool beginning_) { write_pos = (unsigned char*) write_pos_; to_write = to_write_; next = next_; beginning = beginning_; } private: unsigned char *write_pos; size_t to_write; step_t next; bool beginning; size_t bufsize; unsigned char *buf; encoder_base_t (const encoder_base_t&); void operator = (const encoder_base_t&); }; // Encoder for 0MQ framing protocol. Converts messages into data batches. class encoder_t : public encoder_base_t { public: encoder_t (size_t bufsize_); ~encoder_t (); void set_inout (struct i_inout *source_); private: bool size_ready (); bool message_ready (); struct i_inout *source; ::zmq_msg_t in_progress; unsigned char tmpbuf [10]; encoder_t (const encoder_t&); const encoder_t &operator = (const encoder_t&); }; } #endif zeromq-2.2.0.orig/src/Makefile.in0000664000000000000000000026356011741762442015347 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/libzmq.pc.in \ $(srcdir)/platform.hpp.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = platform.hpp CONFIG_CLEAN_FILES = libzmq.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @BUILD_PGM_TRUE@libzmq_la_DEPENDENCIES = \ @BUILD_PGM_TRUE@ $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la am_libzmq_la_OBJECTS = libzmq_la-clock.lo libzmq_la-command.lo \ libzmq_la-ctx.lo libzmq_la-connect_session.lo \ libzmq_la-decoder.lo libzmq_la-device.lo libzmq_la-devpoll.lo \ libzmq_la-dist.lo libzmq_la-encoder.lo libzmq_la-epoll.lo \ libzmq_la-err.lo libzmq_la-fq.lo libzmq_la-io_object.lo \ libzmq_la-io_thread.lo libzmq_la-ip.lo libzmq_la-kqueue.lo \ libzmq_la-lb.lo libzmq_la-mailbox.lo \ libzmq_la-named_session.lo libzmq_la-object.lo \ libzmq_la-options.lo libzmq_la-own.lo libzmq_la-pair.lo \ libzmq_la-pgm_receiver.lo libzmq_la-pgm_sender.lo \ libzmq_la-pgm_socket.lo libzmq_la-pipe.lo libzmq_la-poll.lo \ libzmq_la-poller_base.lo libzmq_la-pull.lo libzmq_la-push.lo \ libzmq_la-reaper.lo libzmq_la-pub.lo libzmq_la-rep.lo \ libzmq_la-req.lo libzmq_la-select.lo libzmq_la-session.lo \ libzmq_la-signaler.lo libzmq_la-socket_base.lo \ libzmq_la-sub.lo libzmq_la-swap.lo libzmq_la-tcp_connecter.lo \ libzmq_la-tcp_listener.lo libzmq_la-tcp_socket.lo \ libzmq_la-thread.lo libzmq_la-transient_session.lo \ libzmq_la-trie.lo libzmq_la-uuid.lo libzmq_la-xpub.lo \ libzmq_la-xrep.lo libzmq_la-xreq.lo libzmq_la-xsub.lo \ libzmq_la-zmq.lo libzmq_la-zmq_connecter.lo \ libzmq_la-zmq_engine.lo libzmq_la-zmq_init.lo \ libzmq_la-zmq_listener.lo libzmq_la_OBJECTS = $(am_libzmq_la_OBJECTS) AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent libzmq_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(libzmq_la_CXXFLAGS) \ $(CXXFLAGS) $(libzmq_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_$(V)) am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_$(V)) am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libzmq_la_SOURCES) DIST_SOURCES = $(libzmq_la_SOURCES) DATA = $(pkgconfig_DATA) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ lib_LTLIBRARIES = libzmq.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzmq.pc include_HEADERS = ../include/zmq.h ../include/zmq.hpp ../include/zmq_utils.h libzmq_la_SOURCES = \ array.hpp \ atomic_counter.hpp \ atomic_ptr.hpp \ blob.hpp \ clock.hpp \ command.hpp \ config.hpp \ connect_session.hpp \ ctx.hpp \ decoder.hpp \ device.hpp \ devpoll.hpp \ dist.hpp \ encoder.hpp \ epoll.hpp \ err.hpp \ fd.hpp \ fq.hpp \ gcc_421_char_traits.hpp \ i_inout.hpp \ io_object.hpp \ io_thread.hpp \ ip.hpp \ i_engine.hpp \ i_poll_events.hpp \ kqueue.hpp \ lb.hpp \ likely.hpp \ mailbox.hpp \ msg_content.hpp \ mutex.hpp \ named_session.hpp \ object.hpp \ options.hpp \ own.hpp \ pgm_receiver.hpp \ pgm_sender.hpp \ pgm_socket.hpp \ pipe.hpp \ platform.hpp \ poll.hpp \ poller.hpp \ poller_base.hpp \ pair.hpp \ pub.hpp \ pull.hpp \ push.hpp \ reaper.hpp \ rep.hpp \ req.hpp \ select.hpp \ semaphore.hpp \ session.hpp \ signaler.hpp \ socket_base.hpp \ stdint.hpp \ sub.hpp \ swap.hpp \ tcp_connecter.hpp \ tcp_listener.hpp \ tcp_socket.hpp \ thread.hpp \ transient_session.hpp \ trie.hpp \ uuid.hpp \ windows.hpp \ wire.hpp \ xpub.hpp \ xrep.hpp \ xreq.hpp \ xsub.hpp \ ypipe.hpp \ yqueue.hpp \ zmq_connecter.hpp \ zmq_engine.hpp \ zmq_init.hpp \ zmq_listener.hpp \ clock.cpp \ command.cpp \ ctx.cpp \ connect_session.cpp \ decoder.cpp \ device.cpp \ devpoll.cpp \ dist.cpp \ encoder.cpp \ epoll.cpp \ err.cpp \ fq.cpp \ io_object.cpp \ io_thread.cpp \ ip.cpp \ kqueue.cpp \ lb.cpp \ mailbox.cpp \ named_session.cpp \ object.cpp \ options.cpp \ own.cpp \ pair.cpp \ pgm_receiver.cpp \ pgm_sender.cpp \ pgm_socket.cpp \ pipe.cpp \ poll.cpp \ poller_base.cpp \ pull.cpp \ push.cpp \ reaper.cpp \ pub.cpp \ rep.cpp \ req.cpp \ select.cpp \ session.cpp \ signaler.cpp \ socket_base.cpp \ sub.cpp \ swap.cpp \ tcp_connecter.cpp \ tcp_listener.cpp \ tcp_socket.cpp \ thread.cpp \ transient_session.cpp \ trie.cpp \ uuid.cpp \ xpub.cpp \ xrep.cpp \ xreq.cpp \ xsub.cpp \ zmq.cpp \ zmq_connecter.cpp \ zmq_engine.cpp \ zmq_init.cpp \ zmq_listener.cpp @ON_MINGW_FALSE@libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ @ON_MINGW_TRUE@libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ @BUILD_PGM_TRUE@libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/ @BUILD_PGM_TRUE@libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la all: platform.hpp $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): platform.hpp: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/platform.hpp.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/platform.hpp $(srcdir)/platform.hpp.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f platform.hpp stamp-h1 libzmq.pc: $(top_builddir)/config.status $(srcdir)/libzmq.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libzmq.la: $(libzmq_la_OBJECTS) $(libzmq_la_DEPENDENCIES) $(AM_V_CXXLD)$(libzmq_la_LINK) -rpath $(libdir) $(libzmq_la_OBJECTS) $(libzmq_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-command.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-connect_session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ctx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-devpoll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-encoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-epoll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-err.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-fq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-io_thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-ip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-kqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-lb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-mailbox.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-named_session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-object.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-own.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pair.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_receiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_sender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pgm_socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pipe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poll.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-poller_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-pull.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-push.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-reaper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-rep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-req.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-select.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-signaler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-socket_base.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-sub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-swap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_connecter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_listener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-tcp_socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-transient_session.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-trie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-uuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xpub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xrep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xreq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-xsub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_connecter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libzmq_la-zmq_listener.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< libzmq_la-clock.lo: clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-clock.lo -MD -MP -MF $(DEPDIR)/libzmq_la-clock.Tpo -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-clock.Tpo $(DEPDIR)/libzmq_la-clock.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='clock.cpp' object='libzmq_la-clock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-clock.lo `test -f 'clock.cpp' || echo '$(srcdir)/'`clock.cpp libzmq_la-command.lo: command.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-command.lo -MD -MP -MF $(DEPDIR)/libzmq_la-command.Tpo -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-command.Tpo $(DEPDIR)/libzmq_la-command.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='command.cpp' object='libzmq_la-command.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-command.lo `test -f 'command.cpp' || echo '$(srcdir)/'`command.cpp libzmq_la-ctx.lo: ctx.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ctx.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ctx.Tpo -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ctx.Tpo $(DEPDIR)/libzmq_la-ctx.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ctx.cpp' object='libzmq_la-ctx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ctx.lo `test -f 'ctx.cpp' || echo '$(srcdir)/'`ctx.cpp libzmq_la-connect_session.lo: connect_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-connect_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-connect_session.Tpo -c -o libzmq_la-connect_session.lo `test -f 'connect_session.cpp' || echo '$(srcdir)/'`connect_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-connect_session.Tpo $(DEPDIR)/libzmq_la-connect_session.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='connect_session.cpp' object='libzmq_la-connect_session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-connect_session.lo `test -f 'connect_session.cpp' || echo '$(srcdir)/'`connect_session.cpp libzmq_la-decoder.lo: decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-decoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-decoder.Tpo -c -o libzmq_la-decoder.lo `test -f 'decoder.cpp' || echo '$(srcdir)/'`decoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-decoder.Tpo $(DEPDIR)/libzmq_la-decoder.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='decoder.cpp' object='libzmq_la-decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-decoder.lo `test -f 'decoder.cpp' || echo '$(srcdir)/'`decoder.cpp libzmq_la-device.lo: device.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-device.lo -MD -MP -MF $(DEPDIR)/libzmq_la-device.Tpo -c -o libzmq_la-device.lo `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-device.Tpo $(DEPDIR)/libzmq_la-device.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='device.cpp' object='libzmq_la-device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-device.lo `test -f 'device.cpp' || echo '$(srcdir)/'`device.cpp libzmq_la-devpoll.lo: devpoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-devpoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-devpoll.Tpo -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-devpoll.Tpo $(DEPDIR)/libzmq_la-devpoll.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='devpoll.cpp' object='libzmq_la-devpoll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-devpoll.lo `test -f 'devpoll.cpp' || echo '$(srcdir)/'`devpoll.cpp libzmq_la-dist.lo: dist.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-dist.lo -MD -MP -MF $(DEPDIR)/libzmq_la-dist.Tpo -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-dist.Tpo $(DEPDIR)/libzmq_la-dist.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='dist.cpp' object='libzmq_la-dist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-dist.lo `test -f 'dist.cpp' || echo '$(srcdir)/'`dist.cpp libzmq_la-encoder.lo: encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-encoder.lo -MD -MP -MF $(DEPDIR)/libzmq_la-encoder.Tpo -c -o libzmq_la-encoder.lo `test -f 'encoder.cpp' || echo '$(srcdir)/'`encoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-encoder.Tpo $(DEPDIR)/libzmq_la-encoder.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='encoder.cpp' object='libzmq_la-encoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-encoder.lo `test -f 'encoder.cpp' || echo '$(srcdir)/'`encoder.cpp libzmq_la-epoll.lo: epoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-epoll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-epoll.Tpo -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-epoll.Tpo $(DEPDIR)/libzmq_la-epoll.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='epoll.cpp' object='libzmq_la-epoll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-epoll.lo `test -f 'epoll.cpp' || echo '$(srcdir)/'`epoll.cpp libzmq_la-err.lo: err.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-err.lo -MD -MP -MF $(DEPDIR)/libzmq_la-err.Tpo -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-err.Tpo $(DEPDIR)/libzmq_la-err.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='err.cpp' object='libzmq_la-err.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-err.lo `test -f 'err.cpp' || echo '$(srcdir)/'`err.cpp libzmq_la-fq.lo: fq.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-fq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-fq.Tpo -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-fq.Tpo $(DEPDIR)/libzmq_la-fq.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='fq.cpp' object='libzmq_la-fq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-fq.lo `test -f 'fq.cpp' || echo '$(srcdir)/'`fq.cpp libzmq_la-io_object.lo: io_object.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_object.Tpo -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_object.Tpo $(DEPDIR)/libzmq_la-io_object.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io_object.cpp' object='libzmq_la-io_object.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_object.lo `test -f 'io_object.cpp' || echo '$(srcdir)/'`io_object.cpp libzmq_la-io_thread.lo: io_thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-io_thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-io_thread.Tpo -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-io_thread.Tpo $(DEPDIR)/libzmq_la-io_thread.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='io_thread.cpp' object='libzmq_la-io_thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-io_thread.lo `test -f 'io_thread.cpp' || echo '$(srcdir)/'`io_thread.cpp libzmq_la-ip.lo: ip.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-ip.lo -MD -MP -MF $(DEPDIR)/libzmq_la-ip.Tpo -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-ip.Tpo $(DEPDIR)/libzmq_la-ip.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='ip.cpp' object='libzmq_la-ip.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-ip.lo `test -f 'ip.cpp' || echo '$(srcdir)/'`ip.cpp libzmq_la-kqueue.lo: kqueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-kqueue.lo -MD -MP -MF $(DEPDIR)/libzmq_la-kqueue.Tpo -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-kqueue.Tpo $(DEPDIR)/libzmq_la-kqueue.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='kqueue.cpp' object='libzmq_la-kqueue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-kqueue.lo `test -f 'kqueue.cpp' || echo '$(srcdir)/'`kqueue.cpp libzmq_la-lb.lo: lb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-lb.lo -MD -MP -MF $(DEPDIR)/libzmq_la-lb.Tpo -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-lb.Tpo $(DEPDIR)/libzmq_la-lb.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='lb.cpp' object='libzmq_la-lb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-lb.lo `test -f 'lb.cpp' || echo '$(srcdir)/'`lb.cpp libzmq_la-mailbox.lo: mailbox.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-mailbox.lo -MD -MP -MF $(DEPDIR)/libzmq_la-mailbox.Tpo -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-mailbox.Tpo $(DEPDIR)/libzmq_la-mailbox.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='mailbox.cpp' object='libzmq_la-mailbox.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-mailbox.lo `test -f 'mailbox.cpp' || echo '$(srcdir)/'`mailbox.cpp libzmq_la-named_session.lo: named_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-named_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-named_session.Tpo -c -o libzmq_la-named_session.lo `test -f 'named_session.cpp' || echo '$(srcdir)/'`named_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-named_session.Tpo $(DEPDIR)/libzmq_la-named_session.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='named_session.cpp' object='libzmq_la-named_session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-named_session.lo `test -f 'named_session.cpp' || echo '$(srcdir)/'`named_session.cpp libzmq_la-object.lo: object.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-object.lo -MD -MP -MF $(DEPDIR)/libzmq_la-object.Tpo -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-object.Tpo $(DEPDIR)/libzmq_la-object.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='object.cpp' object='libzmq_la-object.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-object.lo `test -f 'object.cpp' || echo '$(srcdir)/'`object.cpp libzmq_la-options.lo: options.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-options.lo -MD -MP -MF $(DEPDIR)/libzmq_la-options.Tpo -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-options.Tpo $(DEPDIR)/libzmq_la-options.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='options.cpp' object='libzmq_la-options.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-options.lo `test -f 'options.cpp' || echo '$(srcdir)/'`options.cpp libzmq_la-own.lo: own.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-own.lo -MD -MP -MF $(DEPDIR)/libzmq_la-own.Tpo -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-own.Tpo $(DEPDIR)/libzmq_la-own.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='own.cpp' object='libzmq_la-own.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-own.lo `test -f 'own.cpp' || echo '$(srcdir)/'`own.cpp libzmq_la-pair.lo: pair.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pair.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pair.Tpo -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pair.Tpo $(DEPDIR)/libzmq_la-pair.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pair.cpp' object='libzmq_la-pair.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pair.lo `test -f 'pair.cpp' || echo '$(srcdir)/'`pair.cpp libzmq_la-pgm_receiver.lo: pgm_receiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_receiver.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_receiver.Tpo -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_receiver.Tpo $(DEPDIR)/libzmq_la-pgm_receiver.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_receiver.cpp' object='libzmq_la-pgm_receiver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_receiver.lo `test -f 'pgm_receiver.cpp' || echo '$(srcdir)/'`pgm_receiver.cpp libzmq_la-pgm_sender.lo: pgm_sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_sender.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_sender.Tpo -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_sender.Tpo $(DEPDIR)/libzmq_la-pgm_sender.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_sender.cpp' object='libzmq_la-pgm_sender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_sender.lo `test -f 'pgm_sender.cpp' || echo '$(srcdir)/'`pgm_sender.cpp libzmq_la-pgm_socket.lo: pgm_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pgm_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pgm_socket.Tpo -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pgm_socket.Tpo $(DEPDIR)/libzmq_la-pgm_socket.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pgm_socket.cpp' object='libzmq_la-pgm_socket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pgm_socket.lo `test -f 'pgm_socket.cpp' || echo '$(srcdir)/'`pgm_socket.cpp libzmq_la-pipe.lo: pipe.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pipe.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pipe.Tpo -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pipe.Tpo $(DEPDIR)/libzmq_la-pipe.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pipe.cpp' object='libzmq_la-pipe.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pipe.lo `test -f 'pipe.cpp' || echo '$(srcdir)/'`pipe.cpp libzmq_la-poll.lo: poll.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poll.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poll.Tpo -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poll.Tpo $(DEPDIR)/libzmq_la-poll.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poll.cpp' object='libzmq_la-poll.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poll.lo `test -f 'poll.cpp' || echo '$(srcdir)/'`poll.cpp libzmq_la-poller_base.lo: poller_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-poller_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-poller_base.Tpo -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-poller_base.Tpo $(DEPDIR)/libzmq_la-poller_base.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poller_base.cpp' object='libzmq_la-poller_base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-poller_base.lo `test -f 'poller_base.cpp' || echo '$(srcdir)/'`poller_base.cpp libzmq_la-pull.lo: pull.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pull.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pull.Tpo -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pull.Tpo $(DEPDIR)/libzmq_la-pull.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pull.cpp' object='libzmq_la-pull.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pull.lo `test -f 'pull.cpp' || echo '$(srcdir)/'`pull.cpp libzmq_la-push.lo: push.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-push.lo -MD -MP -MF $(DEPDIR)/libzmq_la-push.Tpo -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-push.Tpo $(DEPDIR)/libzmq_la-push.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='push.cpp' object='libzmq_la-push.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-push.lo `test -f 'push.cpp' || echo '$(srcdir)/'`push.cpp libzmq_la-reaper.lo: reaper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-reaper.lo -MD -MP -MF $(DEPDIR)/libzmq_la-reaper.Tpo -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-reaper.Tpo $(DEPDIR)/libzmq_la-reaper.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='reaper.cpp' object='libzmq_la-reaper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-reaper.lo `test -f 'reaper.cpp' || echo '$(srcdir)/'`reaper.cpp libzmq_la-pub.lo: pub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-pub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-pub.Tpo -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-pub.Tpo $(DEPDIR)/libzmq_la-pub.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='pub.cpp' object='libzmq_la-pub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-pub.lo `test -f 'pub.cpp' || echo '$(srcdir)/'`pub.cpp libzmq_la-rep.lo: rep.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-rep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-rep.Tpo -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-rep.Tpo $(DEPDIR)/libzmq_la-rep.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rep.cpp' object='libzmq_la-rep.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-rep.lo `test -f 'rep.cpp' || echo '$(srcdir)/'`rep.cpp libzmq_la-req.lo: req.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-req.lo -MD -MP -MF $(DEPDIR)/libzmq_la-req.Tpo -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-req.Tpo $(DEPDIR)/libzmq_la-req.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='req.cpp' object='libzmq_la-req.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-req.lo `test -f 'req.cpp' || echo '$(srcdir)/'`req.cpp libzmq_la-select.lo: select.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-select.lo -MD -MP -MF $(DEPDIR)/libzmq_la-select.Tpo -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-select.Tpo $(DEPDIR)/libzmq_la-select.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='select.cpp' object='libzmq_la-select.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-select.lo `test -f 'select.cpp' || echo '$(srcdir)/'`select.cpp libzmq_la-session.lo: session.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-session.Tpo -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-session.Tpo $(DEPDIR)/libzmq_la-session.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='session.cpp' object='libzmq_la-session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-session.lo `test -f 'session.cpp' || echo '$(srcdir)/'`session.cpp libzmq_la-signaler.lo: signaler.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-signaler.lo -MD -MP -MF $(DEPDIR)/libzmq_la-signaler.Tpo -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-signaler.Tpo $(DEPDIR)/libzmq_la-signaler.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='signaler.cpp' object='libzmq_la-signaler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-signaler.lo `test -f 'signaler.cpp' || echo '$(srcdir)/'`signaler.cpp libzmq_la-socket_base.lo: socket_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-socket_base.lo -MD -MP -MF $(DEPDIR)/libzmq_la-socket_base.Tpo -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-socket_base.Tpo $(DEPDIR)/libzmq_la-socket_base.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='socket_base.cpp' object='libzmq_la-socket_base.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-socket_base.lo `test -f 'socket_base.cpp' || echo '$(srcdir)/'`socket_base.cpp libzmq_la-sub.lo: sub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-sub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-sub.Tpo -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-sub.Tpo $(DEPDIR)/libzmq_la-sub.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='sub.cpp' object='libzmq_la-sub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-sub.lo `test -f 'sub.cpp' || echo '$(srcdir)/'`sub.cpp libzmq_la-swap.lo: swap.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-swap.lo -MD -MP -MF $(DEPDIR)/libzmq_la-swap.Tpo -c -o libzmq_la-swap.lo `test -f 'swap.cpp' || echo '$(srcdir)/'`swap.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-swap.Tpo $(DEPDIR)/libzmq_la-swap.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='swap.cpp' object='libzmq_la-swap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-swap.lo `test -f 'swap.cpp' || echo '$(srcdir)/'`swap.cpp libzmq_la-tcp_connecter.lo: tcp_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_connecter.Tpo -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_connecter.Tpo $(DEPDIR)/libzmq_la-tcp_connecter.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_connecter.cpp' object='libzmq_la-tcp_connecter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_connecter.lo `test -f 'tcp_connecter.cpp' || echo '$(srcdir)/'`tcp_connecter.cpp libzmq_la-tcp_listener.lo: tcp_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_listener.Tpo -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_listener.Tpo $(DEPDIR)/libzmq_la-tcp_listener.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_listener.cpp' object='libzmq_la-tcp_listener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_listener.lo `test -f 'tcp_listener.cpp' || echo '$(srcdir)/'`tcp_listener.cpp libzmq_la-tcp_socket.lo: tcp_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-tcp_socket.lo -MD -MP -MF $(DEPDIR)/libzmq_la-tcp_socket.Tpo -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-tcp_socket.Tpo $(DEPDIR)/libzmq_la-tcp_socket.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='tcp_socket.cpp' object='libzmq_la-tcp_socket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-tcp_socket.lo `test -f 'tcp_socket.cpp' || echo '$(srcdir)/'`tcp_socket.cpp libzmq_la-thread.lo: thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-thread.lo -MD -MP -MF $(DEPDIR)/libzmq_la-thread.Tpo -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-thread.Tpo $(DEPDIR)/libzmq_la-thread.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='thread.cpp' object='libzmq_la-thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-thread.lo `test -f 'thread.cpp' || echo '$(srcdir)/'`thread.cpp libzmq_la-transient_session.lo: transient_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-transient_session.lo -MD -MP -MF $(DEPDIR)/libzmq_la-transient_session.Tpo -c -o libzmq_la-transient_session.lo `test -f 'transient_session.cpp' || echo '$(srcdir)/'`transient_session.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-transient_session.Tpo $(DEPDIR)/libzmq_la-transient_session.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='transient_session.cpp' object='libzmq_la-transient_session.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-transient_session.lo `test -f 'transient_session.cpp' || echo '$(srcdir)/'`transient_session.cpp libzmq_la-trie.lo: trie.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-trie.lo -MD -MP -MF $(DEPDIR)/libzmq_la-trie.Tpo -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-trie.Tpo $(DEPDIR)/libzmq_la-trie.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='trie.cpp' object='libzmq_la-trie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-trie.lo `test -f 'trie.cpp' || echo '$(srcdir)/'`trie.cpp libzmq_la-uuid.lo: uuid.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-uuid.lo -MD -MP -MF $(DEPDIR)/libzmq_la-uuid.Tpo -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-uuid.Tpo $(DEPDIR)/libzmq_la-uuid.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='uuid.cpp' object='libzmq_la-uuid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-uuid.lo `test -f 'uuid.cpp' || echo '$(srcdir)/'`uuid.cpp libzmq_la-xpub.lo: xpub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xpub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xpub.Tpo -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xpub.Tpo $(DEPDIR)/libzmq_la-xpub.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xpub.cpp' object='libzmq_la-xpub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xpub.lo `test -f 'xpub.cpp' || echo '$(srcdir)/'`xpub.cpp libzmq_la-xrep.lo: xrep.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xrep.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xrep.Tpo -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xrep.Tpo $(DEPDIR)/libzmq_la-xrep.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xrep.cpp' object='libzmq_la-xrep.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xrep.lo `test -f 'xrep.cpp' || echo '$(srcdir)/'`xrep.cpp libzmq_la-xreq.lo: xreq.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xreq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xreq.Tpo -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xreq.Tpo $(DEPDIR)/libzmq_la-xreq.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xreq.cpp' object='libzmq_la-xreq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xreq.lo `test -f 'xreq.cpp' || echo '$(srcdir)/'`xreq.cpp libzmq_la-xsub.lo: xsub.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-xsub.lo -MD -MP -MF $(DEPDIR)/libzmq_la-xsub.Tpo -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-xsub.Tpo $(DEPDIR)/libzmq_la-xsub.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='xsub.cpp' object='libzmq_la-xsub.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-xsub.lo `test -f 'xsub.cpp' || echo '$(srcdir)/'`xsub.cpp libzmq_la-zmq.lo: zmq.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq.Tpo -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq.Tpo $(DEPDIR)/libzmq_la-zmq.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq.cpp' object='libzmq_la-zmq.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq.lo `test -f 'zmq.cpp' || echo '$(srcdir)/'`zmq.cpp libzmq_la-zmq_connecter.lo: zmq_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_connecter.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_connecter.Tpo -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_connecter.Tpo $(DEPDIR)/libzmq_la-zmq_connecter.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_connecter.cpp' object='libzmq_la-zmq_connecter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_connecter.lo `test -f 'zmq_connecter.cpp' || echo '$(srcdir)/'`zmq_connecter.cpp libzmq_la-zmq_engine.lo: zmq_engine.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_engine.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_engine.Tpo -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_engine.Tpo $(DEPDIR)/libzmq_la-zmq_engine.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_engine.cpp' object='libzmq_la-zmq_engine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_engine.lo `test -f 'zmq_engine.cpp' || echo '$(srcdir)/'`zmq_engine.cpp libzmq_la-zmq_init.lo: zmq_init.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_init.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_init.Tpo -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_init.Tpo $(DEPDIR)/libzmq_la-zmq_init.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_init.cpp' object='libzmq_la-zmq_init.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_init.lo `test -f 'zmq_init.cpp' || echo '$(srcdir)/'`zmq_init.cpp libzmq_la-zmq_listener.lo: zmq_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -MT libzmq_la-zmq_listener.lo -MD -MP -MF $(DEPDIR)/libzmq_la-zmq_listener.Tpo -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libzmq_la-zmq_listener.Tpo $(DEPDIR)/libzmq_la-zmq_listener.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='zmq_listener.cpp' object='libzmq_la-zmq_listener.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libzmq_la_CPPFLAGS) $(CPPFLAGS) $(libzmq_la_CXXFLAGS) $(CXXFLAGS) -c -o libzmq_la-zmq_listener.lo `test -f 'zmq_listener.cpp' || echo '$(srcdir)/'`zmq_listener.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) platform.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) platform.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) platform.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) platform.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) platform.hpp installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-pkgconfigDATA .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags dist-hook distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-pkgconfigDATA dist-hook: -rm $(distdir)/platform.hpp # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/src/i_engine.hpp0000664000000000000000000000324211732125604015546 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_ENGINE_HPP_INCLUDED__ #define __ZMQ_I_ENGINE_HPP_INCLUDED__ namespace zmq { struct i_engine { virtual ~i_engine () {} // Plug the engine to the session. virtual void plug (class io_thread_t *io_thread_, struct i_inout *inout_) = 0; // Unplug the engine from the session. virtual void unplug () = 0; // Terminate and deallocate the engine. Note that 'detached' // events are not fired on termination. virtual void terminate () = 0; // This method is called by the session to signalise that more // messages can be written to the pipe. virtual void activate_in () = 0; // This method is called by the session to signalise that there // are messages to send available. virtual void activate_out () = 0; }; } #endif zeromq-2.2.0.orig/src/zmq_init.cpp0000664000000000000000000001511411732125604015617 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "zmq_init.hpp" #include "transient_session.hpp" #include "named_session.hpp" #include "socket_base.hpp" #include "zmq_engine.hpp" #include "io_thread.hpp" #include "session.hpp" #include "uuid.hpp" #include "blob.hpp" #include "err.hpp" zmq::zmq_init_t::zmq_init_t (io_thread_t *io_thread_, socket_base_t *socket_, session_t *session_, fd_t fd_, const options_t &options_) : own_t (io_thread_, options_), ephemeral_engine (NULL), sent (false), received (false), socket (socket_), session (session_), io_thread (io_thread_) { // Create the engine object for this connection. engine = new (std::nothrow) zmq_engine_t (fd_, options); alloc_assert (engine); } zmq::zmq_init_t::~zmq_init_t () { if (engine) engine->terminate (); } bool zmq::zmq_init_t::read (::zmq_msg_t *msg_) { // If the identity was already sent, do nothing. if (sent) return false; // Send the identity. int rc = zmq_msg_init_size (msg_, options.identity.size ()); zmq_assert (rc == 0); memcpy (zmq_msg_data (msg_), options.identity.c_str (), options.identity.size ()); sent = true; // Try finalize initialization. finalise_initialisation (); return true; } bool zmq::zmq_init_t::write (::zmq_msg_t *msg_) { // If identity was already received, we are not interested // in subsequent messages. if (received) return false; // Retreieve the remote identity. If it's empty, generate a unique name. if (!zmq_msg_size (msg_)) { unsigned char identity [uuid_t::uuid_blob_len + 1]; identity [0] = 0; memcpy (identity + 1, uuid_t ().to_blob (), uuid_t::uuid_blob_len); peer_identity.assign (identity, uuid_t::uuid_blob_len + 1); } else { peer_identity.assign ((const unsigned char*) zmq_msg_data (msg_), zmq_msg_size (msg_)); } int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); received = true; // Try finalize initialization. finalise_initialisation (); return true; } void zmq::zmq_init_t::flush () { // Check if there's anything to flush. if (!received) return; // Initialization is done, dispatch engine. if (ephemeral_engine) dispatch_engine (); } void zmq::zmq_init_t::detach () { // This function is called by engine when disconnection occurs. // If there is an associated session, send it a null engine to let it know // that connection process was unsuccesful. if (session) send_attach (session, NULL, blob_t (), true); // The engine will destroy itself, so let's just drop the pointer here and // start termination of the init object. engine = NULL; terminate (); } void zmq::zmq_init_t::process_plug () { zmq_assert (engine); engine->plug (io_thread, this); } void zmq::zmq_init_t::process_unplug () { if (engine) engine->unplug (); } void zmq::zmq_init_t::finalise_initialisation () { // Unplug and prepare to dispatch engine. if (sent && received) { ephemeral_engine = engine; engine = NULL; ephemeral_engine->unplug (); return; } } void zmq::zmq_init_t::dispatch_engine () { if (sent && received) { // Engine must be detached. zmq_assert (!engine); zmq_assert (ephemeral_engine); // If we know what session we belong to, it's easy, just send the // engine to that session and destroy the init object. Note that we // know about the session only if this object is owned by it. Thus, // lifetime of this object in contained in the lifetime of the session // so the pointer cannot become invalid without notice. if (session) { send_attach (session, ephemeral_engine, peer_identity, true); terminate (); return; } // All the cases below are listener-based. Therefore we need the socket // reference so that new sessions can bind to that socket. zmq_assert (socket); // We have no associated session. If the peer has no identity we'll // create a transient session for the connection. Note that // seqnum is incremented to account for attach command before the // session is launched. That way we are sure it won't terminate before // being attached. if (peer_identity [0] == 0) { session = new (std::nothrow) transient_session_t (io_thread, socket, options); alloc_assert (session); session->inc_seqnum (); launch_sibling (session); send_attach (session, ephemeral_engine, peer_identity, false); terminate (); return; } // Try to find the session corresponding to the peer's identity. // If found, send the engine to that session and destroy this object. // Note that session's seqnum is incremented by find_session rather // than by send_attach. session = socket->find_session (peer_identity); if (session) { send_attach (session, ephemeral_engine, peer_identity, false); terminate (); return; } // There's no such named session. We have to create one. Note that // seqnum is incremented to account for attach command before the // session is launched. That way we are sure it won't terminate before // being attached. session = new (std::nothrow) named_session_t (io_thread, socket, options, peer_identity); alloc_assert (session); session->inc_seqnum (); launch_sibling (session); send_attach (session, ephemeral_engine, peer_identity, false); terminate (); return; } } zeromq-2.2.0.orig/src/io_object.cpp0000664000000000000000000000456311732125604015730 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "io_object.hpp" #include "io_thread.hpp" #include "err.hpp" zmq::io_object_t::io_object_t (io_thread_t *io_thread_) : poller (NULL) { if (io_thread_) plug (io_thread_); } zmq::io_object_t::~io_object_t () { } void zmq::io_object_t::plug (io_thread_t *io_thread_) { zmq_assert (io_thread_); zmq_assert (!poller); // Retrieve the poller from the thread we are running in. poller = io_thread_->get_poller (); } void zmq::io_object_t::unplug () { zmq_assert (poller); // Forget about old poller in preparation to be migrated // to a different I/O thread. poller = NULL; } zmq::io_object_t::handle_t zmq::io_object_t::add_fd (fd_t fd_) { return poller->add_fd (fd_, this); } void zmq::io_object_t::rm_fd (handle_t handle_) { poller->rm_fd (handle_); } void zmq::io_object_t::set_pollin (handle_t handle_) { poller->set_pollin (handle_); } void zmq::io_object_t::reset_pollin (handle_t handle_) { poller->reset_pollin (handle_); } void zmq::io_object_t::set_pollout (handle_t handle_) { poller->set_pollout (handle_); } void zmq::io_object_t::reset_pollout (handle_t handle_) { poller->reset_pollout (handle_); } void zmq::io_object_t::add_timer (int timeout_, int id_) { poller->add_timer (timeout_, this, id_); } void zmq::io_object_t::cancel_timer (int id_) { poller->cancel_timer (this, id_); } void zmq::io_object_t::in_event () { zmq_assert (false); } void zmq::io_object_t::out_event () { zmq_assert (false); } void zmq::io_object_t::timer_event (int id_) { zmq_assert (false); } zeromq-2.2.0.orig/src/reaper.hpp0000664000000000000000000000407111732125604015250 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REAPER_HPP_INCLUDED__ #define __ZMQ_REAPER_HPP_INCLUDED__ #include "object.hpp" #include "mailbox.hpp" #include "poller.hpp" #include "i_poll_events.hpp" namespace zmq { class reaper_t : public object_t, public i_poll_events { public: reaper_t (class ctx_t *ctx_, uint32_t tid_); ~reaper_t (); mailbox_t *get_mailbox (); void start (); void stop (); // i_poll_events implementation. void in_event (); void out_event (); void timer_event (int id_); private: // Command handlers. void process_stop (); void process_reap (class socket_base_t *socket_); void process_reaped (); // Reaper thread accesses incoming commands via this mailbox. mailbox_t mailbox; // Handle associated with mailbox' file descriptor. poller_t::handle_t mailbox_handle; // I/O multiplexing is performed using a poller object. poller_t *poller; // Number of sockets being reaped at the moment. int sockets; // If true, we were already asked to terminate. bool terminating; reaper_t (const reaper_t&); const reaper_t &operator = (const reaper_t&); }; } #endif zeromq-2.2.0.orig/src/decoder.hpp0000664000000000000000000001532511732125604015403 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DECODER_HPP_INCLUDED__ #define __ZMQ_DECODER_HPP_INCLUDED__ #include #include #include #include #include "err.hpp" #include "../include/zmq.h" namespace zmq { // Helper base class for decoders that know the amount of data to read // in advance at any moment. Knowing the amount in advance is a property // of the protocol used. 0MQ framing protocol is based size-prefixed // paradigm, whixh qualifies it to be parsed by this class. // On the other hand, XML-based transports (like XMPP or SOAP) don't allow // for knowing the size of data to read in advance and should use different // decoding algorithms. // // This class implements the state machine that parses the incoming buffer. // Derived class should implement individual state machine actions. template class decoder_base_t { public: inline decoder_base_t (size_t bufsize_) : read_pos (NULL), to_read (0), next (NULL), bufsize (bufsize_) { buf = (unsigned char*) malloc (bufsize_); alloc_assert (buf); } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~decoder_base_t () { free (buf); } // Returns a buffer to be filled with binary data. inline void get_buffer (unsigned char **data_, size_t *size_) { // If we are expected to read large message, we'll opt for zero- // copy, i.e. we'll ask caller to fill the data directly to the // message. Note that subsequent read(s) are non-blocking, thus // each single read reads at most SO_RCVBUF bytes at once not // depending on how large is the chunk returned from here. // As a consequence, large messages being received won't block // other engines running in the same I/O thread for excessive // amounts of time. if (to_read >= bufsize) { *data_ = read_pos; *size_ = to_read; return; } *data_ = buf; *size_ = bufsize; } // Processes the data in the buffer previously allocated using // get_buffer function. size_ argument specifies nemuber of bytes // actually filled into the buffer. Function returns number of // bytes actually processed. inline size_t process_buffer (unsigned char *data_, size_t size_) { // Check if we had an error in previous attempt. if (unlikely (!(static_cast (this)->next))) return (size_t) -1; // In case of zero-copy simply adjust the pointers, no copying // is required. Also, run the state machine in case all the data // were processed. if (data_ == read_pos) { read_pos += size_; to_read -= size_; while (!to_read) { if (!(static_cast (this)->*next) ()) { if (unlikely (!(static_cast (this)->next))) return (size_t) -1; return size_; } } return size_; } size_t pos = 0; while (true) { // Try to get more space in the message to fill in. // If none is available, return. while (!to_read) { if (!(static_cast (this)->*next) ()) { if (unlikely (!(static_cast (this)->next))) return (size_t) -1; return pos; } } // If there are no more data in the buffer, return. if (pos == size_) return pos; // Copy the data from buffer to the message. size_t to_copy = std::min (to_read, size_ - pos); memcpy (read_pos, data_ + pos, to_copy); read_pos += to_copy; pos += to_copy; to_read -= to_copy; } } protected: // Prototype of state machine action. Action should return false if // it is unable to push the data to the system. typedef bool (T::*step_t) (); // This function should be called from derived class to read data // from the buffer and schedule next state machine action. inline void next_step (void *read_pos_, size_t to_read_, step_t next_) { read_pos = (unsigned char*) read_pos_; to_read = to_read_; next = next_; } // This function should be called from the derived class to // abort decoder state machine. inline void decoding_error () { next = NULL; } private: unsigned char *read_pos; size_t to_read; step_t next; size_t bufsize; unsigned char *buf; decoder_base_t (const decoder_base_t&); const decoder_base_t &operator = (const decoder_base_t&); }; // Decoder for 0MQ framing protocol. Converts data batches into messages. class decoder_t : public decoder_base_t { public: decoder_t (size_t bufsize_); ~decoder_t (); void set_inout (struct i_inout *destination_); private: bool one_byte_size_ready (); bool eight_byte_size_ready (); bool flags_ready (); bool message_ready (); struct i_inout *destination; unsigned char tmpbuf [8]; ::zmq_msg_t in_progress; decoder_t (const decoder_t&); void operator = (const decoder_t&); }; } #endif zeromq-2.2.0.orig/src/xrep.hpp0000664000000000000000000000631211732125604014750 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XREP_HPP_INCLUDED__ #define __ZMQ_XREP_HPP_INCLUDED__ #include #include #include "socket_base.hpp" #include "blob.hpp" #include "pipe.hpp" namespace zmq { // TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm. class xrep_t : public socket_base_t, public i_reader_events, public i_writer_events { public: xrep_t (class ctx_t *parent_, uint32_t tid_); ~xrep_t (); // Overloads of functions from socket_base_t. void xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); int rollback (); bool xhas_in (); bool xhas_out (); private: // Hook into the termination process. void process_term (int linger_); // i_reader_events interface implementation. void activated (reader_t *pipe_); void terminated (reader_t *pipe_); void delimited (reader_t *pipe_); // i_writer_events interface implementation. void activated (writer_t *pipe_); void terminated (writer_t *pipe_); struct inpipe_t { class reader_t *reader; blob_t identity; bool active; }; // Inbound pipes with the names of corresponging peers. typedef std::vector inpipes_t; inpipes_t inpipes; // The pipe we are currently reading from. inpipes_t::size_type current_in; // Have we prefetched a message. bool prefetched; // Holds the prefetched message. zmq_msg_t prefetched_msg; // If true, more incoming message parts are expected. bool more_in; struct outpipe_t { class writer_t *writer; bool active; }; // Outbound pipes indexed by the peer names. typedef std::map outpipes_t; outpipes_t outpipes; // The pipe we are currently writing to. class writer_t *current_out; // If true, more outgoing message parts are expected. bool more_out; // If true, termination process is already underway. bool terminating; xrep_t (const xrep_t&); const xrep_t &operator = (const xrep_t&); }; } #endif zeromq-2.2.0.orig/src/wire.hpp0000664000000000000000000000622011732125604014736 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_WIRE_HPP_INCLUDED__ #define __ZMQ_WIRE_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { // Helper functions to convert different integer types to/from network // byte order. inline void put_uint8 (unsigned char *buffer_, uint8_t value) { *buffer_ = value; } inline uint8_t get_uint8 (unsigned char *buffer_) { return *buffer_; } inline void put_uint16 (unsigned char *buffer_, uint16_t value) { buffer_ [0] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [1] = (unsigned char) (value & 0xff); } inline uint16_t get_uint16 (unsigned char *buffer_) { return (((uint16_t) buffer_ [0]) << 8) | ((uint16_t) buffer_ [1]); } inline void put_uint32 (unsigned char *buffer_, uint32_t value) { buffer_ [0] = (unsigned char) (((value) >> 24) & 0xff); buffer_ [1] = (unsigned char) (((value) >> 16) & 0xff); buffer_ [2] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [3] = (unsigned char) (value & 0xff); } inline uint32_t get_uint32 (unsigned char *buffer_) { return (((uint32_t) buffer_ [0]) << 24) | (((uint32_t) buffer_ [1]) << 16) | (((uint32_t) buffer_ [2]) << 8) | ((uint32_t) buffer_ [3]); } inline void put_uint64 (unsigned char *buffer_, uint64_t value) { buffer_ [0] = (unsigned char) (((value) >> 56) & 0xff); buffer_ [1] = (unsigned char) (((value) >> 48) & 0xff); buffer_ [2] = (unsigned char) (((value) >> 40) & 0xff); buffer_ [3] = (unsigned char) (((value) >> 32) & 0xff); buffer_ [4] = (unsigned char) (((value) >> 24) & 0xff); buffer_ [5] = (unsigned char) (((value) >> 16) & 0xff); buffer_ [6] = (unsigned char) (((value) >> 8) & 0xff); buffer_ [7] = (unsigned char) (value & 0xff); } inline uint64_t get_uint64 (unsigned char *buffer_) { return (((uint64_t) buffer_ [0]) << 56) | (((uint64_t) buffer_ [1]) << 48) | (((uint64_t) buffer_ [2]) << 40) | (((uint64_t) buffer_ [3]) << 32) | (((uint64_t) buffer_ [4]) << 24) | (((uint64_t) buffer_ [5]) << 16) | (((uint64_t) buffer_ [6]) << 8) | ((uint64_t) buffer_ [7]); } } #endif zeromq-2.2.0.orig/src/options.cpp0000664000000000000000000002322511737023311015457 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #ifndef ZMQ_HAVE_WINDOWS #include #endif #include "../include/zmq.h" #include "options.hpp" #include "err.hpp" zmq::options_t::options_t () : hwm (0), swap (0), affinity (0), rate (40 * 1000), recovery_ivl (10), recovery_ivl_msec (-1), use_multicast_loop (true), sndbuf (0), rcvbuf (0), type (-1), linger (-1), reconnect_ivl (100), reconnect_ivl_max (0), backlog (100), requires_in (false), requires_out (false), immediate_connect (true), rcvtimeo (-1), sndtimeo (-1) { } int zmq::options_t::setsockopt (int option_, const void *optval_, size_t optvallen_) { switch (option_) { case ZMQ_HWM: if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } hwm = *((uint64_t*) optval_); return 0; case ZMQ_SWAP: if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) { errno = EINVAL; return -1; } // Check that SWAP directory (.) is writable struct stat stat_buf; #if (ZMQ_HAVE_ANDROID || ZMQ_HAVE_LINUX) if (stat (".", &stat_buf) || ((stat_buf.st_mode & S_IWUSR) == 0)) { #else if (stat (".", &stat_buf) || ((stat_buf.st_mode & S_IWRITE) == 0)) { #endif errno = EACCES; return -1; } swap = *((int64_t*) optval_); return 0; case ZMQ_AFFINITY: if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } affinity = *((uint64_t*) optval_); return 0; case ZMQ_IDENTITY: // Empty identity is invalid as well as identity longer than // 255 bytes. Identity starting with binary zero is invalid // as these are used for auto-generated identities. if (optvallen_ < 1 || optvallen_ > 255 || *((const unsigned char*) optval_) == 0) { errno = EINVAL; return -1; } identity.assign ((const unsigned char*) optval_, optvallen_); return 0; case ZMQ_RATE: if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) { errno = EINVAL; return -1; } rate = (uint32_t) *((int64_t*) optval_); return 0; case ZMQ_RECOVERY_IVL: if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) { errno = EINVAL; return -1; } recovery_ivl = (uint32_t) *((int64_t*) optval_); return 0; case ZMQ_RECOVERY_IVL_MSEC: if (optvallen_ != sizeof (int64_t) || *((int64_t*) optval_) < 0) { errno = EINVAL; return -1; } recovery_ivl_msec = (int32_t) *((int64_t*) optval_); return 0; case ZMQ_MCAST_LOOP: if (optvallen_ != sizeof (int64_t)) { errno = EINVAL; return -1; } if ((int64_t) *((int64_t*) optval_) == 0) use_multicast_loop = false; else if ((int64_t) *((int64_t*) optval_) == 1) use_multicast_loop = true; else { errno = EINVAL; return -1; } return 0; case ZMQ_SNDBUF: if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } sndbuf = *((uint64_t*) optval_); return 0; case ZMQ_RCVBUF: if (optvallen_ != sizeof (uint64_t)) { errno = EINVAL; return -1; } rcvbuf = *((uint64_t*) optval_); return 0; case ZMQ_LINGER: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } linger = *((int*) optval_); return 0; case ZMQ_RECONNECT_IVL: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } if (*((int*) optval_) < 0) { errno = EINVAL; return -1; } reconnect_ivl = *((int*) optval_); return 0; case ZMQ_RECONNECT_IVL_MAX: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } if (*((int*) optval_) < 0) { errno = EINVAL; return -1; } reconnect_ivl_max = *((int*) optval_); return 0; case ZMQ_BACKLOG: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } backlog = *((int*) optval_); return 0; case ZMQ_RCVTIMEO: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } rcvtimeo = *((int*) optval_); return 0; case ZMQ_SNDTIMEO: if (optvallen_ != sizeof (int)) { errno = EINVAL; return -1; } sndtimeo = *((int*) optval_); return 0; } errno = EINVAL; return -1; } int zmq::options_t::getsockopt (int option_, void *optval_, size_t *optvallen_) { switch (option_) { case ZMQ_HWM: if (*optvallen_ < sizeof (uint64_t)) { errno = EINVAL; return -1; } *((uint64_t*) optval_) = hwm; *optvallen_ = sizeof (uint64_t); return 0; case ZMQ_SWAP: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = swap; *optvallen_ = sizeof (int64_t); return 0; case ZMQ_AFFINITY: if (*optvallen_ < sizeof (uint64_t)) { errno = EINVAL; return -1; } *((uint64_t*) optval_) = affinity; *optvallen_ = sizeof (uint64_t); return 0; case ZMQ_IDENTITY: if (*optvallen_ < identity.size ()) { errno = EINVAL; return -1; } memcpy (optval_, identity.data (), identity.size ()); *optvallen_ = identity.size (); return 0; case ZMQ_RATE: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = rate; *optvallen_ = sizeof (int64_t); return 0; case ZMQ_RECOVERY_IVL: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = recovery_ivl; *optvallen_ = sizeof (int64_t); return 0; case ZMQ_RECOVERY_IVL_MSEC: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = recovery_ivl_msec; *optvallen_ = sizeof (int64_t); return 0; case ZMQ_MCAST_LOOP: if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = use_multicast_loop ? 1 : 0; *optvallen_ = sizeof (int64_t); return 0; case ZMQ_SNDBUF: if (*optvallen_ < sizeof (uint64_t)) { errno = EINVAL; return -1; } *((uint64_t*) optval_) = sndbuf; *optvallen_ = sizeof (uint64_t); return 0; case ZMQ_RCVBUF: if (*optvallen_ < sizeof (uint64_t)) { errno = EINVAL; return -1; } *((uint64_t*) optval_) = rcvbuf; *optvallen_ = sizeof (uint64_t); return 0; case ZMQ_TYPE: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = type; *optvallen_ = sizeof (int); return 0; case ZMQ_LINGER: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = linger; *optvallen_ = sizeof (int); return 0; case ZMQ_RECONNECT_IVL: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = reconnect_ivl; *optvallen_ = sizeof (int); return 0; case ZMQ_RECONNECT_IVL_MAX: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = reconnect_ivl_max; *optvallen_ = sizeof (int); return 0; case ZMQ_BACKLOG: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = backlog; *optvallen_ = sizeof (int); return 0; case ZMQ_RCVTIMEO: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = rcvtimeo; *optvallen_ = sizeof (int); return 0; case ZMQ_SNDTIMEO: if (*optvallen_ < sizeof (int)) { errno = EINVAL; return -1; } *((int*) optval_) = sndtimeo; *optvallen_ = sizeof (int); return 0; } errno = EINVAL; return -1; } zeromq-2.2.0.orig/src/object.cpp0000664000000000000000000002565211732125604015243 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "object.hpp" #include "ctx.hpp" #include "err.hpp" #include "pipe.hpp" #include "io_thread.hpp" #include "session.hpp" #include "socket_base.hpp" zmq::object_t::object_t (ctx_t *ctx_, uint32_t tid_) : ctx (ctx_), tid (tid_) { } zmq::object_t::object_t (object_t *parent_) : ctx (parent_->ctx), tid (parent_->tid) { } zmq::object_t::~object_t () { } uint32_t zmq::object_t::get_tid () { return tid; } zmq::ctx_t *zmq::object_t::get_ctx () { return ctx; } void zmq::object_t::process_command (command_t &cmd_) { switch (cmd_.type) { case command_t::activate_reader: process_activate_reader (); break; case command_t::activate_writer: process_activate_writer (cmd_.args.activate_writer.msgs_read); break; case command_t::stop: process_stop (); break; case command_t::plug: process_plug (); process_seqnum (); return; case command_t::own: process_own (cmd_.args.own.object); process_seqnum (); break; case command_t::attach: process_attach (cmd_.args.attach.engine, cmd_.args.attach.peer_identity ? blob_t (cmd_.args.attach.peer_identity, cmd_.args.attach.peer_identity_size) : blob_t ()); process_seqnum (); break; case command_t::bind: process_bind (cmd_.args.bind.in_pipe, cmd_.args.bind.out_pipe, cmd_.args.bind.peer_identity ? blob_t (cmd_.args.bind.peer_identity, cmd_.args.bind.peer_identity_size) : blob_t ()); process_seqnum (); break; case command_t::pipe_term: process_pipe_term (); return; case command_t::pipe_term_ack: process_pipe_term_ack (); break; case command_t::term_req: process_term_req (cmd_.args.term_req.object); break; case command_t::term: process_term (cmd_.args.term.linger); break; case command_t::term_ack: process_term_ack (); break; case command_t::reap: process_reap (cmd_.args.reap.socket); break; case command_t::reaped: process_reaped (); break; default: zmq_assert (false); } // The assumption here is that each command is processed once only, // so deallocating it after processing is all right. deallocate_command (&cmd_); } int zmq::object_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) { return ctx->register_endpoint (addr_, endpoint_); } void zmq::object_t::unregister_endpoints (socket_base_t *socket_) { return ctx->unregister_endpoints (socket_); } zmq::endpoint_t zmq::object_t::find_endpoint (const char *addr_) { return ctx->find_endpoint (addr_); } void zmq::object_t::destroy_socket (socket_base_t *socket_) { ctx->destroy_socket (socket_); } void zmq::object_t::log (const char *format_, ...) { va_list args; va_start (args, format_); ctx->log (format_, args); va_end (args); } zmq::io_thread_t *zmq::object_t::choose_io_thread (uint64_t affinity_) { return ctx->choose_io_thread (affinity_); } void zmq::object_t::send_stop () { // 'stop' command goes always from administrative thread to // the current object. command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = this; cmd.type = command_t::stop; ctx->send_command (tid, cmd); } void zmq::object_t::send_plug (own_t *destination_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::plug; send_command (cmd); } void zmq::object_t::send_own (own_t *destination_, own_t *object_) { destination_->inc_seqnum (); command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::own; cmd.args.own.object = object_; send_command (cmd); } void zmq::object_t::send_attach (session_t *destination_, i_engine *engine_, const blob_t &peer_identity_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::attach; cmd.args.attach.engine = engine_; if (peer_identity_.empty ()) { cmd.args.attach.peer_identity_size = 0; cmd.args.attach.peer_identity = NULL; } else { zmq_assert (peer_identity_.size () <= 0xff); cmd.args.attach.peer_identity_size = (unsigned char) peer_identity_.size (); cmd.args.attach.peer_identity = (unsigned char*) malloc (peer_identity_.size ()); alloc_assert (cmd.args.attach.peer_identity_size); memcpy (cmd.args.attach.peer_identity, peer_identity_.data (), peer_identity_.size ()); } send_command (cmd); } void zmq::object_t::send_bind (own_t *destination_, reader_t *in_pipe_, writer_t *out_pipe_, const blob_t &peer_identity_, bool inc_seqnum_) { if (inc_seqnum_) destination_->inc_seqnum (); command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::bind; cmd.args.bind.in_pipe = in_pipe_; cmd.args.bind.out_pipe = out_pipe_; if (peer_identity_.empty ()) { cmd.args.bind.peer_identity_size = 0; cmd.args.bind.peer_identity = NULL; } else { zmq_assert (peer_identity_.size () <= 0xff); cmd.args.bind.peer_identity_size = (unsigned char) peer_identity_.size (); cmd.args.bind.peer_identity = (unsigned char*) malloc (peer_identity_.size ()); alloc_assert (cmd.args.bind.peer_identity_size); memcpy (cmd.args.bind.peer_identity, peer_identity_.data (), peer_identity_.size ()); } send_command (cmd); } void zmq::object_t::send_activate_reader (reader_t *destination_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::activate_reader; send_command (cmd); } void zmq::object_t::send_activate_writer (writer_t *destination_, uint64_t msgs_read_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::activate_writer; cmd.args.activate_writer.msgs_read = msgs_read_; send_command (cmd); } void zmq::object_t::send_pipe_term (writer_t *destination_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::pipe_term; send_command (cmd); } void zmq::object_t::send_pipe_term_ack (reader_t *destination_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::pipe_term_ack; send_command (cmd); } void zmq::object_t::send_term_req (own_t *destination_, own_t *object_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::term_req; cmd.args.term_req.object = object_; send_command (cmd); } void zmq::object_t::send_term (own_t *destination_, int linger_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::term; cmd.args.term.linger = linger_; send_command (cmd); } void zmq::object_t::send_term_ack (own_t *destination_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = destination_; cmd.type = command_t::term_ack; send_command (cmd); } void zmq::object_t::send_reap (class socket_base_t *socket_) { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = ctx->get_reaper (); cmd.type = command_t::reap; cmd.args.reap.socket = socket_; send_command (cmd); } void zmq::object_t::send_reaped () { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = ctx->get_reaper (); cmd.type = command_t::reaped; send_command (cmd); } void zmq::object_t::send_done () { command_t cmd; #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (&cmd, 0, sizeof (cmd)); #endif cmd.destination = NULL; cmd.type = command_t::done; ctx->send_command (ctx_t::term_tid, cmd); } void zmq::object_t::process_stop () { zmq_assert (false); } void zmq::object_t::process_plug () { zmq_assert (false); } void zmq::object_t::process_own (own_t *object_) { zmq_assert (false); } void zmq::object_t::process_attach (i_engine *engine_, const blob_t &peer_identity_) { zmq_assert (false); } void zmq::object_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_, const blob_t &peer_identity_) { zmq_assert (false); } void zmq::object_t::process_activate_reader () { zmq_assert (false); } void zmq::object_t::process_activate_writer (uint64_t msgs_read_) { zmq_assert (false); } void zmq::object_t::process_pipe_term () { zmq_assert (false); } void zmq::object_t::process_pipe_term_ack () { zmq_assert (false); } void zmq::object_t::process_term_req (own_t *object_) { zmq_assert (false); } void zmq::object_t::process_term (int linger_) { zmq_assert (false); } void zmq::object_t::process_term_ack () { zmq_assert (false); } void zmq::object_t::process_reap (class socket_base_t *socket_) { zmq_assert (false); } void zmq::object_t::process_reaped () { zmq_assert (false); } void zmq::object_t::process_seqnum () { zmq_assert (false); } void zmq::object_t::send_command (command_t &cmd_) { ctx->send_command (cmd_.destination->get_tid (), cmd_); } zeromq-2.2.0.orig/src/session.cpp0000664000000000000000000002205211732125604015447 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "session.hpp" #include "socket_base.hpp" #include "i_engine.hpp" #include "err.hpp" #include "pipe.hpp" #include "likely.hpp" zmq::session_t::session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_) : own_t (io_thread_, options_), io_object_t (io_thread_), in_pipe (NULL), incomplete_in (false), out_pipe (NULL), engine (NULL), socket (socket_), io_thread (io_thread_), pipes_attached (false), delimiter_processed (false), force_terminate (false), has_linger_timer (false), state (active) { } zmq::session_t::~session_t () { zmq_assert (!in_pipe); zmq_assert (!out_pipe); if (engine) engine->terminate (); } void zmq::session_t::proceed_with_term () { if (state == terminating) return; zmq_assert (state == pending); state = terminating; // If there's still a pending linger timer, remove it. if (has_linger_timer) { cancel_timer (linger_timer_id); has_linger_timer = false; } if (in_pipe) { register_term_acks (1); in_pipe->terminate (); } if (out_pipe) { register_term_acks (1); out_pipe->terminate (); } // The session has already waited for the linger period. We don't want // the child objects to linger any more thus linger is set to zero. own_t::process_term (0); } bool zmq::session_t::read (::zmq_msg_t *msg_) { if (!in_pipe) return false; if (!in_pipe->read (msg_)) return false; incomplete_in = msg_->flags & ZMQ_MSG_MORE; return true; } bool zmq::session_t::write (::zmq_msg_t *msg_) { if (out_pipe && out_pipe->write (msg_)) { zmq_msg_init (msg_); return true; } return false; } void zmq::session_t::flush () { if (out_pipe) out_pipe->flush (); } void zmq::session_t::clean_pipes () { // Get rid of half-processed messages in the out pipe. Flush any // unflushed messages upstream. if (out_pipe) { out_pipe->rollback (); out_pipe->flush (); } // Remove any half-read message from the in pipe. if (in_pipe) { while (incomplete_in) { zmq_msg_t msg; zmq_msg_init (&msg); if (!read (&msg)) { zmq_assert (!incomplete_in); break; } zmq_msg_close (&msg); } } } void zmq::session_t::attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (!pipes_attached); pipes_attached = true; if (inpipe_) { zmq_assert (!in_pipe); in_pipe = inpipe_; in_pipe->set_event_sink (this); } if (outpipe_) { zmq_assert (!out_pipe); out_pipe = outpipe_; out_pipe->set_event_sink (this); } // If we are already terminating, terminate the pipes straight away. if (state == terminating) { if (in_pipe) { in_pipe->terminate (); register_term_acks (1); } if (out_pipe) { out_pipe->terminate (); register_term_acks (1); } } } void zmq::session_t::delimited (reader_t *pipe_) { zmq_assert (in_pipe == pipe_); zmq_assert (!delimiter_processed); delimiter_processed = true; // If we are in process of being closed, but still waiting for all // pending messeges being sent, we can terminate here. if (state == pending) proceed_with_term (); } void zmq::session_t::terminated (reader_t *pipe_) { zmq_assert (in_pipe == pipe_); in_pipe = NULL; if (state == terminating) unregister_term_ack (); } void zmq::session_t::terminated (writer_t *pipe_) { zmq_assert (out_pipe == pipe_); out_pipe = NULL; if (state == terminating) unregister_term_ack (); } void zmq::session_t::activated (reader_t *pipe_) { zmq_assert (in_pipe == pipe_); if (likely (engine != NULL)) engine->activate_out (); else in_pipe->check_read (); } void zmq::session_t::activated (writer_t *pipe_) { zmq_assert (out_pipe == pipe_); if (engine) engine->activate_in (); } void zmq::session_t::process_plug () { } void zmq::session_t::process_attach (i_engine *engine_, const blob_t &peer_identity_) { // If some other object (e.g. init) notifies us that the connection failed // we need to start the reconnection process. if (!engine_) { zmq_assert (!engine); detached (); return; } // If we are already terminating, we destroy the engine straight away. // Note that we don't have to unplug it before deleting as it's not // yet plugged to the session. if (state == terminating) { delete engine_; return; } // If the session already has an engine attached, destroy new one. // Note new engine is not plugged in yet, we don't have to unplug it. if (engine) { log ("DPID: duplicate peer identity - disconnecting peer"); delete engine_; return; } // Check whether the required pipes already exist. If not so, we'll // create them and bind them to the socket object. if (!pipes_attached) { zmq_assert (!in_pipe && !out_pipe); pipes_attached = true; reader_t *socket_reader = NULL; writer_t *socket_writer = NULL; // Create the pipes, as required. if (options.requires_in) { create_pipe (socket, this, options.hwm, options.swap, &socket_reader, &out_pipe); out_pipe->set_event_sink (this); } if (options.requires_out) { create_pipe (this, socket, options.hwm, options.swap, &in_pipe, &socket_writer); in_pipe->set_event_sink (this); } // Bind the pipes to the socket object. if (socket_reader || socket_writer) send_bind (socket, socket_reader, socket_writer, peer_identity_); } // Plug in the engine. engine = engine_; engine->plug (io_thread, this); // Trigger the notfication about the attachment. attached (peer_identity_); } void zmq::session_t::detach () { // Engine is dead. Let's forget about it. engine = NULL; // Remove any half-done messages from the pipes. clean_pipes (); // Send the event to the derived class. detached (); // Just in case, there's only a delimiter in the inbound pipe. if (in_pipe) in_pipe->check_read (); } void zmq::session_t::process_term (int linger_) { zmq_assert (state == active); state = pending; // If linger is set to zero, we can terminate the session straight away // not waiting for the pending messages to be sent. if (linger_ == 0) { proceed_with_term (); return; } // If there's finite linger value, set up a timer. if (linger_ > 0) { zmq_assert (!has_linger_timer); add_timer (linger_, linger_timer_id); has_linger_timer = true; } // If there's no engine and there's only delimiter in the pipe it wouldn't // be ever read. Thus we check for it explicitly. if (in_pipe) in_pipe->check_read (); // If there's no in pipe there are no pending messages to send. // We can proceed with the shutdown straight away. Also, if there is // inbound pipe, but the delimiter was already processed, we can // terminate immediately. Alternatively, if the derived session type have // called 'terminate' we'll finish straight away. if (!options.requires_out || delimiter_processed || force_terminate || (!options.immediate_connect && !in_pipe)) proceed_with_term (); } void zmq::session_t::timer_event (int id_) { // Linger period expired. We can proceed with termination even though // there are still pending messages to be sent. zmq_assert (id_ == linger_timer_id); has_linger_timer = false; proceed_with_term (); } bool zmq::session_t::register_session (const blob_t &name_, session_t *session_) { return socket->register_session (name_, session_); } void zmq::session_t::unregister_session (const blob_t &name_) { socket->unregister_session (name_); } void zmq::session_t::terminate () { force_terminate = true; own_t::terminate (); } zeromq-2.2.0.orig/src/poller_base.hpp0000664000000000000000000000474211732125604016266 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLLER_BASE_HPP_INCLUDED__ #define __ZMQ_POLLER_BASE_HPP_INCLUDED__ #include #include "clock.hpp" #include "atomic_counter.hpp" namespace zmq { class poller_base_t { public: poller_base_t (); virtual ~poller_base_t (); // Returns load of the poller. Note that this function can be // invoked from a different thread! int get_load (); // Add a timeout to expire in timeout_ milliseconds. After the // expiration timer_event on sink_ object will be called with // argument set to id_. void add_timer (int timeout_, struct i_poll_events *sink_, int id_); // Cancel the timer created by sink_ object with ID equal to id_. void cancel_timer (struct i_poll_events *sink_, int id_); protected: // Called by individual poller implementations to manage the load. void adjust_load (int amount_); // Executes any timers that are due. Returns number of milliseconds // to wait to match the next timer or 0 meaning "no timers". uint64_t execute_timers (); private: // Clock instance private to this I/O thread. clock_t clock; // List of active timers. struct timer_info_t { struct i_poll_events *sink; int id; }; typedef std::multimap timers_t; timers_t timers; // Load of the poller. Currently the number of file descriptors // registered. atomic_counter_t load; poller_base_t (const poller_base_t&); const poller_base_t &operator = (const poller_base_t&); }; } #endif zeromq-2.2.0.orig/src/pgm_socket.hpp0000664000000000000000000000664511732125604016136 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __PGM_SOCKET_HPP_INCLUDED__ #define __PGM_SOCKET_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #define __PGM_WININT_H__ #include #ifdef ZMQ_HAVE_OSX #include #endif #include "fd.hpp" #include "options.hpp" namespace zmq { // Encapsulates PGM socket. class pgm_socket_t { public: // If receiver_ is true PGM transport is not generating SPM packets. pgm_socket_t (bool receiver_, const options_t &options_); // Closes the transport. ~pgm_socket_t (); // Initialize PGM network structures (GSI, GSRs). int init (bool udp_encapsulation_, const char *network_); // Get receiver fds and store them into user allocated memory. void get_receiver_fds (fd_t *receive_fd_, fd_t *waiting_pipe_fd_); // Get sender and receiver fds and store it to user allocated // memory. Receive fd is used to process NAKs from peers. void get_sender_fds (fd_t *send_fd_, fd_t *receive_fd_, fd_t *rdata_notify_fd_, fd_t *pending_notify_fd_); // Send data as one APDU, transmit window owned memory. size_t send (unsigned char *data_, size_t data_len_); // Returns max tsdu size without fragmentation. size_t get_max_tsdu_size (); // Receive data from pgm socket. ssize_t receive (void **data_, const pgm_tsi_t **tsi_); long get_rx_timeout (); long get_tx_timeout (); // POLLIN on sender side should mean NAK or SPMR receiving. // process_upstream function is used to handle such a situation. void process_upstream (); private: // Compute size of the buffer based on rate and recovery interval. int compute_sqns (int tpdu_); // OpenPGM transport. pgm_sock_t* sock; int last_rx_status, last_tx_status; // Associated socket options. options_t options; // true when pgm_socket should create receiving side. bool receiver; // Array of pgm_msgv_t structures to store received data // from the socket (pgm_transport_recvmsgv). pgm_msgv_t *pgm_msgv; // Size of pgm_msgv array. size_t pgm_msgv_len; // How many bytes were read from pgm socket. size_t nbytes_rec; // How many bytes were processed from last pgm socket read. size_t nbytes_processed; // How many messages from pgm_msgv were already sent up. size_t pgm_msgv_processed; }; } #endif #endif zeromq-2.2.0.orig/src/own.hpp0000664000000000000000000001151711732125604014600 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OWN_HPP_INCLUDED__ #define __ZMQ_OWN_HPP_INCLUDED__ #include #include #include "object.hpp" #include "options.hpp" #include "atomic_counter.hpp" #include "stdint.hpp" namespace zmq { // Base class for objects forming a part of ownership hierarchy. // It handles initialisation and destruction of such objects. class own_t : public object_t { public: // Note that the owner is unspecified in the constructor. // It'll be supplied later on when the object is plugged in. // The object is not living within an I/O thread. It has it's own // thread outside of 0MQ infrastructure. own_t (class ctx_t *parent_, uint32_t tid_); // The object is living within I/O thread. own_t (class io_thread_t *io_thread_, const options_t &options_); // When another owned object wants to send command to this object // it calls this function to let it know it should not shut down // before the command is delivered. void inc_seqnum (); // Use following two functions to wait for arbitrary events before // terminating. Just add number of events to wait for using // register_tem_acks functions. When event occurs, call // remove_term_ack. When number of pending acks reaches zero // object will be deallocated. void register_term_acks (int count_); void unregister_term_ack (); protected: // Launch the supplied object and become its owner. void launch_child (own_t *object_); // Launch the supplied object and make it your sibling (make your // owner become its owner as well). void launch_sibling (own_t *object_); // Ask owner object to terminate this object. It may take a while // while actual termination is started. This function should not be // called more than once. void terminate (); // Derived object destroys own_t. There's no point in allowing // others to invoke the destructor. At the same time, it has to be // virtual so that generic own_t deallocation mechanism destroys // specific type of the owned object correctly. virtual ~own_t (); // Term handler is protocted rather than private so that it can // be intercepted by the derived class. This is useful to add custom // steps to the beginning of the termination process. void process_term (int linger_); // A place to hook in when phyicallal destruction of the object // is to be delayed. virtual void process_destroy (); // Socket options associated with this object. options_t options; private: // Set owner of the object void set_owner (own_t *owner_); // Handlers for incoming commands. void process_own (own_t *object_); void process_term_req (own_t *object_); void process_term_ack (); void process_seqnum (); // Check whether all the peding term acks were delivered. // If so, deallocate this object. void check_term_acks (); // True if termination was already initiated. If so, we can destroy // the object if there are no more child objects or pending term acks. bool terminating; // Sequence number of the last command sent to this object. atomic_counter_t sent_seqnum; // Sequence number of the last command processed by this object. uint64_t processed_seqnum; // Socket owning this object. It's responsible for shutting down // this object. own_t *owner; // List of all objects owned by this socket. We are responsible // for deallocating them before we quit. typedef std::set owned_t; owned_t owned; // Number of events we have to get before we can destroy the object. int term_acks; own_t (const own_t&); const own_t &operator = (const own_t&); }; } #endif zeromq-2.2.0.orig/src/pub.cpp0000664000000000000000000000172511732125604014556 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "pub.hpp" zmq::pub_t::pub_t (class ctx_t *parent_, uint32_t tid_) : xpub_t (parent_, tid_) { options.type = ZMQ_PUB; } zmq::pub_t::~pub_t () { } zeromq-2.2.0.orig/src/xpub.hpp0000664000000000000000000000334411732125604014752 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XPUB_HPP_INCLUDED__ #define __ZMQ_XPUB_HPP_INCLUDED__ #include "socket_base.hpp" #include "array.hpp" #include "pipe.hpp" #include "dist.hpp" namespace zmq { class xpub_t : public socket_base_t { public: xpub_t (class ctx_t *parent_, uint32_t tid_); ~xpub_t (); // Implementations of virtual functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int flags_); bool xhas_out (); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); private: // Hook into the termination process. void process_term (int linger_); // Distributor of messages holding the list of outbound pipes. dist_t dist; xpub_t (const xpub_t&); const xpub_t &operator = (const xpub_t&); }; } #endif zeromq-2.2.0.orig/src/pub.hpp0000664000000000000000000000220411732125604014554 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PUB_HPP_INCLUDED__ #define __ZMQ_PUB_HPP_INCLUDED__ #include "xpub.hpp" namespace zmq { class pub_t : public xpub_t { public: pub_t (class ctx_t *parent_, uint32_t tid_); ~pub_t (); private: pub_t (const pub_t&); const pub_t &operator = (const pub_t&); }; } #endif zeromq-2.2.0.orig/src/tcp_socket.cpp0000664000000000000000000001373411732125604016131 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "tcp_socket.hpp" #include "platform.hpp" #include "err.hpp" #ifdef ZMQ_HAVE_WINDOWS zmq::tcp_socket_t::tcp_socket_t () : s (retired_fd) { } zmq::tcp_socket_t::~tcp_socket_t () { if (s != retired_fd) close (); } int zmq::tcp_socket_t::open (fd_t fd_, uint64_t sndbuf_, uint64_t rcvbuf_) { zmq_assert (s == retired_fd); s = fd_; if (sndbuf_) { int sz = (int) sndbuf_; int rc = setsockopt (s, SOL_SOCKET, SO_SNDBUF, (char*) &sz, sizeof (int)); errno_assert (rc == 0); } if (rcvbuf_) { int sz = (int) rcvbuf_; int rc = setsockopt (s, SOL_SOCKET, SO_RCVBUF, (char*) &sz, sizeof (int)); errno_assert (rc == 0); } return 0; } int zmq::tcp_socket_t::close () { zmq_assert (s != retired_fd); int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); s = retired_fd; return 0; } zmq::fd_t zmq::tcp_socket_t::get_fd () { return s; } int zmq::tcp_socket_t::write (const void *data, int size) { int nbytes = send (s, (char*) data, size, 0); // If not a single byte can be written to the socket in non-blocking mode // we'll get an error (this may happen during the speculative write). if (nbytes == SOCKET_ERROR && WSAGetLastError () == WSAEWOULDBLOCK) return 0; // Signalise peer failure. if (nbytes == -1 && ( WSAGetLastError () == WSAENETDOWN || WSAGetLastError () == WSAENETRESET || WSAGetLastError () == WSAEHOSTUNREACH || WSAGetLastError () == WSAECONNABORTED || WSAGetLastError () == WSAETIMEDOUT || WSAGetLastError () == WSAECONNRESET)) return -1; wsa_assert (nbytes != SOCKET_ERROR); return (size_t) nbytes; } int zmq::tcp_socket_t::read (void *data, int size) { int nbytes = recv (s, (char*) data, size, 0); // If not a single byte can be read from the socket in non-blocking mode // we'll get an error (this may happen during the speculative read). if (nbytes == SOCKET_ERROR && WSAGetLastError () == WSAEWOULDBLOCK) return 0; // Connection failure. if (nbytes == -1 && ( WSAGetLastError () == WSAENETDOWN || WSAGetLastError () == WSAENETRESET || WSAGetLastError () == WSAECONNABORTED || WSAGetLastError () == WSAETIMEDOUT || WSAGetLastError () == WSAECONNRESET || WSAGetLastError () == WSAECONNREFUSED || WSAGetLastError () == WSAENOTCONN)) return -1; wsa_assert (nbytes != SOCKET_ERROR); // Orderly shutdown by the other peer. if (nbytes == 0) return -1; return (size_t) nbytes; } #else #include #include #include #include #include #include #include zmq::tcp_socket_t::tcp_socket_t () : s (retired_fd) { } zmq::tcp_socket_t::~tcp_socket_t () { if (s != retired_fd) close (); } int zmq::tcp_socket_t::open (fd_t fd_, uint64_t sndbuf_, uint64_t rcvbuf_) { assert (s == retired_fd); s = fd_; if (sndbuf_) { int sz = (int) sndbuf_; int rc = setsockopt (s, SOL_SOCKET, SO_SNDBUF, &sz, sizeof (int)); errno_assert (rc == 0); } if (rcvbuf_) { int sz = (int) rcvbuf_; int rc = setsockopt (s, SOL_SOCKET, SO_RCVBUF, &sz, sizeof (int)); errno_assert (rc == 0); } #if defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_FREEBSD int set = 1; int rc = setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &set, sizeof (int)); errno_assert (rc == 0); #endif return 0; } int zmq::tcp_socket_t::close () { zmq_assert (s != retired_fd); int rc = ::close (s); if (rc != 0) return -1; s = retired_fd; return 0; } zmq::fd_t zmq::tcp_socket_t::get_fd () { return s; } int zmq::tcp_socket_t::write (const void *data, int size) { ssize_t nbytes = send (s, data, size, 0); // Several errors are OK. When speculative write is being done we may not // be able to write a single byte to the socket. Also, SIGSTOP issued // by a debugging tool can result in EINTR error. if (nbytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) return 0; // Signalise peer failure. if (nbytes == -1 && (errno == ECONNRESET || errno == EPIPE)) return -1; errno_assert (nbytes != -1); return (size_t) nbytes; } int zmq::tcp_socket_t::read (void *data, int size) { ssize_t nbytes = recv (s, data, size, 0); // Several errors are OK. When speculative read is being done we may not // be able to read a single byte to the socket. Also, SIGSTOP issued // by a debugging tool can result in EINTR error. if (nbytes == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR)) return 0; // Signal peer failure. if (nbytes == -1 && (errno == ECONNRESET || errno == ECONNREFUSED || errno == ETIMEDOUT || errno == EHOSTUNREACH || errno == ENOTCONN)) return -1; errno_assert (nbytes != -1); // Orderly shutdown by the other peer. if (nbytes == 0) return -1; return (size_t) nbytes; } #endif zeromq-2.2.0.orig/src/req.hpp0000664000000000000000000000323511732125604014562 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REQ_HPP_INCLUDED__ #define __ZMQ_REQ_HPP_INCLUDED__ #include "xreq.hpp" namespace zmq { class req_t : public xreq_t { public: req_t (class ctx_t *parent_, uint32_t tid_); ~req_t (); // Overloads of functions from socket_base_t. int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); bool xhas_out (); private: // If true, request was already sent and reply wasn't received yet or // was raceived partially. bool receiving_reply; // If true, we are starting to send/recv a message. The first part // of the message must be empty message part (backtrace stack bottom). bool message_begins; req_t (const req_t&); const req_t &operator = (const req_t&); }; } #endif zeromq-2.2.0.orig/src/zmq_engine.hpp0000664000000000000000000000423311732125604016126 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ZMQ_ENGINE_HPP_INCLUDED__ #define __ZMQ_ZMQ_ENGINE_HPP_INCLUDED__ #include #include #include "i_engine.hpp" #include "io_object.hpp" #include "tcp_socket.hpp" #include "encoder.hpp" #include "decoder.hpp" #include "options.hpp" namespace zmq { class zmq_engine_t : public io_object_t, public i_engine { public: zmq_engine_t (fd_t fd_, const options_t &options_); ~zmq_engine_t (); // i_engine interface implementation. void plug (class io_thread_t *io_thread_, struct i_inout *inout_); void unplug (); void terminate (); void activate_in (); void activate_out (); // i_poll_events interface implementation. void in_event (); void out_event (); private: // Function to handle network disconnections. void error (); tcp_socket_t tcp_socket; handle_t handle; unsigned char *inpos; size_t insize; decoder_t decoder; unsigned char *outpos; size_t outsize; encoder_t encoder; i_inout *inout; // Detached transient inout handler. i_inout *ephemeral_inout; options_t options; bool plugged; zmq_engine_t (const zmq_engine_t&); const zmq_engine_t &operator = (const zmq_engine_t&); }; } #endif zeromq-2.2.0.orig/src/config.hpp0000664000000000000000000000736611732125604015251 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CONFIG_HPP_INCLUDED__ #define __ZMQ_CONFIG_HPP_INCLUDED__ namespace zmq { // Compile-time settings. enum { // Maximum number of sockets that can be opened at the same time. max_sockets = 512, // Number of new messages in message pipe needed to trigger new memory // allocation. Setting this parameter to 256 decreases the impact of // memory allocation by approximately 99.6% message_pipe_granularity = 256, // Commands in pipe per allocation event. command_pipe_granularity = 16, // Size in bytes of the largest message that is still copied around // rather than being reference-counted. max_vsm_size = 29, // Determines how often does socket poll for new commands when it // still has unprocessed messages to handle. Thus, if it is set to 100, // socket will process 100 inbound messages before doing the poll. // If there are no unprocessed messages available, poll is done // immediately. Decreasing the value trades overall latency for more // real-time behaviour (less latency peaks). inbound_poll_rate = 100, // Maximal batching size for engines with receiving functionality. // So, if there are 10 messages that fit into the batch size, all of // them may be read by a single 'recv' system call, thus avoiding // unnecessary network stack traversals. in_batch_size = 8192, // Maximal batching size for engines with sending functionality. // So, if there are 10 messages that fit into the batch size, all of // them may be written by a single 'send' system call, thus avoiding // unnecessary network stack traversals. out_batch_size = 8192, // Maximal delta between high and low watermark. max_wm_delta = 1024, // Swap inteligently batches data for writing to disk. The size of // the batch in bytes is specified by this option. swap_block_size = 8192, // Maximum number of events the I/O thread can process in one go. max_io_events = 256, // Maximal delay to process command in API thread (in CPU ticks). // 3,000,000 ticks equals to 1 - 2 milliseconds on current CPUs. // Note that delay is only applied when there is continuous stream of // messages to process. If not so, commands are processed immediately. max_command_delay = 3000000, // Low-precision clock precision in CPU ticks. 1ms. Value of 1000000 // should be OK for CPU frequencies above 1GHz. If should work // reasonably well for CPU frequencies above 500MHz. For lower CPU // frequencies you may consider lowering this value to get best // possible latencies. clock_precision = 1000000, // Maximum transport data unit size for PGM (TPDU). pgm_max_tpdu = 1500 }; } #endif zeromq-2.2.0.orig/src/swap.cpp0000664000000000000000000002051611732125604014741 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #include #else #include #endif #include "../include/zmq.h" #include #include #include #include #include #include #include "swap.hpp" #include "config.hpp" #include "atomic_counter.hpp" #include "err.hpp" zmq::swap_t::swap_t (int64_t filesize_) : fd (-1), filesize (filesize_), file_pos (0), write_pos (0), read_pos (0), block_size (swap_block_size), write_buf_start_addr (0) { zmq_assert (filesize > 0); zmq_assert (block_size > 0); buf1 = new (std::nothrow) char [block_size]; alloc_assert (buf1); buf2 = new (std::nothrow) char [block_size]; alloc_assert (buf2); read_buf = write_buf = buf1; } zmq::swap_t::~swap_t () { delete [] buf1; delete [] buf2; if (fd == -1) return; #ifdef ZMQ_HAVE_WINDOWS int rc = _close (fd); #else int rc = close (fd); #endif errno_assert (rc == 0); #ifdef ZMQ_HAVE_WINDOWS rc = _unlink (filename.c_str ()); #else rc = unlink (filename.c_str ()); #endif errno_assert (rc == 0); } int zmq::swap_t::init () { static zmq::atomic_counter_t seqnum (0); // Get process ID. #ifdef ZMQ_HAVE_WINDOWS int pid = GetCurrentThreadId (); #else pid_t pid = getpid (); #endif std::ostringstream outs; outs << "zmq_" << pid << '_' << seqnum.get () << ".swap"; filename = outs.str (); seqnum.add (1); // Open the backing file. #ifdef ZMQ_HAVE_WINDOWS fd = _open (filename.c_str (), _O_RDWR | _O_CREAT, 0600); #else fd = open (filename.c_str (), O_RDWR | O_CREAT, 0600); #endif if (fd == -1) return -1; #if (defined (ZMQ_HAVE_LINUX) && !defined (ZMQ_HAVE_ANDROID)) // Enable more aggresive read-ahead optimization. posix_fadvise (fd, 0, filesize, POSIX_FADV_SEQUENTIAL); #endif return 0; } bool zmq::swap_t::store (zmq_msg_t *msg_) { size_t msg_size = zmq_msg_size (msg_); // Check buffer space availability. // NOTE: We always keep one byte open. if (buffer_space () <= (int64_t) (sizeof msg_size + 1 + msg_size)) return false; // Don't store the ZMQ_MSG_SHARED flag. uint8_t msg_flags = msg_->flags & ~ZMQ_MSG_SHARED; // Write message length, flags, and message body. copy_to_file (&msg_size, sizeof msg_size); copy_to_file (&msg_flags, sizeof msg_flags); copy_to_file (zmq_msg_data (msg_), msg_size); return true; } void zmq::swap_t::fetch (zmq_msg_t *msg_) { // There must be at least one message available. zmq_assert (read_pos != write_pos); // Retrieve the message size. size_t msg_size; copy_from_file (&msg_size, sizeof msg_size); // Initialize the message. zmq_msg_init_size (msg_, msg_size); // Retrieve the message flags. copy_from_file (&msg_->flags, sizeof msg_->flags); // Retrieve the message payload. copy_from_file (zmq_msg_data (msg_), msg_size); } void zmq::swap_t::commit () { commit_pos = write_pos; } void zmq::swap_t::rollback () { if (commit_pos == write_pos || read_pos == write_pos) return; if (write_pos > read_pos) zmq_assert (read_pos <= commit_pos && commit_pos <= write_pos); else zmq_assert (read_pos <= commit_pos || commit_pos <= write_pos); if (commit_pos / block_size == read_pos / block_size) { write_buf_start_addr = commit_pos % block_size; write_buf = read_buf; } else if (commit_pos / block_size != write_pos / block_size) { write_buf_start_addr = commit_pos % block_size; fill_buf (write_buf, write_buf_start_addr); } write_pos = commit_pos; } bool zmq::swap_t::empty () { return read_pos == write_pos; } /* bool zmq::swap_t::full () { // Check that at least the message size can be written to the swap. return buffer_space () < (int64_t) (sizeof (size_t) + 1); } */ bool zmq::swap_t::fits (zmq_msg_t *msg_) { // Check whether whole binary representation of the message // fits into the swap. size_t msg_size = zmq_msg_size (msg_); if (buffer_space () <= (int64_t) (sizeof msg_size + 1 + msg_size)) return false; return true; } void zmq::swap_t::copy_from_file (void *buffer_, size_t count_) { char *dest_ptr = (char *) buffer_; size_t chunk_size, remainder = count_; while (remainder > 0) { chunk_size = std::min (remainder, std::min ((size_t) (filesize - read_pos), (size_t) (block_size - read_pos % block_size))); memcpy (dest_ptr, &read_buf [read_pos % block_size], chunk_size); dest_ptr += chunk_size; read_pos = (read_pos + chunk_size) % filesize; if (read_pos % block_size == 0) { if (read_pos / block_size == write_pos / block_size) read_buf = write_buf; else fill_buf (read_buf, read_pos); } remainder -= chunk_size; } } void zmq::swap_t::copy_to_file (const void *buffer_, size_t count_) { char *source_ptr = (char *) buffer_; size_t chunk_size, remainder = count_; while (remainder > 0) { chunk_size = std::min (remainder, std::min ((size_t) (filesize - write_pos), (size_t) (block_size - write_pos % block_size))); memcpy (&write_buf [write_pos % block_size], source_ptr, chunk_size); source_ptr += chunk_size; write_pos = (write_pos + chunk_size) % filesize; if (write_pos % block_size == 0) { save_write_buf (); write_buf_start_addr = write_pos; if (write_buf == read_buf) { if (read_buf == buf2) write_buf = buf1; else write_buf = buf2; } } remainder -= chunk_size; } } void zmq::swap_t::fill_buf (char *buf, int64_t pos) { if (file_pos != pos) { #ifdef ZMQ_HAVE_WINDOWS __int64 offset = _lseeki64 (fd, pos, SEEK_SET); #else off_t offset = lseek (fd, (off_t) pos, SEEK_SET); #endif errno_assert (offset == pos); file_pos = pos; } size_t octets_stored = 0; size_t octets_total = std::min (block_size, (size_t) (filesize - file_pos)); while (octets_stored < octets_total) { #ifdef ZMQ_HAVE_WINDOWS int rc = _read (fd, &buf [octets_stored], octets_total - octets_stored); #else ssize_t rc = read (fd, &buf [octets_stored], octets_total - octets_stored); #endif errno_assert (rc > 0); octets_stored += rc; } file_pos += octets_total; } void zmq::swap_t::save_write_buf () { if (file_pos != write_buf_start_addr) { #ifdef ZMQ_HAVE_WINDOWS __int64 offset = _lseeki64 (fd, write_buf_start_addr, SEEK_SET); #else off_t offset = lseek (fd, (off_t) write_buf_start_addr, SEEK_SET); #endif errno_assert (offset == write_buf_start_addr); file_pos = write_buf_start_addr; } size_t octets_stored = 0; size_t octets_total = std::min (block_size, (size_t) (filesize - file_pos)); while (octets_stored < octets_total) { #ifdef ZMQ_HAVE_WINDOWS int rc = _write (fd, &write_buf [octets_stored], octets_total - octets_stored); #else ssize_t rc = write (fd, &write_buf [octets_stored], octets_total - octets_stored); #endif errno_assert (rc > 0); octets_stored += rc; } file_pos += octets_total; } int64_t zmq::swap_t::buffer_space () { if (write_pos < read_pos) return read_pos - write_pos; return filesize - (write_pos - read_pos); } zeromq-2.2.0.orig/src/array.hpp0000664000000000000000000000707011732125604015112 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ARRAY_INCLUDED__ #define __ZMQ_ARRAY_INCLUDED__ #include #include namespace zmq { // Base class for objects stored in the array. Note that each object can // be stored in at most one array. class array_item_t { public: inline array_item_t () : array_index (-1) { } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~array_item_t () { } inline void set_array_index (int index_) { array_index = index_; } inline int get_array_index () { return array_index; } private: int array_index; array_item_t (const array_item_t&); const array_item_t &operator = (const array_item_t&); }; // Fast array implementation with O(1) access to item, insertion and // removal. Array stores pointers rather than objects. The objects have // to be derived from array_item_t class. template class array_t { public: typedef typename std::vector ::size_type size_type; inline array_t () { } inline ~array_t () { } inline size_type size () { return items.size (); } inline bool empty () { return items.empty (); } inline T *&operator [] (size_type index_) { return items [index_]; } inline void push_back (T *item_) { if (item_) item_->set_array_index (items.size ()); items.push_back (item_); } inline void erase (T *item_) { erase (item_->get_array_index ()); } inline void erase (size_type index_) { if (items.back ()) items.back ()->set_array_index (index_); items [index_] = items.back (); items.pop_back (); } inline void swap (size_type index1_, size_type index2_) { if (items [index1_]) items [index1_]->set_array_index (index2_); if (items [index2_]) items [index2_]->set_array_index (index1_); std::swap (items [index1_], items [index2_]); } inline void clear () { items.clear (); } inline size_type index (T *item_) { return (size_type) item_->get_array_index (); } private: typedef std::vector items_t; items_t items; array_t (const array_t&); const array_t &operator = (const array_t&); }; } #endif zeromq-2.2.0.orig/src/libzmq.pc.in0000664000000000000000000000030011732125604015477 0ustar rootrootprefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libzmq Description: 0MQ c++ library Version: @VERSION@ Libs: -L${libdir} -lzmq Cflags: -I${includedir} zeromq-2.2.0.orig/src/dist.cpp0000664000000000000000000001232411732125604014730 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "dist.hpp" #include "pipe.hpp" #include "err.hpp" #include "own.hpp" #include "msg_content.hpp" #include "likely.hpp" zmq::dist_t::dist_t (own_t *sink_) : active (0), eligible (0), more (false), sink (sink_), terminating (false) { } zmq::dist_t::~dist_t () { zmq_assert (pipes.empty ()); } void zmq::dist_t::attach (writer_t *pipe_) { pipe_->set_event_sink (this); // If we are in the middle of sending a message, we'll add new pipe // into the list of eligible pipes. Otherwise we add it to the list // of active pipes. if (more) { pipes.push_back (pipe_); pipes.swap (eligible, pipes.size () - 1); eligible++; } else { pipes.push_back (pipe_); pipes.swap (active, pipes.size () - 1); active++; eligible++; } if (unlikely (terminating)) { sink->register_term_acks (1); pipe_->terminate (); } } void zmq::dist_t::terminate () { zmq_assert (!terminating); terminating = true; sink->register_term_acks (pipes.size ()); for (pipes_t::size_type i = 0; i != pipes.size (); i++) pipes [i]->terminate (); } void zmq::dist_t::terminated (writer_t *pipe_) { // Remove the pipe from the list; adjust number of active and/or // eligible pipes accordingly. if (pipes.index (pipe_) < active) active--; if (pipes.index (pipe_) < eligible) eligible--; pipes.erase (pipe_); if (unlikely (terminating)) sink->unregister_term_ack (); } void zmq::dist_t::activated (writer_t *pipe_) { // Move the pipe from passive to eligible state. pipes.swap (pipes.index (pipe_), eligible); eligible++; // If there's no message being sent at the moment, move it to // the active state. if (!more) { pipes.swap (eligible - 1, active); active++; } } int zmq::dist_t::send (zmq_msg_t *msg_, int flags_) { // Is this end of a multipart message? bool msg_more = msg_->flags & ZMQ_MSG_MORE; // Push the message to active pipes. distribute (msg_, flags_); // If multipart message is fully sent, activate all the eligible pipes. if (!msg_more) active = eligible; more = msg_more; return 0; } void zmq::dist_t::distribute (zmq_msg_t *msg_, int flags_) { // If there are no active pipes available, simply drop the message. if (active == 0) { int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return; } msg_content_t *content = (msg_content_t*) msg_->content; // For VSMs the copying is straighforward. if (content == (msg_content_t*) ZMQ_VSM) { for (pipes_t::size_type i = 0; i < active;) if (write (pipes [i], msg_)) i++; int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return; } // Optimisation for the case when there's only a single pipe // to send the message to - no refcount adjustment i.e. no atomic // operations are needed. if (active == 1) { if (!write (pipes [0], msg_)) { int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); } int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return; } // There are at least 2 destinations for the message. That means we have // to deal with reference counting. First add N-1 references to // the content (we are holding one reference anyway, that's why -1). if (msg_->flags & ZMQ_MSG_SHARED) content->refcnt.add (active - 1); else { content->refcnt.set (active); msg_->flags |= ZMQ_MSG_SHARED; } // Push the message to all destinations. for (pipes_t::size_type i = 0; i < active;) { if (!write (pipes [i], msg_)) content->refcnt.sub (1); else i++; } // Detach the original message from the data buffer. int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); } bool zmq::dist_t::has_out () { return true; } bool zmq::dist_t::write (class writer_t *pipe_, zmq_msg_t *msg_) { if (!pipe_->write (msg_)) { pipes.swap (pipes.index (pipe_), active - 1); active--; pipes.swap (active, eligible - 1); eligible--; return false; } if (!(msg_->flags & ZMQ_MSG_MORE)) pipe_->flush (); return true; } zeromq-2.2.0.orig/src/pair.cpp0000664000000000000000000000760311732125604014724 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "pair.hpp" #include "err.hpp" #include "pipe.hpp" zmq::pair_t::pair_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), inpipe (NULL), outpipe (NULL), inpipe_alive (false), outpipe_alive (false), terminating (false) { options.type = ZMQ_PAIR; options.requires_in = true; options.requires_out = true; } zmq::pair_t::~pair_t () { zmq_assert (!inpipe); zmq_assert (!outpipe); } void zmq::pair_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (!inpipe && !outpipe); inpipe = inpipe_; inpipe_alive = true; inpipe->set_event_sink (this); outpipe = outpipe_; outpipe_alive = true; outpipe->set_event_sink (this); if (terminating) { register_term_acks (2); inpipe_->terminate (); outpipe_->terminate (); } } void zmq::pair_t::terminated (reader_t *pipe_) { zmq_assert (pipe_ == inpipe); inpipe = NULL; inpipe_alive = false; if (terminating) unregister_term_ack (); } void zmq::pair_t::terminated (writer_t *pipe_) { zmq_assert (pipe_ == outpipe); outpipe = NULL; outpipe_alive = false; if (terminating) unregister_term_ack (); } void zmq::pair_t::delimited (reader_t *pipe_) { } void zmq::pair_t::process_term (int linger_) { terminating = true; if (inpipe) { register_term_acks (1); inpipe->terminate (); } if (outpipe) { register_term_acks (1); outpipe->terminate (); } socket_base_t::process_term (linger_); } void zmq::pair_t::activated (class reader_t *pipe_) { zmq_assert (!inpipe_alive); inpipe_alive = true; } void zmq::pair_t::activated (class writer_t *pipe_) { zmq_assert (!outpipe_alive); outpipe_alive = true; } int zmq::pair_t::xsend (zmq_msg_t *msg_, int flags_) { if (outpipe == NULL || !outpipe_alive) { errno = EAGAIN; return -1; } if (!outpipe->write (msg_)) { outpipe_alive = false; errno = EAGAIN; return -1; } if (!(flags_ & ZMQ_SNDMORE)) outpipe->flush (); // Detach the original message from the data buffer. int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } int zmq::pair_t::xrecv (zmq_msg_t *msg_, int flags_) { // Deallocate old content of the message. zmq_msg_close (msg_); if (!inpipe_alive || !inpipe || !inpipe->read (msg_)) { // No message is available. inpipe_alive = false; // Initialise the output parameter to be a 0-byte message. zmq_msg_init (msg_); errno = EAGAIN; return -1; } return 0; } bool zmq::pair_t::xhas_in () { if (!inpipe || !inpipe_alive) return false; inpipe_alive = inpipe->check_read (); return inpipe_alive; } bool zmq::pair_t::xhas_out () { if (!outpipe || !outpipe_alive) return false; zmq_msg_t msg; zmq_msg_init (&msg); outpipe_alive = outpipe->check_write (&msg); zmq_msg_close (&msg); return outpipe_alive; } zeromq-2.2.0.orig/src/socket_base.hpp0000664000000000000000000001623511732125604016261 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SOCKET_BASE_HPP_INCLUDED__ #define __ZMQ_SOCKET_BASE_HPP_INCLUDED__ #include #include #include "../include/zmq.h" #include "own.hpp" #include "array.hpp" #include "mutex.hpp" #include "stdint.hpp" #include "poller.hpp" #include "atomic_counter.hpp" #include "i_poll_events.hpp" #include "mailbox.hpp" #include "stdint.hpp" #include "blob.hpp" #include "own.hpp" namespace zmq { class socket_base_t : public own_t, public array_item_t, public i_poll_events { friend class reaper_t; public: // Returns false if object is not a socket. bool check_tag (); // Create a socket of a specified type. static socket_base_t *create (int type_, class ctx_t *parent_, uint32_t tid_); // Returns the mailbox associated with this socket. mailbox_t *get_mailbox (); // Interrupt blocking call if the socket is stuck in one. // This function can be called from a different thread! void stop (); // Interface for communication with the API layer. int setsockopt (int option_, const void *optval_, size_t optvallen_); int getsockopt (int option_, void *optval_, size_t *optvallen_); int bind (const char *addr_); int connect (const char *addr_); int send (zmq_msg_t *msg_, int flags_); int recv (zmq_msg_t *msg_, int flags_); int close (); // These functions are used by the polling mechanism to determine // which events are to be reported from this socket. bool has_in (); bool has_out (); // Registry of named sessions. bool register_session (const blob_t &name_, class session_t *session_); void unregister_session (const blob_t &name_); class session_t *find_session (const blob_t &name_); // i_reader_events interface implementation. void activated (class reader_t *pipe_); void terminated (class reader_t *pipe_); // i_writer_events interface implementation. void activated (class writer_t *pipe_); void terminated (class writer_t *pipe_); // Using this function reaper thread ask the socket to regiter with // its poller. void start_reaping (poller_t *poller_); // i_poll_events implementation. This interface is used when socket // is handled by the poller in the reaper thread. void in_event (); void out_event (); void timer_event (int id_); // To be called after processing commands or invoking any command // handlers explicitly. If required, it will deallocate the socket. void check_destroy (); protected: socket_base_t (class ctx_t *parent_, uint32_t tid_); virtual ~socket_base_t (); // Concrete algorithms for the x- methods are to be defined by // individual socket types. virtual void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) = 0; // The default implementation assumes there are no specific socket // options for the particular socket type. If not so, overload this // method. virtual int xsetsockopt (int option_, const void *optval_, size_t optvallen_); // The default implementation assumes that send is not supported. virtual bool xhas_out (); virtual int xsend (zmq_msg_t *msg_, int options_); // The default implementation assumes that recv in not supported. virtual bool xhas_in (); virtual int xrecv (zmq_msg_t *msg_, int options_); // We are declaring termination handler as protected so that // individual socket types can hook into the termination process // by overloading it. void process_term (int linger_); // Delay actual destruction of the socket. void process_destroy (); private: // Used to check whether the object is a socket. uint32_t tag; // If true, associated context was already terminated. bool ctx_terminated; // If true, object should have been already destroyed. However, // destruction is delayed while we unwind the stack to the point // where it doesn't intersect the object being destroyed. bool destroyed; // Parse URI string. int parse_uri (const char *uri_, std::string &protocol_, std::string &address_); // Check whether transport protocol, as specified in connect or // bind, is available and compatible with the socket type. int check_protocol (const std::string &protocol_); // If no identity set generate one and call xattach_pipes (). void attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); // Processes commands sent to this socket (if any). If timeout is -1, // returns only after at least one command was processed. // If throttle argument is true, commands are processed at most once // in a predefined time period. int process_commands (int timeout_, bool throttle_); // Handlers for incoming commands. void process_stop (); void process_bind (class reader_t *in_pipe_, class writer_t *out_pipe_, const blob_t &peer_identity_); void process_unplug (); // Socket's mailbox object. mailbox_t mailbox; // Reaper's poller and handle of this socket within it. poller_t *poller; poller_t::handle_t handle; // Timestamp of when commands were processed the last time. uint64_t last_tsc; // Number of messages received since last command processing. int ticks; // If true there's a half-read message in the socket. bool rcvmore; // Lists of existing sessions. This list is never referenced from // within the socket, instead it is used by objects owned by // the socket. As those objects can live in different threads, // the access is synchronised by mutex. typedef std::map sessions_t; sessions_t sessions; mutex_t sessions_sync; socket_base_t (const socket_base_t&); const socket_base_t &operator = (const socket_base_t&); }; } #endif zeromq-2.2.0.orig/src/zmq_listener.cpp0000664000000000000000000000442111732125604016500 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "zmq_listener.hpp" #include "zmq_init.hpp" #include "io_thread.hpp" #include "err.hpp" zmq::zmq_listener_t::zmq_listener_t (io_thread_t *io_thread_, socket_base_t *socket_, const options_t &options_) : own_t (io_thread_, options_), io_object_t (io_thread_), socket (socket_) { } zmq::zmq_listener_t::~zmq_listener_t () { } int zmq::zmq_listener_t::set_address (const char *protocol_, const char *addr_) { return tcp_listener.set_address (protocol_, addr_, options.backlog); } void zmq::zmq_listener_t::process_plug () { // Start polling for incoming connections. handle = add_fd (tcp_listener.get_fd ()); set_pollin (handle); } void zmq::zmq_listener_t::process_term (int linger_) { rm_fd (handle); own_t::process_term (linger_); } void zmq::zmq_listener_t::in_event () { fd_t fd = tcp_listener.accept (); // If connection was reset by the peer in the meantime, just ignore it. // TODO: Handle specific errors like ENFILE/EMFILE etc. if (fd == retired_fd) return; // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create and launch an init object. zmq_init_t *init = new (std::nothrow) zmq_init_t (io_thread, socket, NULL, fd, options); alloc_assert (init); launch_child (init); } zeromq-2.2.0.orig/src/zmq_engine.cpp0000664000000000000000000001277511732125604016133 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include "zmq_engine.hpp" #include "zmq_connecter.hpp" #include "io_thread.hpp" #include "i_inout.hpp" #include "config.hpp" #include "err.hpp" zmq::zmq_engine_t::zmq_engine_t (fd_t fd_, const options_t &options_) : inpos (NULL), insize (0), decoder (in_batch_size), outpos (NULL), outsize (0), encoder (out_batch_size), inout (NULL), ephemeral_inout (NULL), options (options_), plugged (false) { // Initialise the underlying socket. int rc = tcp_socket.open (fd_, options.sndbuf, options.rcvbuf); zmq_assert (rc == 0); } zmq::zmq_engine_t::~zmq_engine_t () { zmq_assert (!plugged); } void zmq::zmq_engine_t::plug (io_thread_t *io_thread_, i_inout *inout_) { zmq_assert (!plugged); plugged = true; ephemeral_inout = NULL; // Connect to session/init object. zmq_assert (!inout); zmq_assert (inout_); encoder.set_inout (inout_); decoder.set_inout (inout_); inout = inout_; // Connect to I/O threads poller object. io_object_t::plug (io_thread_); handle = add_fd (tcp_socket.get_fd ()); set_pollin (handle); set_pollout (handle); // Flush all the data that may have been already received downstream. in_event (); } void zmq::zmq_engine_t::unplug () { zmq_assert (plugged); plugged = false; // Cancel all fd subscriptions. rm_fd (handle); // Disconnect from I/O threads poller object. io_object_t::unplug (); // Disconnect from init/session object. encoder.set_inout (NULL); decoder.set_inout (NULL); ephemeral_inout = inout; inout = NULL; } void zmq::zmq_engine_t::terminate () { unplug (); delete this; } void zmq::zmq_engine_t::in_event () { bool disconnection = false; // If there's no data to process in the buffer... if (!insize) { // Retrieve the buffer and read as much data as possible. decoder.get_buffer (&inpos, &insize); insize = tcp_socket.read (inpos, insize); // Check whether the peer has closed the connection. if (insize == (size_t) -1) { insize = 0; disconnection = true; } } // Push the data to the decoder. size_t processed = decoder.process_buffer (inpos, insize); if (unlikely (processed == (size_t) -1)) { disconnection = true; } else { // Stop polling for input if we got stuck. if (processed < insize) { // This may happen if queue limits are in effect or when // init object reads all required information from the socket // and rejects to read more data. if (plugged) reset_pollin (handle); } // Adjust the buffer. inpos += processed; insize -= processed; } // Flush all messages the decoder may have produced. // If IO handler has unplugged engine, flush transient IO handler. if (unlikely (!plugged)) { zmq_assert (ephemeral_inout); ephemeral_inout->flush (); } else { inout->flush (); } if (inout && disconnection) error (); } void zmq::zmq_engine_t::out_event () { // If write buffer is empty, try to read new data from the encoder. if (!outsize) { outpos = NULL; encoder.get_data (&outpos, &outsize); // If IO handler has unplugged engine, flush transient IO handler. if (unlikely (!plugged)) { zmq_assert (ephemeral_inout); ephemeral_inout->flush (); return; } // If there is no data to send, stop polling for output. if (outsize == 0) { reset_pollout (handle); return; } } // If there are any data to write in write buffer, write as much as // possible to the socket. int nbytes = tcp_socket.write (outpos, outsize); // Handle problems with the connection. if (nbytes == -1) { error (); return; } outpos += nbytes; outsize -= nbytes; } void zmq::zmq_engine_t::activate_out () { set_pollout (handle); // Speculative write: The assumption is that at the moment new message // was sent by the user the socket is probably available for writing. // Thus we try to write the data to socket avoiding polling for POLLOUT. // Consequently, the latency should be better in request/reply scenarios. out_event (); } void zmq::zmq_engine_t::activate_in () { set_pollin (handle); // Speculative read. in_event (); } void zmq::zmq_engine_t::error () { zmq_assert (inout); inout->detach (); unplug (); delete this; } zeromq-2.2.0.orig/src/command.hpp0000664000000000000000000001040611732125604015407 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_COMMAND_HPP_INCLUDED__ #define __ZMQ_COMMAND_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { // This structure defines the commands that can be sent between threads. struct command_t { // Object to process the command. class object_t *destination; enum type_t { stop, plug, own, attach, bind, activate_reader, activate_writer, pipe_term, pipe_term_ack, term_req, term, term_ack, reap, reaped, done } type; union { // Sent to I/O thread to let it know that it should // terminate itself. struct { } stop; // Sent to I/O object to make it register with its I/O thread. struct { } plug; // Sent to socket to let it know about the newly created object. struct { class own_t *object; } own; // Attach the engine to the session. If engine is NULL, it informs // session that the connection have failed. struct { struct i_engine *engine; size_t peer_identity_size; unsigned char *peer_identity; } attach; // Sent from session to socket to establish pipe(s) between them. // Caller have used inc_seqnum beforehand sending the command. struct { class reader_t *in_pipe; class writer_t *out_pipe; size_t peer_identity_size; unsigned char *peer_identity; } bind; // Sent by pipe writer to inform dormant pipe reader that there // are messages in the pipe. struct { } activate_reader; // Sent by pipe reader to inform pipe writer about how many // messages it has read so far. struct { uint64_t msgs_read; } activate_writer; // Sent by pipe reader to pipe writer to ask it to terminate // its end of the pipe. struct { } pipe_term; // Pipe writer acknowledges pipe_term command. struct { } pipe_term_ack; // Sent by I/O object ot the socket to request the shutdown of // the I/O object. struct { class own_t *object; } term_req; // Sent by socket to I/O object to start its shutdown. struct { int linger; } term; // Sent by I/O object to the socket to acknowledge it has // shut down. struct { } term_ack; // Transfers the ownership of the closed socket // to the reaper thread. struct { class socket_base_t *socket; } reap; // Closed socket notifies the reaper that it's already deallocated. struct { } reaped; // Sent by reaper thread to the term thread when all the sockets // are successfully deallocated. struct { } done; } args; }; // Function to deallocate dynamically allocated components of the command. void deallocate_command (command_t *cmd_); } #endif zeromq-2.2.0.orig/src/rep.hpp0000664000000000000000000000320511732125604014556 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_REP_HPP_INCLUDED__ #define __ZMQ_REP_HPP_INCLUDED__ #include "xrep.hpp" namespace zmq { class rep_t : public xrep_t { public: rep_t (class ctx_t *parent_, uint32_t tid_); ~rep_t (); // Overloads of functions from socket_base_t. int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); bool xhas_out (); private: // If true, we are in process of sending the reply. If false we are // in process of receiving a request. bool sending_reply; // If true, we are starting to receive a request. The beginning // of the request is the backtrace stack. bool request_begins; rep_t (const rep_t&); const rep_t &operator = (const rep_t&); }; } #endif zeromq-2.2.0.orig/src/pipe.cpp0000664000000000000000000002572711732125604014735 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "../include/zmq.h" #include "pipe.hpp" #include "likely.hpp" zmq::reader_t::reader_t (object_t *parent_, pipe_t *pipe_, uint64_t lwm_) : object_t (parent_), active (true), pipe (pipe_), writer (NULL), lwm (lwm_), msgs_read (0), sink (NULL), terminating (false) { // Note that writer is not set here. Writer will inform reader about its // address once it is created (via set_writer method). } void zmq::reader_t::set_writer (writer_t *writer_) { zmq_assert (!writer); writer = writer_; } zmq::reader_t::~reader_t () { // Pipe as such is owned and deallocated by reader object. // The point is that reader processes the last step of terminal // handshaking (term_ack). zmq_assert (pipe); // First delete all the unread messages in the pipe. We have to do it by // hand because zmq_msg_t is a POD, not a class, so there's no associated // destructor. zmq_msg_t msg; while (pipe->read (&msg)) zmq_msg_close (&msg); delete pipe; } void zmq::reader_t::set_event_sink (i_reader_events *sink_) { zmq_assert (!sink); sink = sink_; } bool zmq::reader_t::is_delimiter (zmq_msg_t &msg_) { unsigned char *offset = 0; return msg_.content == (void*) (offset + ZMQ_DELIMITER); } bool zmq::reader_t::check_read () { if (!active) return false; // Check if there's an item in the pipe. if (!pipe->check_read ()) { active = false; return false; } // If the next item in the pipe is message delimiter, // initiate its termination. if (pipe->probe (is_delimiter)) { zmq_msg_t msg; bool ok = pipe->read (&msg); zmq_assert (ok); if (sink) sink->delimited (this); terminate (); return false; } return true; } bool zmq::reader_t::read (zmq_msg_t *msg_) { if (!active) return false; if (!pipe->read (msg_)) { active = false; return false; } // If delimiter was read, start termination process of the pipe. unsigned char *offset = 0; if (msg_->content == (void*) (offset + ZMQ_DELIMITER)) { if (sink) sink->delimited (this); terminate (); return false; } if (!(msg_->flags & ZMQ_MSG_MORE)) msgs_read++; if (lwm > 0 && msgs_read % lwm == 0) send_activate_writer (writer, msgs_read); return true; } void zmq::reader_t::terminate () { // If termination was already started by the peer, do nothing. if (terminating) return; active = false; terminating = true; send_pipe_term (writer); } void zmq::reader_t::process_activate_reader () { // Forward the event to the sink (either socket or session). active = true; sink->activated (this); } void zmq::reader_t::process_pipe_term_ack () { // At this point writer may already be deallocated. // For safety's sake drop the reference to it. writer = NULL; // Notify owner about the termination. zmq_assert (sink); sink->terminated (this); // Deallocate resources. delete this; } zmq::writer_t::writer_t (object_t *parent_, pipe_t *pipe_, reader_t *reader_, uint64_t hwm_, int64_t swap_size_) : object_t (parent_), active (true), pipe (pipe_), reader (reader_), hwm (hwm_), msgs_read (0), msgs_written (0), swap (NULL), sink (NULL), swapping (false), pending_delimiter (false), terminating (false) { // Inform reader about the writer. reader->set_writer (this); // Open the swap file, if required. if (swap_size_ > 0) { swap = new (std::nothrow) swap_t (swap_size_); alloc_assert (swap); int rc = swap->init (); zmq_assert (rc == 0); } } zmq::writer_t::~writer_t () { if (swap) delete swap; } void zmq::writer_t::set_event_sink (i_writer_events *sink_) { zmq_assert (!sink); sink = sink_; } bool zmq::writer_t::check_write (zmq_msg_t *msg_) { // We've already checked and there's no space free for the new message. // There's no point in checking once again. if (unlikely (!active)) return false; if (unlikely (swapping)) { if (unlikely (!swap->fits (msg_))) { active = false; return false; } } else { if (unlikely (pipe_full ())) { if (swap) swapping = true; else { active = false; return false; } } } return true; } bool zmq::writer_t::write (zmq_msg_t *msg_) { if (unlikely (!check_write (msg_))) return false; if (unlikely (swapping)) { bool stored = swap->store (msg_); zmq_assert (stored); if (!(msg_->flags & ZMQ_MSG_MORE)) swap->commit (); return true; } pipe->write (*msg_, msg_->flags & ZMQ_MSG_MORE); if (!(msg_->flags & ZMQ_MSG_MORE)) msgs_written++; return true; } void zmq::writer_t::rollback () { // Remove incomplete message from the swap. if (unlikely (swapping)) { swap->rollback (); return; } // Remove incomplete message from the pipe. zmq_msg_t msg; while (pipe->unwrite (&msg)) { zmq_assert (msg.flags & ZMQ_MSG_MORE); zmq_msg_close (&msg); } } void zmq::writer_t::flush () { // In the swapping mode, flushing is automatically handled by swap object. if (!swapping && !pipe->flush ()) send_activate_reader (reader); } void zmq::writer_t::terminate () { // Prevent double termination. if (terminating) return; terminating = true; // Mark the pipe as not available for writing. active = false; // Rollback any unfinished messages. rollback (); if (swapping) { pending_delimiter = true; return; } // Push delimiter into the pipe. Trick the compiler to belive that // the tag is a valid pointer. Note that watermarks are not checked // thus the delimiter can be written even though the pipe is full. zmq_msg_t msg; const unsigned char *offset = 0; msg.content = (void*) (offset + ZMQ_DELIMITER); msg.flags = 0; pipe->write (msg, false); flush (); } void zmq::writer_t::process_activate_writer (uint64_t msgs_read_) { // Store the reader's message sequence number. msgs_read = msgs_read_; // If we are in the swapping mode, we have some messages in the swap. // Given that pipe is now ready for writing we can move part of the // swap into the pipe. if (swapping) { zmq_msg_t msg; while (!pipe_full () && !swap->empty ()) { swap->fetch(&msg); pipe->write (msg, msg.flags & ZMQ_MSG_MORE); if (!(msg.flags & ZMQ_MSG_MORE)) msgs_written++; } if (!pipe->flush ()) send_activate_reader (reader); // There are no more messages in the swap. We can switch into // standard in-memory mode. if (swap->empty ()) { swapping = false; // Push delimiter into the pipe. Trick the compiler to belive that // the tag is a valid pointer. Note that watermarks are not checked // thus the delimiter can be written even though the pipe is full. if (pending_delimiter) { zmq_msg_t msg; const unsigned char *offset = 0; msg.content = (void*) (offset + ZMQ_DELIMITER); msg.flags = 0; pipe->write (msg, false); flush (); return; } } } // If the writer was non-active before, let's make it active // (available for writing messages to). if (!active && !terminating) { active = true; zmq_assert (sink); sink->activated (this); } } void zmq::writer_t::process_pipe_term () { send_pipe_term_ack (reader); // The above command allows reader to deallocate itself and the pipe. // For safety's sake we'll drop the pointers here. reader = NULL; pipe = NULL; // Notify owner about the termination. zmq_assert (sink); sink->terminated (this); // Deallocate the resources. delete this; } bool zmq::writer_t::pipe_full () { return hwm > 0 && msgs_written - msgs_read == hwm; } void zmq::create_pipe (object_t *reader_parent_, object_t *writer_parent_, uint64_t hwm_, int64_t swap_size_, reader_t **reader_, writer_t **writer_) { // First compute the low water mark. Following point should be taken // into consideration: // // 1. LWM has to be less than HWM. // 2. LWM cannot be set to very low value (such as zero) as after filling // the queue it would start to refill only after all the messages are // read from it and thus unnecessarily hold the progress back. // 3. LWM cannot be set to very high value (such as HWM-1) as it would // result in lock-step filling of the queue - if a single message is // read from a full queue, writer thread is resumed to write exactly one // message to the queue and go back to sleep immediately. This would // result in low performance. // // Given the 3. it would be good to keep HWM and LWM as far apart as // possible to reduce the thread switching overhead to almost zero, // say HWM-LWM should be max_wm_delta. // // That done, we still we have to account for the cases where // HWM < max_wm_delta thus driving LWM to negative numbers. // Let's make LWM 1/2 of HWM in such cases. uint64_t lwm = (hwm_ > max_wm_delta * 2) ? hwm_ - max_wm_delta : (hwm_ + 1) / 2; // Create all three objects pipe consists of: the pipe per se, reader and // writer. The pipe will be handled by reader and writer, its never passed // to the user. Reader and writer are returned to the user. pipe_t *pipe = new (std::nothrow) pipe_t (); alloc_assert (pipe); *reader_ = new (std::nothrow) reader_t (reader_parent_, pipe, lwm); alloc_assert (*reader_); *writer_ = new (std::nothrow) writer_t (writer_parent_, pipe, *reader_, hwm_, swap_size_); alloc_assert (*writer_); } zeromq-2.2.0.orig/src/uuid.cpp0000664000000000000000000001311011732125604014725 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "uuid.hpp" #include "err.hpp" #if defined ZMQ_HAVE_WINDOWS zmq::uuid_t::uuid_t () { RPC_STATUS ret = UuidCreate (&uuid); zmq_assert (ret == RPC_S_OK); ret = UuidToString (&uuid, &string_buf); zmq_assert (ret == RPC_S_OK); create_blob (); } zmq::uuid_t::~uuid_t () { if (string_buf) RpcStringFree (&string_buf); } const char *zmq::uuid_t::to_string () { return (char*) string_buf; } #elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD || (defined ZMQ_HAVE_HPUX && defined HAVE_LIBDCEKT) #include #ifdef ZMQ_HAVE_HPUX # include #else # include #endif zmq::uuid_t::uuid_t () { #ifdef ZMQ_HAVE_HPUX unsigned32 status; #else uint32_t status; #endif uuid_create (&uuid, &status); zmq_assert (status == uuid_s_ok); uuid_to_string (&uuid, &string_buf, &status); zmq_assert (status == uuid_s_ok); create_blob (); } zmq::uuid_t::~uuid_t () { free (string_buf); } const char *zmq::uuid_t::to_string () { return (char*) string_buf; } #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN #include zmq::uuid_t::uuid_t () { uuid_generate (uuid); uuid_unparse (uuid, string_buf); create_blob (); } zmq::uuid_t::~uuid_t () { } const char *zmq::uuid_t::to_string () { return string_buf; } #elif defined ZMQ_HAVE_OPENVMS #include #define uuid_generate(x) sys$create_uid(&(x)) #define uuid_unparse(x, y) \ sprintf (y, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", \ x.data0, x.data1, x.data2, \ x.data3 [0], x.data3 [1], \ x.data3 [2], x.data3 [3], \ x.data3 [4], x.data3 [5], \ x.data3 [6], x.data3 [7]); zmq::uuid_t::uuid_t () { uuid_generate (uuid); uuid_unparse (uuid, string_buf); } zmq::uuid_t::~uuid_t () { } const char *zmq::uuid_t::to_string () { return string_buf; } #else #include #include #include zmq::uuid_t::uuid_t () { unsigned char rand_buf [16]; int ret = RAND_bytes (rand_buf, sizeof rand_buf); zmq_assert (ret == 1); // Read in UUID fields. memcpy (&time_low, rand_buf, sizeof time_low); memcpy (&time_mid, rand_buf + 4, sizeof time_mid); memcpy (&time_hi_and_version, rand_buf + 6, sizeof time_hi_and_version); memcpy (&clock_seq_hi_and_reserved, rand_buf + 8, sizeof clock_seq_hi_and_reserved); memcpy (&clock_seq_low, rand_buf + 9, sizeof clock_seq_low); memcpy (&node [0], rand_buf + 10, sizeof node); // Store UUID version number. time_hi_and_version = (time_hi_and_version & 0x0fff) | 4 << 12; // Store UUID type. clock_seq_hi_and_reserved = (clock_seq_hi_and_reserved & 0x3f) | 0x80; snprintf (string_buf, sizeof string_buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", time_low, time_mid, time_hi_and_version, clock_seq_hi_and_reserved, clock_seq_low, node [0], node [1], node [2], node [3], node [4], node [5]); create_blob (); } zmq::uuid_t::~uuid_t () { } const char *zmq::uuid_t::to_string () { return string_buf; } #endif const unsigned char *zmq::uuid_t::to_blob () { return blob_buf; } unsigned char zmq::uuid_t::convert_byte (const char *hexa_) { unsigned char byte; if (*hexa_ >= '0' && *hexa_ <= '9') byte = *hexa_ - '0'; else if (*hexa_ >= 'A' && *hexa_ <= 'F') byte = *hexa_ - 'A' + 10; else if (*hexa_ >= 'a' && *hexa_ <= 'f') byte = *hexa_ - 'a' + 10; else { zmq_assert (false); byte = 0; } byte *= 16; hexa_++; if (*hexa_ >= '0' && *hexa_ <= '9') byte += *hexa_ - '0'; else if (*hexa_ >= 'A' && *hexa_ <= 'F') byte += *hexa_ - 'A' + 10; else if (*hexa_ >= 'a' && *hexa_ <= 'f') byte += *hexa_ - 'a' + 10; else zmq_assert (false); return byte; } void zmq::uuid_t::create_blob () { const char *buf = (const char*) string_buf; blob_buf [0] = convert_byte (buf + 0); blob_buf [1] = convert_byte (buf + 2); blob_buf [2] = convert_byte (buf + 4); blob_buf [3] = convert_byte (buf + 6); blob_buf [4] = convert_byte (buf + 9); blob_buf [5] = convert_byte (buf + 11); blob_buf [6] = convert_byte (buf + 14); blob_buf [7] = convert_byte (buf + 16); blob_buf [8] = convert_byte (buf + 19); blob_buf [9] = convert_byte (buf + 21); blob_buf [10] = convert_byte (buf + 24); blob_buf [11] = convert_byte (buf + 26); blob_buf [12] = convert_byte (buf + 28); blob_buf [13] = convert_byte (buf + 30); blob_buf [14] = convert_byte (buf + 32); blob_buf [15] = convert_byte (buf + 34); } zeromq-2.2.0.orig/src/options.hpp0000664000000000000000000000530311737023311015461 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OPTIONS_HPP_INCLUDED__ #define __ZMQ_OPTIONS_HPP_INCLUDED__ #include "stddef.h" #include "stdint.hpp" #include "blob.hpp" namespace zmq { struct options_t { options_t (); int setsockopt (int option_, const void *optval_, size_t optvallen_); int getsockopt (int option_, void *optval_, size_t *optvallen_); uint64_t hwm; int64_t swap; uint64_t affinity; blob_t identity; // Maximum tranfer rate [kb/s]. Default 100kb/s. uint32_t rate; // Reliability time interval [s]. Default 10s. uint32_t recovery_ivl; // Reliability time interval [ms]. Default -1 = not used. int32_t recovery_ivl_msec; // Enable multicast loopback. Default disabled (false). bool use_multicast_loop; uint64_t sndbuf; uint64_t rcvbuf; // Socket type. int type; // Linger time, in milliseconds. int linger; // Minimum interval between attempts to reconnect, in milliseconds. // Default 100ms int reconnect_ivl; // Maximum interval between attempts to reconnect, in milliseconds. // Default 0 (unused) int reconnect_ivl_max; // Maximum backlog for pending connections. int backlog; // These options are never set by the user directly. Instead they are // provided by the specific socket type. bool requires_in; bool requires_out; // If true, when connecting, pipes are created immediately without // waiting for the connection to be established. That way the socket // is not aware of the peer's identity, however, it is able to send // messages straight away. bool immediate_connect; // The timeout for send/recv operations for this socket. int rcvtimeo; int sndtimeo; }; } #endif zeromq-2.2.0.orig/src/select.hpp0000664000000000000000000000555011732125604015254 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SELECT_HPP_INCLUDED__ #define __ZMQ_SELECT_HPP_INCLUDED__ #include "platform.hpp" #include #include #ifdef ZMQ_HAVE_WINDOWS #include "winsock2.h" #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { // Implements socket polling mechanism using POSIX.1-2001 select() // function. class select_t : public poller_base_t { public: typedef fd_t handle_t; select_t (); ~select_t (); // "poller" concept. handle_t add_fd (fd_t fd_, struct i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); struct fd_entry_t { fd_t fd; struct i_poll_events *events; }; // Checks if an fd_entry_t is retired. static bool is_retired_fd (const fd_entry_t &entry); // Set of file descriptors that are used to retreive // information for fd_set. typedef std::vector fd_set_t; fd_set_t fds; fd_set source_set_in; fd_set source_set_out; fd_set source_set_err; fd_set readfds; fd_set writefds; fd_set exceptfds; // Maximum file descriptor. fd_t maxfd; // If true, at least one file descriptor has retired. bool retired; // If true, thread is shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; select_t (const select_t&); const select_t &operator = (const select_t&); }; } #endif zeromq-2.2.0.orig/src/i_poll_events.hpp0000664000000000000000000000264611732125604016642 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__ #define __ZMQ_I_POLL_EVENTS_HPP_INCLUDED__ namespace zmq { // Virtual interface to be exposed by object that want to be notified // about events on file descriptors. struct i_poll_events { virtual ~i_poll_events () {} // Called by I/O thread when file descriptor is ready for reading. virtual void in_event () = 0; // Called by I/O thread when file descriptor is ready for writing. virtual void out_event () = 0; // Called when timer expires. virtual void timer_event (int id_) = 0; }; } #endif zeromq-2.2.0.orig/src/clock.cpp0000664000000000000000000001010611732125604015054 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "clock.hpp" #include "platform.hpp" #include "likely.hpp" #include "config.hpp" #include "err.hpp" #include #if defined _MSC_VER #include #endif #if !defined ZMQ_HAVE_WINDOWS #include #endif #if defined HAVE_CLOCK_GETTIME || defined HAVE_GETHRTIME #include #endif zmq::clock_t::clock_t () : last_tsc (rdtsc ()), last_time (now_us () / 1000) { } zmq::clock_t::~clock_t () { } uint64_t zmq::clock_t::now_us () { #if defined ZMQ_HAVE_WINDOWS // Get the high resolution counter's accuracy. LARGE_INTEGER ticksPerSecond; QueryPerformanceFrequency (&ticksPerSecond); // What time is it? LARGE_INTEGER tick; QueryPerformanceCounter (&tick); // Convert the tick number into the number of seconds // since the system was started. double ticks_div = (double) (ticksPerSecond.QuadPart / 1000000); return (uint64_t) (tick.QuadPart / ticks_div); #elif defined HAVE_CLOCK_GETTIME && defined CLOCK_MONOTONIC // Use POSIX clock_gettime function to get precise monotonic time. struct timespec tv; int rc = clock_gettime (CLOCK_MONOTONIC, &tv); // Fix case where system has clock_gettime but CLOCK_MONOTONIC is not supported. // Done at runtime because a ./configure check is bad for // cross-compiling. if( rc != 0) { // Use POSIX gettimeofday function to get precise time. struct timeval tv; int rc = gettimeofday (&tv, NULL); errno_assert (rc == 0); return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec); } return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_nsec / 1000); #elif defined HAVE_GETHRTIME return (gethrtime () / 1000); #else // Use POSIX gettimeofday function to get precise time. struct timeval tv; int rc = gettimeofday (&tv, NULL); errno_assert (rc == 0); return (tv.tv_sec * (uint64_t) 1000000 + tv.tv_usec); #endif } uint64_t zmq::clock_t::now_ms () { uint64_t tsc = rdtsc (); // If TSC is not supported, get precise time and chop off the microseconds. if (!tsc) return now_us () / 1000; // If TSC haven't jumped back (in case of migration to a different // CPU core) and if not too much time elapsed since last measurement, // we can return cached time value. if (likely (tsc - last_tsc <= (clock_precision / 2) && tsc >= last_tsc)) return last_time; last_tsc = tsc; last_time = now_us () / 1000; return last_time; } uint64_t zmq::clock_t::rdtsc () { #if (defined _MSC_VER && (defined _M_IX86 || defined _M_X64)) return __rdtsc (); #elif (defined __GNUC__ && (defined __i386__ || defined __x86_64__)) uint32_t low, high; __asm__ volatile ("rdtsc" : "=a" (low), "=d" (high)); return (uint64_t) high << 32 | low; #elif (defined __SUNPRO_CC && (__SUNPRO_CC >= 0x5100) && (defined __i386 || \ defined __amd64 || defined __x86_64)) union { uint64_t u64val; uint32_t u32val [2]; } tsc; asm("rdtsc" : "=a" (tsc.u32val [0]), "=d" (tsc.u32val [1])); return tsc.u64val; #elif defined(__s390__) uint64_t tsc; asm("\tstck\t%0\n" : "=Q" (tsc) : : "cc"); tsc >>= 12; /* convert to microseconds just to be consistent */ return(tsc); #else return 0; #endif } zeromq-2.2.0.orig/src/tcp_listener.cpp0000664000000000000000000002241411732125604016461 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "../include/zmq.h" #include "tcp_listener.hpp" #include "platform.hpp" #include "ip.hpp" #include "config.hpp" #include "err.hpp" #ifdef ZMQ_HAVE_WINDOWS zmq::tcp_listener_t::tcp_listener_t () : has_file (false), s (retired_fd) { memset (&addr, 0, sizeof (addr)); addr_len = 0; } zmq::tcp_listener_t::~tcp_listener_t () { if (s != retired_fd) close (); } int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_, int backlog_) { // IPC protocol is not supported on Windows platform. if (strcmp (protocol_, "tcp") != 0 ) { errno = EPROTONOSUPPORT; return -1; } // Convert the interface into sockaddr_in structure. int rc = resolve_ip_interface (&addr, &addr_len, addr_); if (rc != 0) return rc; // Create a listening socket. s = socket (addr.ss_family, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) { wsa_error_to_errno (); return -1; } // Allow reusing of the address. int flag = 1; rc = setsockopt (s, SOL_SOCKET, SO_EXCLUSIVEADDRUSE, (const char*) &flag, sizeof (int)); wsa_assert (rc != SOCKET_ERROR); // Set the non-blocking flag. u_long uflag = 1; rc = ioctlsocket (s, FIONBIO, &uflag); wsa_assert (rc != SOCKET_ERROR); // Bind the socket to the network interface and port. rc = bind (s, (struct sockaddr*) &addr, addr_len); if (rc == SOCKET_ERROR) { wsa_error_to_errno (); return -1; } // Listen for incomming connections. rc = listen (s, backlog_); if (rc == SOCKET_ERROR) { wsa_error_to_errno (); return -1; } return 0; } int zmq::tcp_listener_t::close () { zmq_assert (s != retired_fd); int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); s = retired_fd; return 0; } zmq::fd_t zmq::tcp_listener_t::get_fd () { return s; } zmq::fd_t zmq::tcp_listener_t::accept () { zmq_assert (s != retired_fd); // Accept one incoming connection. fd_t sock = ::accept (s, NULL, NULL); if (sock == INVALID_SOCKET && (WSAGetLastError () == WSAEWOULDBLOCK || WSAGetLastError () == WSAECONNRESET)) return retired_fd; zmq_assert (sock != INVALID_SOCKET); // Set to non-blocking mode. unsigned long argp = 1; int rc = ioctlsocket (sock, FIONBIO, &argp); wsa_assert (rc != SOCKET_ERROR); // Disable Nagle's algorithm. int flag = 1; rc = setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof (int)); wsa_assert (rc != SOCKET_ERROR); return sock; } #else #include #include #include #include #include #include #include #ifndef ZMQ_HAVE_OPENVMS #include #endif #ifdef ZMQ_HAVE_OPENVMS #include #endif zmq::tcp_listener_t::tcp_listener_t () : has_file (false), s (retired_fd) { memset (&addr, 0, sizeof (addr)); } zmq::tcp_listener_t::~tcp_listener_t () { if (s != retired_fd) close (); } int zmq::tcp_listener_t::set_address (const char *protocol_, const char *addr_, int backlog_) { if (strcmp (protocol_, "tcp") == 0 ) { // Resolve the sockaddr to bind to. int rc = resolve_ip_interface (&addr, &addr_len, addr_); if (rc != 0) return -1; // Create a listening socket. s = open_socket (addr.ss_family, SOCK_STREAM, IPPROTO_TCP); if (s == -1) return -1; // Allow reusing of the address. int flag = 1; rc = setsockopt (s, SOL_SOCKET, SO_REUSEADDR, &flag, sizeof (int)); errno_assert (rc == 0); // Set the non-blocking flag. #ifdef ZMQ_HAVE_OPENVMS flag = 1; rc = ioctl (s, FIONBIO, &flag); errno_assert (rc != -1); #else flag = fcntl (s, F_GETFL, 0); if (flag == -1) flag = 0; rc = fcntl (s, F_SETFL, flag | O_NONBLOCK); errno_assert (rc != -1); #endif // Bind the socket to the network interface and port. rc = bind (s, (struct sockaddr*) &addr, addr_len); if (rc != 0) { int err = errno; if (close () != 0) return -1; errno = err; return -1; } // Listen for incomming connections. rc = listen (s, backlog_); if (rc != 0) { int err = errno; if (close () != 0) return -1; errno = err; return -1; } return 0; } #ifndef ZMQ_HAVE_OPENVMS else if (strcmp (protocol_, "ipc") == 0) { // Get rid of the file associated with the UNIX domain socket that // may have been left behind by the previous run of the application. ::unlink (addr_); // Convert the address into sockaddr_un structure. int rc = resolve_local_path (&addr, &addr_len, addr_); if (rc != 0) return -1; // Create a listening socket. s = socket (AF_UNIX, SOCK_STREAM, 0); if (s == -1) return -1; // Set the non-blocking flag. int flag = fcntl (s, F_GETFL, 0); if (flag == -1) flag = 0; rc = fcntl (s, F_SETFL, flag | O_NONBLOCK); errno_assert (rc != -1); // Bind the socket to the file path. rc = bind (s, (struct sockaddr*) &addr, addr_len); if (rc != 0) { int err = errno; if (close () != 0) return -1; errno = err; return -1; } has_file = true; // Listen for incomming connections. rc = listen (s, backlog_); if (rc != 0) { int err = errno; if (close () != 0) return -1; errno = err; return -1; } return 0; } #endif else { errno = EPROTONOSUPPORT; return -1; } } int zmq::tcp_listener_t::close () { zmq_assert (s != retired_fd); int rc = ::close (s); if (rc != 0) return -1; s = retired_fd; #ifndef ZMQ_HAVE_OPENVMS // If there's an underlying UNIX domain socket, get rid of the file it // is associated with. struct sockaddr_un *su = (struct sockaddr_un*) &addr; if (AF_UNIX == su->sun_family && has_file) { rc = ::unlink(su->sun_path); if (rc != 0) return -1; } #endif return 0; } zmq::fd_t zmq::tcp_listener_t::get_fd () { return s; } zmq::fd_t zmq::tcp_listener_t::accept () { zmq_assert (s != retired_fd); // Accept one incoming connection. fd_t sock = ::accept (s, NULL, NULL); #if (defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD || \ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_OSX || \ defined ZMQ_HAVE_OPENVMS || defined ZMQ_HAVE_NETBSD || \ defined ZMQ_HAVE_CYGWIN) if (sock == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED)) return retired_fd; #elif (defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_AIX) if (sock == -1 && (errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED || errno == EPROTO)) return retired_fd; #elif defined ZMQ_HAVE_HPUX if (sock == -1 && (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED || errno == ENOBUFS)) return retired_fd; #elif defined ZMQ_HAVE_QNXNTO if (sock == -1 && (errno == EWOULDBLOCK || errno == EINTR || errno == ECONNABORTED)) return retired_fd; #endif errno_assert (sock != -1); // Set to non-blocking mode. #ifdef ZMQ_HAVE_OPENVMS int flags = 1; int rc = ioctl (sock, FIONBIO, &flags); errno_assert (rc != -1); #else int flags = fcntl (s, F_GETFL, 0); if (flags == -1) flags = 0; int rc = fcntl (sock, F_SETFL, flags | O_NONBLOCK); errno_assert (rc != -1); #endif struct sockaddr *sa = (struct sockaddr*) &addr; if (AF_UNIX != sa->sa_family) { // Disable Nagle's algorithm. int flag = 1; rc = setsockopt (sock, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof (int)); errno_assert (rc == 0); #ifdef ZMQ_HAVE_OPENVMS // Disable delayed acknowledgements. flag = 1; rc = setsockopt (sock, IPPROTO_TCP, TCP_NODELACK, (char*) &flag, sizeof (int)); errno_assert (rc != SOCKET_ERROR); #endif } return sock; } #endif zeromq-2.2.0.orig/src/encoder.cpp0000664000000000000000000000537411732130203015402 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "encoder.hpp" #include "i_inout.hpp" #include "wire.hpp" zmq::encoder_t::encoder_t (size_t bufsize_) : encoder_base_t (bufsize_), source (NULL) { zmq_msg_init (&in_progress); // Write 0 bytes to the batch and go to message_ready state. next_step (NULL, 0, &encoder_t::message_ready, true); } zmq::encoder_t::~encoder_t () { zmq_msg_close (&in_progress); } void zmq::encoder_t::set_inout (i_inout *source_) { source = source_; } bool zmq::encoder_t::size_ready () { // Write message body into the buffer. next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress), &encoder_t::message_ready, false); return true; } bool zmq::encoder_t::message_ready () { // Destroy content of the old message. zmq_msg_close (&in_progress); // Read new message. If there is none, return false. // Note that new state is set only if write is successful. That way // unsuccessful write will cause retry on the next state machine // invocation. if (!source || !source->read (&in_progress)) { zmq_msg_init (&in_progress); return false; } // Get the message size. size_t size = zmq_msg_size (&in_progress); // Account for the 'flags' byte. size++; // For messages less than 255 bytes long, write one byte of message size. // For longer messages write 0xff escape character followed by 8-byte // message size. In both cases 'flags' field follows. if (size < 255) { tmpbuf [0] = (unsigned char) size; tmpbuf [1] = (in_progress.flags & ZMQ_MSG_MORE); next_step (tmpbuf, 2, &encoder_t::size_ready, !(in_progress.flags & ZMQ_MSG_MORE)); } else { tmpbuf [0] = 0xff; put_uint64 (tmpbuf + 1, size); tmpbuf [9] = (in_progress.flags & ZMQ_MSG_MORE); next_step (tmpbuf, 10, &encoder_t::size_ready, !(in_progress.flags & ZMQ_MSG_MORE)); } return true; } zeromq-2.2.0.orig/src/pull.cpp0000664000000000000000000000305111732125604014736 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "pull.hpp" #include "err.hpp" zmq::pull_t::pull_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), fq (this) { options.type = ZMQ_PULL; options.requires_in = true; options.requires_out = false; } zmq::pull_t::~pull_t () { } void zmq::pull_t::xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (inpipe_ && !outpipe_); fq.attach (inpipe_); } void zmq::pull_t::process_term (int linger_) { fq.terminate (); socket_base_t::process_term (linger_); } int zmq::pull_t::xrecv (zmq_msg_t *msg_, int flags_) { return fq.recv (msg_, flags_); } bool zmq::pull_t::xhas_in () { return fq.has_in (); } zeromq-2.2.0.orig/src/i_inout.hpp0000664000000000000000000000267311732125604015446 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_I_INOUT_HPP_INCLUDED__ #define __ZMQ_I_INOUT_HPP_INCLUDED__ #include "../include/zmq.h" #include "stdint.hpp" namespace zmq { struct i_inout { virtual ~i_inout () {} // Engine asks for a message to send to the network. virtual bool read (::zmq_msg_t *msg_) = 0; // Engine received message from the network and sends it further on. virtual bool write (::zmq_msg_t *msg_) = 0; // Flush all the previously written messages. virtual void flush () = 0; // Engine is dead. Drop all the references to it. virtual void detach () = 0; }; } #endif zeromq-2.2.0.orig/src/windows.hpp0000664000000000000000000001131411732125604015462 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_WINDOWS_HPP_INCLUDED__ #define __ZMQ_WINDOWS_HPP_INCLUDED__ // The purpose of this header file is to turn on only the items actually needed // on the windows platform. // Disable deprecation warning. #define _CRT_SECURE_NO_WARNINGS #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #ifndef NOGDICAPMASKS #define NOGDICAPMASKS // CC_*, LC_*, PC_*, CP_*, TC_*, RC_ #endif #ifndef NOVIRTUALKEYCODES #define NOVIRTUALKEYCODES // VK_* #endif #ifndef NOWINMESSAGES #define NOWINMESSAGES // WM_*, EM_*, LB_*, CB_* #endif #ifndef NOWINSTYLES #define NOWINSTYLES // WS_*, CS_*, ES_*, LBS_*, SBS_*, CBS_* #endif #ifndef NOSYSMETRICS #define NOSYSMETRICS // SM_* #endif #ifndef NOMENUS #define NOMENUS // MF_* #endif #ifndef NOICONS #define NOICONS // IDI_* #endif #ifndef NOKEYSTATES #define NOKEYSTATES // MK_* #endif #ifndef NOSYSCOMMANDS #define NOSYSCOMMANDS // SC_* #endif #ifndef NORASTEROPS #define NORASTEROPS // Binary and Tertiary raster ops #endif #ifndef NOSHOWWINDOW #define NOSHOWWINDOW // SW_* #endif #ifndef OEMRESOURCE #define OEMRESOURCE // OEM Resource values #endif #ifndef NOATOM #define NOATOM // Atom Manager routines #endif #ifndef NOCLIPBOARD #define NOCLIPBOARD // Clipboard routines #endif #ifndef NOCOLOR #define NOCOLOR // Screen colors #endif #ifndef NOCTLMGR #define NOCTLMGR // Control and Dialog routines #endif #ifndef NODRAWTEXT #define NODRAWTEXT // DrawText() and DT_* #endif #ifndef NOGDI #define NOGDI // All GDI defines and routines #endif #ifndef NOKERNEL #define NOKERNEL // All KERNEL defines and routines #endif #ifndef NOUSER #define NOUSER // All USER defines and routines #endif #ifndef NONLS #define NONLS // All NLS defines and routines #endif #ifndef NOMB #define NOMB // MB_* and MessageBox() #endif #ifndef NOMEMMGR #define NOMEMMGR // GMEM_*, LMEM_*, GHND, LHND, associated routines #endif #ifndef NOMETAFILE #define NOMETAFILE // typedef METAFILEPICT #endif #ifndef NOMINMAX #define NOMINMAX // Macros min(a,b) and max(a,b) #endif #ifndef NOMSG #define NOMSG // typedef MSG and associated routines #endif #ifndef NOOPENFILE #define NOOPENFILE // OpenFile(), OemToAnsi, AnsiToOem, and OF_* #endif #ifndef NOSCROLL #define NOSCROLL // SB_* and scrolling routines #endif #ifndef NOSERVICE #define NOSERVICE // All Service Controller routines, SERVICE_ equates, etc. #endif #ifndef NOSOUND #define NOSOUND // Sound driver routines #endif #ifndef NOTEXTMETRIC #define NOTEXTMETRIC // typedef TEXTMETRIC and associated routines #endif #ifndef NOWH #define NOWH // SetWindowsHook and WH_* #endif #ifndef NOWINOFFSETS #define NOWINOFFSETS // GWL_*, GCL_*, associated routines #endif #ifndef NOCOMM #define NOCOMM // COMM driver routines #endif #ifndef NOKANJI #define NOKANJI // Kanji support stuff. #endif #ifndef NOHELP #define NOHELP // Help engine interface. #endif #ifndef NOPROFILER #define NOPROFILER // Profiler interface. #endif #ifndef NODEFERWINDOWPOS #define NODEFERWINDOWPOS // DeferWindowPos routines #endif #ifndef NOMCX #define NOMCX // Modem Configuration ExtensionsA #endif // Set target version to Windows Server 2003, Windows XP/SP1 or higher. #ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #include #ifdef __MINGW32__ // Require Windows XP or higher with MinGW for getaddrinfo(). #if(_WIN32_WINNT >= 0x0501) #else #undef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif /* _WIN32_WINNT >= 0x0501 */ #endif /* __MINGW32__ */ #include #include #include #include #include // On mingw environment AI_NUMERICSERV is not defined, needed in ip.cpp. #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0x0400 #endif #endif zeromq-2.2.0.orig/src/fd.hpp0000664000000000000000000000234711732125604014367 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_FD_HPP_INCLUDED__ #define __ZMQ_FD_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif namespace zmq { #ifdef ZMQ_HAVE_WINDOWS #if defined _MSC_VER &&_MSC_VER <= 1400 typedef UINT_PTR fd_t; enum {retired_fd = (fd_t)(~0)}; #else typedef SOCKET fd_t; enum {retired_fd = INVALID_SOCKET}; #endif #else typedef int fd_t; enum {retired_fd = -1}; #endif } #endif zeromq-2.2.0.orig/src/sub.cpp0000664000000000000000000000366511732125604014566 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "sub.hpp" zmq::sub_t::sub_t (class ctx_t *parent_, uint32_t tid_) : xsub_t (parent_, tid_) { options.type = ZMQ_SUB; } zmq::sub_t::~sub_t () { } int zmq::sub_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { if (option_ != ZMQ_SUBSCRIBE && option_ != ZMQ_UNSUBSCRIBE) { errno = EINVAL; return -1; } // Create the subscription message. zmq_msg_t msg; zmq_msg_init_size (&msg, optvallen_ + 1); unsigned char *data = (unsigned char*) zmq_msg_data (&msg); if (option_ == ZMQ_SUBSCRIBE) *data = 1; else if (option_ == ZMQ_UNSUBSCRIBE) *data = 0; memcpy (data + 1, optval_, optvallen_); // Pass it further on in the stack. int err = 0; int rc = xsub_t::xsend (&msg, 0); if (rc != 0) err = errno; zmq_msg_close (&msg); if (rc != 0) errno = err; return rc; } int zmq::sub_t::xsend (zmq_msg_t *msg_, int options_) { // Overload the XSUB's send. errno = ENOTSUP; return -1; } bool zmq::sub_t::xhas_out () { // Overload the XSUB's send. return false; } zeromq-2.2.0.orig/src/lb.cpp0000664000000000000000000001024411732125604014361 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "lb.hpp" #include "pipe.hpp" #include "err.hpp" #include "own.hpp" zmq::lb_t::lb_t (own_t *sink_) : active (0), current (0), more (false), dropping (false), sink (sink_), terminating (false) { } zmq::lb_t::~lb_t () { zmq_assert (pipes.empty ()); } void zmq::lb_t::attach (writer_t *pipe_) { pipe_->set_event_sink (this); pipes.push_back (pipe_); pipes.swap (active, pipes.size () - 1); active++; if (terminating) { sink->register_term_acks (1); pipe_->terminate (); } } void zmq::lb_t::terminate () { zmq_assert (!terminating); terminating = true; sink->register_term_acks (pipes.size ()); for (pipes_t::size_type i = 0; i != pipes.size (); i++) pipes [i]->terminate (); } void zmq::lb_t::terminated (writer_t *pipe_) { pipes_t::size_type index = pipes.index (pipe_); // If we are in the middle of multipart message and current pipe // have disconnected, we have to drop the remainder of the message. if (index == current && more) dropping = true; // Remove the pipe from the list; adjust number of active pipes // accordingly. if (index < active) { active--; if (current == active) current = 0; } pipes.erase (pipe_); if (terminating) sink->unregister_term_ack (); } void zmq::lb_t::activated (writer_t *pipe_) { // Move the pipe to the list of active pipes. pipes.swap (pipes.index (pipe_), active); active++; } int zmq::lb_t::send (zmq_msg_t *msg_, int flags_) { // Drop the message if required. If we are at the end of the message // switch back to non-dropping mode. if (dropping) { more = msg_->flags & ZMQ_MSG_MORE; if (!more) dropping = false; int rc = zmq_msg_close (msg_); errno_assert (rc == 0); rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } while (active > 0) { if (pipes [current]->write (msg_)) { more = msg_->flags & ZMQ_MSG_MORE; break; } zmq_assert (!more); active--; if (current < active) pipes.swap (current, active); else current = 0; } // If there are no pipes we cannot send the message. if (active == 0) { errno = EAGAIN; return -1; } // If it's final part of the message we can fluch it downstream and // continue round-robinning (load balance). if (!more) { pipes [current]->flush (); current = (current + 1) % active; } // Detach the message from the data buffer. int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } bool zmq::lb_t::has_out () { // If one part of the message was already written we can definitely // write the rest of the message. if (more) return true; while (active > 0) { // Check whether zero-sized message can be written to the pipe. zmq_msg_t msg; zmq_msg_init (&msg); if (pipes [current]->check_write (&msg)) { zmq_msg_close (&msg); return true; } zmq_msg_close (&msg); // Deactivate the pipe. active--; pipes.swap (current, active); if (current == active) current = 0; } return false; } zeromq-2.2.0.orig/src/signaler.cpp0000664000000000000000000002303311732125604015570 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_FORCE_SELECT #define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #elif defined ZMQ_FORCE_POLL #define ZMQ_SIGNALER_WAIT_BASED_ON_POLL #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #define ZMQ_SIGNALER_WAIT_BASED_ON_POLL #elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS #define ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #endif // On AIX, poll.h has to be included before zmq.h to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_SIGNALER_WAIT_BASED_ON_POLL #include #elif defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #elif defined ZMQ_HAVE_HPUX #include #include #include #elif defined ZMQ_HAVE_OPENVMS #include #include #else #include #endif #endif #include "signaler.hpp" #include "likely.hpp" #include "err.hpp" #include "fd.hpp" #include "ip.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #include #endif zmq::signaler_t::signaler_t () { // Create the socketpair for signaling. int rc = make_fdpair (&r, &w); errno_assert (rc == 0); // Set both fds to non-blocking mode. #if defined ZMQ_HAVE_WINDOWS unsigned long argp = 1; rc = ioctlsocket (w, FIONBIO, &argp); wsa_assert (rc != SOCKET_ERROR); rc = ioctlsocket (r, FIONBIO, &argp); wsa_assert (rc != SOCKET_ERROR); #else int flags = fcntl (w, F_GETFL, 0); errno_assert (flags >= 0); rc = fcntl (w, F_SETFL, flags | O_NONBLOCK); errno_assert (rc == 0); flags = fcntl (r, F_GETFL, 0); errno_assert (flags >= 0); rc = fcntl (r, F_SETFL, flags | O_NONBLOCK); errno_assert (rc == 0); #endif } zmq::signaler_t::~signaler_t () { #if defined ZMQ_HAVE_WINDOWS int rc = closesocket (w); wsa_assert (rc != SOCKET_ERROR); rc = closesocket (r); wsa_assert (rc != SOCKET_ERROR); #else close (w); close (r); #endif } zmq::fd_t zmq::signaler_t::get_fd () { return r; } void zmq::signaler_t::send () { #if defined ZMQ_HAVE_WINDOWS unsigned char dummy = 0; int nbytes = ::send (w, (char*) &dummy, sizeof (dummy), 0); wsa_assert (nbytes != SOCKET_ERROR); zmq_assert (nbytes == sizeof (dummy)); #else unsigned char dummy = 0; while (true) { ssize_t nbytes = ::send (w, &dummy, sizeof (dummy), 0); if (unlikely (nbytes == -1 && errno == EINTR)) continue; zmq_assert (nbytes == sizeof (dummy)); break; } #endif } int zmq::signaler_t::wait (int timeout_) { #ifdef ZMQ_SIGNALER_WAIT_BASED_ON_POLL struct pollfd pfd; pfd.fd = r; pfd.events = POLLIN; int rc = poll (&pfd, 1, timeout_); if (unlikely (rc < 0)) { zmq_assert (errno == EINTR); return -1; } else if (unlikely (rc == 0)) { errno = EAGAIN; return -1; } zmq_assert (rc == 1); zmq_assert (pfd.revents & POLLIN); return 0; #elif defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT fd_set fds; FD_ZERO (&fds); FD_SET (r, &fds); struct timeval timeout; if (timeout_ >= 0) { timeout.tv_sec = timeout_ / 1000; timeout.tv_usec = timeout_ % 1000 * 1000; } #ifdef ZMQ_HAVE_WINDOWS int rc = select (0, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); wsa_assert (rc != SOCKET_ERROR); #else int rc = select (r + 1, &fds, NULL, NULL, timeout_ >= 0 ? &timeout : NULL); if (unlikely (rc < 0)) { zmq_assert (errno == EINTR); return -1; } #endif if (unlikely (rc == 0)) { errno = EAGAIN; return -1; } zmq_assert (rc == 1); return 0; #else #error #endif } void zmq::signaler_t::recv () { // Attempt to read a signal. unsigned char dummy; #ifdef ZMQ_HAVE_WINDOWS int nbytes = ::recv (r, (char*) &dummy, sizeof (dummy), 0); wsa_assert (nbytes != SOCKET_ERROR); #else ssize_t nbytes = ::recv (r, &dummy, sizeof (dummy), 0); errno_assert (nbytes >= 0); #endif zmq_assert (nbytes == sizeof (dummy)); zmq_assert (dummy == 0); } int zmq::signaler_t::make_fdpair (fd_t *r_, fd_t *w_) { #if defined ZMQ_HAVE_WINDOWS // Windows has no 'socketpair' function. CreatePipe is no good as pipe // handles cannot be polled on. Here we create the socketpair by hand. *w_ = INVALID_SOCKET; *r_ = INVALID_SOCKET; // Create listening socket. SOCKET listener; listener = open_socket (AF_INET, SOCK_STREAM, 0); wsa_assert (listener != INVALID_SOCKET); // Set SO_REUSEADDR and TCP_NODELAY on listening socket. BOOL so_reuseaddr = 1; int rc = setsockopt (listener, SOL_SOCKET, SO_REUSEADDR, (char *)&so_reuseaddr, sizeof (so_reuseaddr)); wsa_assert (rc != SOCKET_ERROR); BOOL tcp_nodelay = 1; rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, (char *)&tcp_nodelay, sizeof (tcp_nodelay)); wsa_assert (rc != SOCKET_ERROR); // Bind listening socket to any free local port. struct sockaddr_in addr; memset (&addr, 0, sizeof (addr)); addr.sin_family = AF_INET; addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); addr.sin_port = 0; rc = bind (listener, (const struct sockaddr*) &addr, sizeof (addr)); wsa_assert (rc != SOCKET_ERROR); // Retrieve local port listener is bound to (into addr). int addrlen = sizeof (addr); rc = getsockname (listener, (struct sockaddr*) &addr, &addrlen); wsa_assert (rc != SOCKET_ERROR); // Listen for incomming connections. rc = listen (listener, 1); wsa_assert (rc != SOCKET_ERROR); // Create the writer socket. *w_ = WSASocket (AF_INET, SOCK_STREAM, 0, NULL, 0, 0); wsa_assert (*w_ != INVALID_SOCKET); // Set TCP_NODELAY on writer socket. rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY, (char *)&tcp_nodelay, sizeof (tcp_nodelay)); wsa_assert (rc != SOCKET_ERROR); // Connect writer to the listener. rc = connect (*w_, (sockaddr *) &addr, sizeof (addr)); wsa_assert (rc != SOCKET_ERROR); // Accept connection from writer. *r_ = accept (listener, NULL, NULL); wsa_assert (*r_ != INVALID_SOCKET); // We don't need the listening socket anymore. Close it. rc = closesocket (listener); wsa_assert (rc != SOCKET_ERROR); return 0; #elif defined ZMQ_HAVE_OPENVMS // Whilst OpenVMS supports socketpair - it maps to AF_INET only. Further, // it does not set the socket options TCP_NODELAY and TCP_NODELACK which // can lead to performance problems. // // The bug will be fixed in V5.6 ECO4 and beyond. In the meantime, we'll // create the socket pair manually. sockaddr_in lcladdr; memset (&lcladdr, 0, sizeof (lcladdr)); lcladdr.sin_family = AF_INET; lcladdr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); lcladdr.sin_port = 0; int listener = open_socket (AF_INET, SOCK_STREAM, 0); errno_assert (listener != -1); int on = 1; int rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)); errno_assert (rc != -1); rc = setsockopt (listener, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on)); errno_assert (rc != -1); rc = bind(listener, (struct sockaddr*) &lcladdr, sizeof (lcladdr)); errno_assert (rc != -1); socklen_t lcladdr_len = sizeof (lcladdr); rc = getsockname (listener, (struct sockaddr*) &lcladdr, &lcladdr_len); errno_assert (rc != -1); rc = listen (listener, 1); errno_assert (rc != -1); *w_ = open_socket (AF_INET, SOCK_STREAM, 0); errno_assert (*w_ != -1); rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELAY, &on, sizeof (on)); errno_assert (rc != -1); rc = setsockopt (*w_, IPPROTO_TCP, TCP_NODELACK, &on, sizeof (on)); errno_assert (rc != -1); rc = connect (*w_, (struct sockaddr*) &lcladdr, sizeof (lcladdr)); errno_assert (rc != -1); *r_ = accept (listener, NULL, NULL); errno_assert (*r_ != -1); close (listener); return 0; #else // All other implementations support socketpair() int sv [2]; int rc = socketpair (AF_UNIX, SOCK_STREAM, 0, sv); errno_assert (rc == 0); *w_ = sv [0]; *r_ = sv [1]; return 0; #endif } #if defined ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #undef ZMQ_SIGNALER_WAIT_BASED_ON_SELECT #endif #if defined ZMQ_SIGNALER_WAIT_BASED_ON_POLL #undef ZMQ_SIGNALER_WAIT_BASED_ON_POLL #endif zeromq-2.2.0.orig/src/poller.hpp0000664000000000000000000000406111732125604015266 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_POLLER_HPP_INCLUDED__ #define __ZMQ_POLLER_HPP_INCLUDED__ #include "epoll.hpp" #include "poll.hpp" #include "select.hpp" #include "devpoll.hpp" #include "kqueue.hpp" namespace zmq { #if defined ZMQ_FORCE_SELECT typedef select_t poller_t; #elif defined ZMQ_FORCE_POLL typedef poll_t poller_t; #elif defined ZMQ_FORCE_EPOLL typedef epoll_t poller_t; #elif defined ZMQ_FORCE_DEVPOLL typedef devpoll_t poller_t; #elif defined ZMQ_FORCE_KQUEUE typedef kqueue_t poller_t; #elif defined ZMQ_HAVE_LINUX typedef epoll_t poller_t; #elif defined ZMQ_HAVE_WINDOWS typedef select_t poller_t; #elif defined ZMQ_HAVE_FREEBSD typedef kqueue_t poller_t; #elif defined ZMQ_HAVE_OPENBSD typedef kqueue_t poller_t; #elif defined ZMQ_HAVE_NETBSD typedef kqueue_t poller_t; #elif defined ZMQ_HAVE_SOLARIS typedef devpoll_t poller_t; #elif defined ZMQ_HAVE_OSX typedef kqueue_t poller_t; #elif defined ZMQ_HAVE_QNXNTO typedef poll_t poller_t; #elif defined ZMQ_HAVE_AIX typedef poll_t poller_t; #elif defined ZMQ_HAVE_HPUX typedef devpoll_t poller_t; #elif defined ZMQ_HAVE_OPENVMS typedef select_t poller_t; #elif defined ZMQ_HAVE_CYGWIN typedef select_t poller_t; #else #error Unsupported platform #endif } #endif zeromq-2.2.0.orig/src/uuid.hpp0000664000000000000000000000640111732125604014737 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_UUID_HPP_INCLUDED__ #define __ZMQ_UUID_HPP_INCLUDED__ #include "platform.hpp" #include "stdint.hpp" #if defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD #include #elif defined ZMQ_HAVE_HPUX && defined HAVE_LIBDCEKT #include #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN #include #elif defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #include #elif defined ZMQ_HAVE_OPENVMS typedef struct { unsigned long data0; unsigned short data1; unsigned short data2; unsigned char data3 [8]; } uuid_t; #endif namespace zmq { // This class provides RFC 4122 (a Universally Unique IDentifier) // implementation. class uuid_t { public: uuid_t (); ~uuid_t (); // The length of textual representation of UUID. enum { uuid_string_len = 36 }; // Returns a pointer to buffer containing the textual // representation of the UUID. The callee is reponsible to // free the allocated memory. const char *to_string (); // The length of binary representation of UUID. enum { uuid_blob_len = 16 }; const unsigned char *to_blob (); private: // Converts one byte from hexa representation to binary. unsigned char convert_byte (const char *hexa_); // Converts string representation of UUID into standardised BLOB. // The function is endianness agnostic. void create_blob (); #if defined ZMQ_HAVE_WINDOWS #ifdef ZMQ_HAVE_MINGW32 typedef unsigned char* RPC_CSTR; #endif ::UUID uuid; RPC_CSTR string_buf; #elif defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_NETBSD ::uuid_t uuid; char *string_buf; #elif defined ZMQ_HAVE_HPUX && defined HAVE_LIBDCEKT ::uuid_t uuid; unsigned_char_t *string_buf; #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_CYGWIN ||\ defined ZMQ_HAVE_OPENVMS ::uuid_t uuid; char string_buf [uuid_string_len + 1]; #else // RFC 4122 UUID's fields uint32_t time_low; uint16_t time_mid; uint16_t time_hi_and_version; uint8_t clock_seq_hi_and_reserved; uint8_t clock_seq_low; uint8_t node [6]; char string_buf [uuid_string_len + 1]; #endif unsigned char blob_buf [uuid_blob_len]; }; } #endif zeromq-2.2.0.orig/src/devpoll.hpp0000664000000000000000000000512011732125604015433 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DEVPOLL_HPP_INCLUDED__ #define __ZMQ_DEVPOLL_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_HPUX #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { // Implements socket polling mechanism using the "/dev/poll" interface. class devpoll_t : public poller_base_t { public: typedef fd_t handle_t; devpoll_t (); ~devpoll_t (); // "poller" concept. handle_t add_fd (fd_t fd_, struct i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // File descriptor referring to "/dev/poll" pseudo-device. fd_t devpoll_fd; struct fd_entry_t { short events; struct i_poll_events *reactor; bool valid; bool accepted; }; typedef std::vector fd_table_t; fd_table_t fd_table; typedef std::vector pending_list_t; pending_list_t pending_list; // Pollset manipulation function. void devpoll_ctl (fd_t fd_, short events_); // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; devpoll_t (const devpoll_t&); const devpoll_t &operator = (const devpoll_t&); }; } #endif #endif zeromq-2.2.0.orig/src/push.hpp0000664000000000000000000000313411732125604014750 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PUSH_HPP_INCLUDED__ #define __ZMQ_PUSH_HPP_INCLUDED__ #include "socket_base.hpp" #include "lb.hpp" namespace zmq { class push_t : public socket_base_t { public: push_t (class ctx_t *parent_, uint32_t tid_); ~push_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int flags_); bool xhas_out (); private: // Hook into the termination process. void process_term (int linger_); // Load balancer managing the outbound pipes. lb_t lb; push_t (const push_t&); const push_t &operator = (const push_t&); }; } #endif zeromq-2.2.0.orig/src/gcc_421_char_traits.hpp0000664000000000000000000001002311732125604017471 0ustar rootroot// Character Traits for use by standard string and iostream -*- C++ -*- // Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 // Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the // terms of the GNU General Public License as published by the // Free Software Foundation; either version 2, or (at your option) // any later version. // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License along // with this library; see the file COPYING. If not, write to the Free // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, // USA. // As a special exception, you may use this file as part of a free software // library without restriction. Specifically, if other files instantiate // templates or use macros or inline functions from this file, or you compile // this file and link it with other files to produce an executable, this // file does not by itself cause the resulting executable to be covered by // the GNU General Public License. This exception does not however // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. /** @file char_traits.h * This is an internal header file, included by other library headers. * You should not attempt to use it directly. */ // // ISO C++ 14882: 21 Strings library // // This file has been snipped for 0mq to provide a definition for // struct char_traits // Which is not implemented in GNU ISO C++ Library as of version 3.2.3 // And is required by blob.hpp #ifndef _ZMQ_CHAR_TRAITS_H #define _ZMQ_CHAR_TRAITS_H 1 namespace std { /// @brief 21.1.3.1 char_traits specializations template<> struct char_traits { typedef unsigned char char_type; typedef int int_type; typedef streampos pos_type; typedef streamoff off_type; typedef mbstate_t state_type; static void assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } static bool eq(const char_type& __c1, const char_type& __c2) { return __c1 == __c2; } static bool lt(const char_type& __c1, const char_type& __c2) { return __c1 < __c2; } static int compare(const char_type* __s1, const char_type* __s2, size_t __n) { return memcmp(__s1, __s2, __n); } static size_t length(const char_type* __s) { return strlen((const char*)__s); } static const char_type* find(const char_type* __s, size_t __n, const char_type& __a) { return static_cast(memchr(__s, __a, __n)); } static char_type* move(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(memmove(__s1, __s2, __n)); } static char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) { return static_cast(memcpy(__s1, __s2, __n)); } static char_type* assign(char_type* __s, size_t __n, char_type __a) { return static_cast(memset(__s, __a, __n)); } static char_type to_char_type(const int_type& __c) { return static_cast(__c); } // To keep both the byte 0xff and the eof symbol 0xffffffff // from ending up as 0xffffffff. static int_type to_int_type(const char_type& __c) { return static_cast(static_cast(__c)); } static bool eq_int_type(const int_type& __c1, const int_type& __c2) { return __c1 == __c2; } static int_type eof() { return static_cast(EOF); } static int_type not_eof(const int_type& __c) { return (__c == eof()) ? 0 : __c; } }; } #endif zeromq-2.2.0.orig/src/xreq.cpp0000664000000000000000000000337711732125604014754 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "xreq.hpp" #include "err.hpp" zmq::xreq_t::xreq_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), fq (this), lb (this) { options.type = ZMQ_XREQ; options.requires_in = true; options.requires_out = true; } zmq::xreq_t::~xreq_t () { } void zmq::xreq_t::xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (inpipe_ && outpipe_); fq.attach (inpipe_); lb.attach (outpipe_); } void zmq::xreq_t::process_term (int linger_) { fq.terminate (); lb.terminate (); socket_base_t::process_term (linger_); } int zmq::xreq_t::xsend (zmq_msg_t *msg_, int flags_) { return lb.send (msg_, flags_); } int zmq::xreq_t::xrecv (zmq_msg_t *msg_, int flags_) { return fq.recv (msg_, flags_); } bool zmq::xreq_t::xhas_in () { return fq.has_in (); } bool zmq::xreq_t::xhas_out () { return lb.has_out (); } zeromq-2.2.0.orig/src/pull.hpp0000664000000000000000000000313111732125604014742 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PULL_HPP_INCLUDED__ #define __ZMQ_PULL_HPP_INCLUDED__ #include "socket_base.hpp" #include "fq.hpp" namespace zmq { class pull_t : public socket_base_t { public: pull_t (class ctx_t *parent_, uint32_t tid_); ~pull_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); private: // Hook into the termination process. void process_term (int linger_); // Fair queueing object for inbound pipes. fq_t fq; pull_t (const pull_t&); const pull_t &operator = (const pull_t&); }; } #endif zeromq-2.2.0.orig/src/pipe.hpp0000664000000000000000000001515411732125604014733 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PIPE_HPP_INCLUDED__ #define __ZMQ_PIPE_HPP_INCLUDED__ #include "../include/zmq.h" #include "stdint.hpp" #include "array.hpp" #include "ypipe.hpp" #include "swap.hpp" #include "config.hpp" #include "object.hpp" namespace zmq { // Creates a pipe. Returns pointer to reader and writer objects. void create_pipe (object_t *reader_parent_, object_t *writer_parent_, uint64_t hwm_, int64_t swap_size_, class reader_t **reader_, class writer_t **writer_); // The shutdown mechanism for pipe works as follows: Either endpoint // (or even both of them) can ask pipe to terminate by calling 'terminate' // method. Pipe then terminates in asynchronous manner. When the part of // the shutdown tied to the endpoint is done it triggers 'terminated' // event. When endpoint processes the event and returns, associated // reader/writer object is deallocated. typedef ypipe_t pipe_t; struct i_reader_events { virtual ~i_reader_events () {} virtual void terminated (class reader_t *pipe_) = 0; virtual void activated (class reader_t *pipe_) = 0; virtual void delimited (class reader_t *pipe_) = 0; }; class reader_t : public object_t, public array_item_t { friend void create_pipe (object_t*, object_t*, uint64_t, int64_t, reader_t**, writer_t**); friend class writer_t; public: // Specifies the object to get events from the reader. void set_event_sink (i_reader_events *endpoint_); // Returns true if there is at least one message to read in the pipe. bool check_read (); // Reads a message to the underlying pipe. bool read (zmq_msg_t *msg_); // Ask pipe to terminate. void terminate (); private: reader_t (class object_t *parent_, pipe_t *pipe_, uint64_t lwm_); ~reader_t (); // To be called only by writer itself! void set_writer (class writer_t *writer_); // Command handlers. void process_activate_reader (); void process_pipe_term_ack (); // Returns true if the message is delimiter; false otherwise. static bool is_delimiter (zmq_msg_t &msg_); // True, if pipe can be read from. bool active; // The underlying pipe. pipe_t *pipe; // Pipe writer associated with the other side of the pipe. class writer_t *writer; // Low watermark for in-memory storage (in bytes). uint64_t lwm; // Number of messages read so far. uint64_t msgs_read; // Sink for the events (either the socket of the session). i_reader_events *sink; // True is 'terminate' method was called or delimiter // was read from the pipe. bool terminating; reader_t (const reader_t&); const reader_t &operator = (const reader_t&); }; struct i_writer_events { virtual ~i_writer_events () {} virtual void terminated (class writer_t *pipe_) = 0; virtual void activated (class writer_t *pipe_) = 0; }; class writer_t : public object_t, public array_item_t { friend void create_pipe (object_t*, object_t*, uint64_t, int64_t, reader_t**, writer_t**); public: // Specifies the object to get events from the writer. void set_event_sink (i_writer_events *endpoint_); // Checks whether messages can be written to the pipe. // If writing the message would cause high watermark and (optionally) // if the swap is full, the function returns false. bool check_write (zmq_msg_t *msg_); // Writes a message to the underlying pipe. Returns false if the // message cannot be written because high watermark was reached. bool write (zmq_msg_t *msg_); // Remove unfinished part of a message from the pipe. void rollback (); // Flush the messages downsteam. void flush (); // Ask pipe to terminate. void terminate (); private: writer_t (class object_t *parent_, pipe_t *pipe_, reader_t *reader_, uint64_t hwm_, int64_t swap_size_); ~writer_t (); // Command handlers. void process_activate_writer (uint64_t msgs_read_); void process_pipe_term (); // Tests whether underlying pipe is already full. The swap is not // taken into account. bool pipe_full (); // True, if this object can be written to. Undelying ypipe may be full // but as long as there's swap space available, this flag is true. bool active; // The underlying pipe. pipe_t *pipe; // Pipe reader associated with the other side of the pipe. reader_t *reader; // High watermark for in-memory storage (in bytes). uint64_t hwm; // Last confirmed number of messages read from the pipe. // The actual number can be higher. uint64_t msgs_read; // Number of messages we have written so far. uint64_t msgs_written; // Pointer to the message swap. If NULL, messages are always // kept in main memory. swap_t *swap; // Sink for the events (either the socket or the session). i_writer_events *sink; // If true, swap is active. New messages are to be written to the swap. bool swapping; // If true, there's a delimiter to be written to the pipe after the // swap is empied. bool pending_delimiter; // True is 'terminate' method was called of 'pipe_term' command // arrived from the reader. bool terminating; writer_t (const writer_t&); const writer_t &operator = (const writer_t&); }; } #endif zeromq-2.2.0.orig/src/trie.hpp0000664000000000000000000000310011732125604014725 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2011-2012 Spotify AB Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TRIE_HPP_INCLUDED__ #define __ZMQ_TRIE_HPP_INCLUDED__ #include #include "stdint.hpp" namespace zmq { class trie_t { public: trie_t (); ~trie_t (); void add (unsigned char *prefix_, size_t size_); bool rm (unsigned char *prefix_, size_t size_); bool check (unsigned char *data_, size_t size_); private: bool is_redundant () const; uint32_t refcnt; unsigned char min; unsigned short count; unsigned short live_nodes; union { class trie_t *node; class trie_t **table; } next; trie_t (const trie_t&); const trie_t &operator = (const trie_t&); }; } #endif zeromq-2.2.0.orig/src/io_thread.cpp0000664000000000000000000000500511732125604015721 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "../include/zmq.h" #include "io_thread.hpp" #include "platform.hpp" #include "err.hpp" #include "ctx.hpp" zmq::io_thread_t::io_thread_t (ctx_t *ctx_, uint32_t tid_) : object_t (ctx_, tid_) { poller = new (std::nothrow) poller_t; alloc_assert (poller); mailbox_handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (mailbox_handle); } zmq::io_thread_t::~io_thread_t () { delete poller; } void zmq::io_thread_t::start () { // Start the underlying I/O thread. poller->start (); } void zmq::io_thread_t::stop () { send_stop (); } zmq::mailbox_t *zmq::io_thread_t::get_mailbox () { return &mailbox; } int zmq::io_thread_t::get_load () { return poller->get_load (); } void zmq::io_thread_t::in_event () { // TODO: Do we want to limit number of commands I/O thread can // process in a single go? while (true) { // Get the next command. If there is none, exit. command_t cmd; int rc = mailbox.recv (&cmd, 0); if (rc != 0 && errno == EINTR) continue; if (rc != 0 && errno == EAGAIN) break; errno_assert (rc == 0); // Process the command. cmd.destination->process_command (cmd); } } void zmq::io_thread_t::out_event () { // We are never polling for POLLOUT here. This function is never called. zmq_assert (false); } void zmq::io_thread_t::timer_event (int id_) { // No timers here. This function is never called. zmq_assert (false); } zmq::poller_t *zmq::io_thread_t::get_poller () { zmq_assert (poller); return poller; } void zmq::io_thread_t::process_stop () { poller->rm_fd (mailbox_handle); poller->stop (); } zeromq-2.2.0.orig/src/likely.hpp0000664000000000000000000000205511732125604015263 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_LIKELY_HPP_INCLUDED__ #define __ZMQ_LIKELY_HPP_INCLUDED__ #if defined __GNUC__ #define likely(x) __builtin_expect ((x), 1) #define unlikely(x) __builtin_expect ((x), 0) #else #define likely(x) (x) #define unlikely(x) (x) #endif #endif zeromq-2.2.0.orig/src/thread.cpp0000664000000000000000000000460511732125604015237 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "thread.hpp" #include "err.hpp" #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS extern "C" { static unsigned int __stdcall thread_routine (void *arg_) { zmq::thread_t *self = (zmq::thread_t*) arg_; self->tfn (self->arg); return 0; } } void zmq::thread_t::start (thread_fn *tfn_, void *arg_) { tfn = tfn_; arg =arg_; descriptor = (HANDLE) _beginthreadex (NULL, 0, &::thread_routine, this, 0 , NULL); win_assert (descriptor != NULL); } void zmq::thread_t::stop () { DWORD rc = WaitForSingleObject (descriptor, INFINITE); win_assert (rc != WAIT_FAILED); BOOL rc2 = CloseHandle (descriptor); win_assert (rc2 != 0); } #else #include extern "C" { static void *thread_routine (void *arg_) { #if !defined ZMQ_HAVE_OPENVMS // Following code will guarantee more predictable latecnies as it'll // disallow any signal handling in the I/O thread. sigset_t signal_set; int rc = sigfillset (&signal_set); errno_assert (rc == 0); # if !defined ZMQ_HAVE_ANDROID rc = pthread_sigmask (SIG_BLOCK, &signal_set, NULL); posix_assert (rc); # endif #endif zmq::thread_t *self = (zmq::thread_t*) arg_; self->tfn (self->arg); return NULL; } } void zmq::thread_t::start (thread_fn *tfn_, void *arg_) { tfn = tfn_; arg =arg_; int rc = pthread_create (&descriptor, NULL, thread_routine, this); posix_assert (rc); } void zmq::thread_t::stop () { int rc = pthread_join (descriptor, NULL); posix_assert (rc); } #endif zeromq-2.2.0.orig/src/clock.hpp0000664000000000000000000000321311732125604015062 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CLOCK_HPP_INCLUDED__ #define __ZMQ_CLOCK_HPP_INCLUDED__ #include "stdint.hpp" namespace zmq { class clock_t { public: clock_t (); ~clock_t (); // CPU's timestamp counter. Returns 0 if it's not available. static uint64_t rdtsc (); // High precision timestamp. static uint64_t now_us (); // Low precision timestamp. In tight loops generating it can be // 10 to 100 times faster than the high precision timestamp. uint64_t now_ms (); private: // TSC timestamp of when last time measurement was made. uint64_t last_tsc; // Physical time corresponding to the TSC above (in milliseconds). uint64_t last_time; clock_t (const clock_t&); const clock_t &operator = (const clock_t&); }; } #endif zeromq-2.2.0.orig/src/req.cpp0000664000000000000000000000607711732125604014564 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "req.hpp" #include "err.hpp" zmq::req_t::req_t (class ctx_t *parent_, uint32_t tid_) : xreq_t (parent_, tid_), receiving_reply (false), message_begins (true) { options.type = ZMQ_REQ; } zmq::req_t::~req_t () { } int zmq::req_t::xsend (zmq_msg_t *msg_, int flags_) { // If we've sent a request and we still haven't got the reply, // we can't send another request. if (receiving_reply) { errno = EFSM; return -1; } // First part of the request is empty message part (stack bottom). if (message_begins) { zmq_msg_t prefix; int rc = zmq_msg_init (&prefix); zmq_assert (rc == 0); prefix.flags |= ZMQ_MSG_MORE; rc = xreq_t::xsend (&prefix, flags_); if (rc != 0) return rc; message_begins = false; } bool more = msg_->flags & ZMQ_MSG_MORE; int rc = xreq_t::xsend (msg_, flags_); if (rc != 0) return rc; // If the request was fully sent, flip the FSM into reply-receiving state. if (!more) { receiving_reply = true; message_begins = true; } return 0; } int zmq::req_t::xrecv (zmq_msg_t *msg_, int flags_) { // If request wasn't send, we can't wait for reply. if (!receiving_reply) { errno = EFSM; return -1; } // First part of the reply should be empty message part (stack bottom). if (message_begins) { int rc = xreq_t::xrecv (msg_, flags_); if (rc != 0) return rc; // TODO: this should also close the connection with the peer if (!(msg_->flags & ZMQ_MSG_MORE) || zmq_msg_size (msg_) != 0) { errno = EAGAIN; return -1; } message_begins = false; } int rc = xreq_t::xrecv (msg_, flags_); if (rc != 0) return rc; // If the reply is fully received, flip the FSM into request-sending state. if (!(msg_->flags & ZMQ_MSG_MORE)) { receiving_reply = false; message_begins = true; } return 0; } bool zmq::req_t::xhas_in () { if (!receiving_reply) return false; return xreq_t::xhas_in (); } bool zmq::req_t::xhas_out () { if (receiving_reply) return false; return xreq_t::xhas_out (); } zeromq-2.2.0.orig/src/pgm_receiver.hpp0000664000000000000000000000665111732125604016447 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ #define __ZMQ_PGM_RECEIVER_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include "io_object.hpp" #include "i_engine.hpp" #include "options.hpp" #include "decoder.hpp" #include "pgm_socket.hpp" namespace zmq { class pgm_receiver_t : public io_object_t, public i_engine { public: pgm_receiver_t (class io_thread_t *parent_, const options_t &options_); ~pgm_receiver_t (); int init (bool udp_encapsulation_, const char *network_); // i_engine interface implementation. void plug (class io_thread_t *io_thread_, struct i_inout *inout_); void unplug (); void terminate (); void activate_in (); void activate_out (); // i_poll_events interface implementation. void in_event (); void timer_event (int token); private: // RX timeout timer ID. enum {rx_timer_id = 0xa1}; // RX timer is running. bool has_rx_timer; // If joined is true we are already getting messages from the peer. // It it's false, we are getting data but still we haven't seen // beginning of a message. struct peer_info_t { bool joined; decoder_t *decoder; }; struct tsi_comp { bool operator () (const pgm_tsi_t <si, const pgm_tsi_t &rtsi) const { uint32_t ll[2], rl[2]; memcpy (ll, <si, sizeof (ll)); memcpy (rl, &rtsi, sizeof (rl)); return (ll[0] < rl[0]) || (ll[0] == rl[0] && ll[1] < rl[1]); } }; typedef std::map peers_t; peers_t peers; // PGM socket. pgm_socket_t pgm_socket; // Socket options. options_t options; // Parent session. i_inout *inout; // Most recently used decoder. decoder_t *mru_decoder; // Number of bytes not consumed by the decoder due to pipe overflow. size_t pending_bytes; // Pointer to data still waiting to be processed by the decoder. unsigned char *pending_ptr; // Poll handle associated with PGM socket. handle_t socket_handle; // Poll handle associated with engine PGM waiting pipe. handle_t pipe_handle; pgm_receiver_t (const pgm_receiver_t&); const pgm_receiver_t &operator = (const pgm_receiver_t&); }; } #endif #endif zeromq-2.2.0.orig/src/signaler.hpp0000664000000000000000000000343411732125604015600 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SIGNALER_HPP_INCLUDED__ #define __ZMQ_SIGNALER_HPP_INCLUDED__ #include "fd.hpp" namespace zmq { // This is a cross-platform equivalent to signal_fd. However, as opposed // to signal_fd there can be at most one signal in the signaler at any // given moment. Attempt to send a signal before receiving the previous // one will result in undefined behaviour. class signaler_t { public: signaler_t (); ~signaler_t (); fd_t get_fd (); void send (); int wait (int timeout_); void recv (); private: // Creates a pair of filedescriptors that will be used // to pass the signals. static int make_fdpair (fd_t *r_, fd_t *w_); // Write & read end of the socketpair. fd_t w; fd_t r; // Disable copying of signaler_t object. signaler_t (const signaler_t&); const signaler_t &operator = (const signaler_t&); }; } #endif zeromq-2.2.0.orig/src/pgm_receiver.cpp0000664000000000000000000001610411732125604016434 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #include #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "pgm_receiver.hpp" #include "err.hpp" #include "stdint.hpp" #include "wire.hpp" #include "i_inout.hpp" zmq::pgm_receiver_t::pgm_receiver_t (class io_thread_t *parent_, const options_t &options_) : io_object_t (parent_), has_rx_timer (false), pgm_socket (true, options_), options (options_), inout (NULL), mru_decoder (NULL), pending_bytes (0) { } zmq::pgm_receiver_t::~pgm_receiver_t () { // Destructor should not be called before unplug. zmq_assert (peers.empty ()); } int zmq::pgm_receiver_t::init (bool udp_encapsulation_, const char *network_) { return pgm_socket.init (udp_encapsulation_, network_); } void zmq::pgm_receiver_t::plug (io_thread_t *io_thread_, i_inout *inout_) { // Retrieve PGM fds and start polling. fd_t socket_fd = retired_fd; fd_t waiting_pipe_fd = retired_fd; pgm_socket.get_receiver_fds (&socket_fd, &waiting_pipe_fd); socket_handle = add_fd (socket_fd); pipe_handle = add_fd (waiting_pipe_fd); set_pollin (pipe_handle); set_pollin (socket_handle); inout = inout_; } void zmq::pgm_receiver_t::unplug () { // Delete decoders. for (peers_t::iterator it = peers.begin (); it != peers.end (); ++it) { if (it->second.decoder != NULL) delete it->second.decoder; } peers.clear (); mru_decoder = NULL; pending_bytes = 0; if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } rm_fd (socket_handle); rm_fd (pipe_handle); inout = NULL; } void zmq::pgm_receiver_t::terminate () { unplug (); delete this; } void zmq::pgm_receiver_t::activate_out () { zmq_assert (false); } void zmq::pgm_receiver_t::activate_in () { // It is possible that the most recently used decoder // processed the whole buffer but failed to write // the last message into the pipe. if (pending_bytes == 0) { if (mru_decoder != NULL) mru_decoder->process_buffer (NULL, 0); return; } zmq_assert (mru_decoder != NULL); zmq_assert (pending_ptr != NULL); // Ask the decoder to process remaining data. size_t n = mru_decoder->process_buffer (pending_ptr, pending_bytes); pending_bytes -= n; if (pending_bytes > 0) return; // Resume polling. set_pollin (pipe_handle); set_pollin (socket_handle); in_event (); } void zmq::pgm_receiver_t::in_event () { // Read data from the underlying pgm_socket. unsigned char *data = NULL; const pgm_tsi_t *tsi = NULL; zmq_assert (pending_bytes == 0); if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } // TODO: This loop can effectively block other engines in the same I/O // thread in the case of high load. while (true) { // Get new batch of data. // Note the workaround made not to break strict-aliasing rules. void *tmp = NULL; ssize_t received = pgm_socket.receive (&tmp, &tsi); data = (unsigned char*) tmp; // No data to process. This may happen if the packet received is // neither ODATA nor ODATA. if (received == 0) { if (errno == ENOMEM || errno == EBUSY) { const long timeout = pgm_socket.get_rx_timeout (); add_timer (timeout, rx_timer_id); has_rx_timer = true; } break; } // Find the peer based on its TSI. peers_t::iterator it = peers.find (*tsi); // Data loss. Delete decoder and mark the peer as disjoint. if (received == -1) { if (it != peers.end ()) { it->second.joined = false; if (it->second.decoder == mru_decoder) mru_decoder = NULL; if (it->second.decoder != NULL) { delete it->second.decoder; it->second.decoder = NULL; } } break; } // New peer. Add it to the list of know but unjoint peers. if (it == peers.end ()) { peer_info_t peer_info = {false, NULL}; it = peers.insert (peers_t::value_type (*tsi, peer_info)).first; } // Read the offset of the fist message in the current packet. zmq_assert ((size_t) received >= sizeof (uint16_t)); uint16_t offset = get_uint16 (data); data += sizeof (uint16_t); received -= sizeof (uint16_t); // Join the stream if needed. if (!it->second.joined) { // There is no beginning of the message in current packet. // Ignore the data. if (offset == 0xffff) continue; zmq_assert (offset <= received); zmq_assert (it->second.decoder == NULL); // We have to move data to the begining of the first message. data += offset; received -= offset; // Mark the stream as joined. it->second.joined = true; // Create and connect decoder for the peer. it->second.decoder = new (std::nothrow) decoder_t (0); alloc_assert (it->second.decoder); it->second.decoder->set_inout (inout); } mru_decoder = it->second.decoder; // Push all the data to the decoder. ssize_t processed = it->second.decoder->process_buffer (data, received); if (processed < received) { // Save some state so we can resume the decoding process later. pending_bytes = received - processed; pending_ptr = data + processed; // Stop polling. reset_pollin (pipe_handle); reset_pollin (socket_handle); // Reset outstanding timer. if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } break; } } // Flush any messages decoder may have produced. inout->flush (); } void zmq::pgm_receiver_t::timer_event (int token) { zmq_assert (token == rx_timer_id); // Timer cancels on return by poller_base. has_rx_timer = false; in_event (); } #endif zeromq-2.2.0.orig/src/tcp_listener.hpp0000664000000000000000000000405111732125604016463 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_LISTENER_HPP_INCLUDED__ #define __ZMQ_TCP_LISTENER_HPP_INCLUDED__ #include "fd.hpp" #include "ip.hpp" namespace zmq { // The class encapsulating simple TCP listening socket. class tcp_listener_t { public: tcp_listener_t (); ~tcp_listener_t (); // Start listening on the interface. int set_address (const char *protocol_, const char *addr_, int backlog_); // Close the listening socket. int close (); // Get the file descriptor to poll on to get notified about // newly created connections. fd_t get_fd (); // Accept the new connection. Returns the file descriptor of the // newly created connection. The function may return retired_fd // if the connection was dropped while waiting in the listen backlog. fd_t accept (); private: // Address to listen on. sockaddr_storage addr; socklen_t addr_len; // True, if the undelying file for UNIX domain socket exists. bool has_file; // Underlying socket. fd_t s; tcp_listener_t (const tcp_listener_t&); const tcp_listener_t &operator = (const tcp_listener_t&); }; } #endif zeromq-2.2.0.orig/src/object.hpp0000664000000000000000000001117711732125604015245 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_OBJECT_HPP_INCLUDED__ #define __ZMQ_OBJECT_HPP_INCLUDED__ #include "../include/zmq.h" #include "stdint.hpp" #include "blob.hpp" namespace zmq { // Base class for all objects that participate in inter-thread // communication. class object_t { public: object_t (class ctx_t *ctx_, uint32_t tid_); object_t (object_t *parent_); virtual ~object_t (); uint32_t get_tid (); ctx_t *get_ctx (); void process_command (struct command_t &cmd_); protected: // Using following function, socket is able to access global // repository of inproc endpoints. int register_endpoint (const char *addr_, struct endpoint_t &endpoint_); void unregister_endpoints (class socket_base_t *socket_); struct endpoint_t find_endpoint (const char *addr_); void destroy_socket (class socket_base_t *socket_); // Logs an message. void log (const char *format_, ...); // Chooses least loaded I/O thread. class io_thread_t *choose_io_thread (uint64_t affinity_); // Derived object can use these functions to send commands // to other objects. void send_stop (); void send_plug (class own_t *destination_, bool inc_seqnum_ = true); void send_own (class own_t *destination_, class own_t *object_); void send_attach (class session_t *destination_, struct i_engine *engine_, const blob_t &peer_identity_, bool inc_seqnum_ = true); void send_bind (class own_t *destination_, class reader_t *in_pipe_, class writer_t *out_pipe_, const blob_t &peer_identity_, bool inc_seqnum_ = true); void send_activate_reader (class reader_t *destination_); void send_activate_writer (class writer_t *destination_, uint64_t msgs_read_); void send_pipe_term (class writer_t *destination_); void send_pipe_term_ack (class reader_t *destination_); void send_term_req (class own_t *destination_, class own_t *object_); void send_term (class own_t *destination_, int linger_); void send_term_ack (class own_t *destination_); void send_reap (class socket_base_t *socket_); void send_reaped (); void send_done (); // These handlers can be overloaded by the derived objects. They are // called when command arrives from another thread. virtual void process_stop (); virtual void process_plug (); virtual void process_own (class own_t *object_); virtual void process_attach (struct i_engine *engine_, const blob_t &peer_identity_); virtual void process_bind (class reader_t *in_pipe_, class writer_t *out_pipe_, const blob_t &peer_identity_); virtual void process_activate_reader (); virtual void process_activate_writer (uint64_t msgs_read_); virtual void process_pipe_term (); virtual void process_pipe_term_ack (); virtual void process_term_req (class own_t *object_); virtual void process_term (int linger_); virtual void process_term_ack (); virtual void process_reap (class socket_base_t *socket_); virtual void process_reaped (); // Special handler called after a command that requires a seqnum // was processed. The implementation should catch up with its counter // of processed commands here. virtual void process_seqnum (); private: // Context provides access to the global state. class ctx_t *ctx; // Thread ID of the thread the object belongs to. uint32_t tid; void send_command (command_t &cmd_); object_t (const object_t&); const object_t &operator = (const object_t&); }; } #endif zeromq-2.2.0.orig/src/decoder.cpp0000664000000000000000000000761211732125604015376 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "decoder.hpp" #include "i_inout.hpp" #include "wire.hpp" #include "err.hpp" zmq::decoder_t::decoder_t (size_t bufsize_) : decoder_base_t (bufsize_), destination (NULL) { zmq_msg_init (&in_progress); // At the beginning, read one byte and go to one_byte_size_ready state. next_step (tmpbuf, 1, &decoder_t::one_byte_size_ready); } zmq::decoder_t::~decoder_t () { zmq_msg_close (&in_progress); } void zmq::decoder_t::set_inout (i_inout *destination_) { destination = destination_; } bool zmq::decoder_t::one_byte_size_ready () { // First byte of size is read. If it is 0xff read 8-byte size. // Otherwise allocate the buffer for message data and read the // message data into it. if (*tmpbuf == 0xff) next_step (tmpbuf, 8, &decoder_t::eight_byte_size_ready); else { // There has to be at least one byte (the flags) in the message). if (!*tmpbuf) { decoding_error (); return false; } // in_progress is initialised at this point so in theory we should // close it before calling zmq_msg_init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised... int rc = zmq_msg_init_size (&in_progress, *tmpbuf - 1); if (rc != 0 && errno == ENOMEM) { rc = zmq_msg_init (&in_progress); errno_assert (rc == 0); decoding_error (); return false; } errno_assert (rc == 0); next_step (tmpbuf, 1, &decoder_t::flags_ready); } return true; } bool zmq::decoder_t::eight_byte_size_ready () { // 8-byte size is read. Allocate the buffer for message body and // read the message data into it. size_t size = (size_t) get_uint64 (tmpbuf); // There has to be at least one byte (the flags) in the message). if (!size) { decoding_error (); return false; } // in_progress is initialised at this point so in theory we should // close it before calling zmq_msg_init_size, however, it's a 0-byte // message and thus we can treat it as uninitialised... int rc = zmq_msg_init_size (&in_progress, size - 1); if (rc != 0 && errno == ENOMEM) { rc = zmq_msg_init (&in_progress); errno_assert (rc == 0); decoding_error (); return false; } errno_assert (rc == 0); next_step (tmpbuf, 1, &decoder_t::flags_ready); return true; } bool zmq::decoder_t::flags_ready () { // Store the flags from the wire into the message structure. in_progress.flags = tmpbuf [0] | ~ZMQ_MSG_MASK; next_step (zmq_msg_data (&in_progress), zmq_msg_size (&in_progress), &decoder_t::message_ready); return true; } bool zmq::decoder_t::message_ready () { // Message is completely read. Push it further and start reading // new message. (in_progress is a 0-byte message after this point.) if (!destination || !destination->write (&in_progress)) return false; next_step (tmpbuf, 1, &decoder_t::one_byte_size_ready); return true; } zeromq-2.2.0.orig/src/err.cpp0000664000000000000000000001703711732125604014563 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "err.hpp" #include "platform.hpp" const char *zmq::errno_to_string (int errno_) { switch (errno_) { #if defined ZMQ_HAVE_WINDOWS case ENOTSUP: return "Not supported"; case EPROTONOSUPPORT: return "Protocol not supported"; case ENOBUFS: return "No buffer space available"; case ENETDOWN: return "Network is down"; case EADDRINUSE: return "Address in use"; case EADDRNOTAVAIL: return "Address not available"; case ECONNREFUSED: return "Connection refused"; case EINPROGRESS: return "Operation in progress"; #endif case EFSM: return "Operation cannot be accomplished in current state"; case ENOCOMPATPROTO: return "The protocol is not compatible with the socket type"; case ETERM: return "Context was terminated"; case EMTHREAD: return "No thread available"; default: #if defined _MSC_VER #pragma warning (push) #pragma warning (disable:4996) #endif return strerror (errno_); #if defined _MSC_VER #pragma warning (pop) #endif } } void zmq::zmq_abort(const char *errmsg_) { #if defined ZMQ_HAVE_WINDOWS // Raise STATUS_FATAL_APP_EXIT. ULONG_PTR extra_info [1]; extra_info [0] = (ULONG_PTR) errmsg_; RaiseException (0x40000015, EXCEPTION_NONCONTINUABLE, 1, extra_info); #else abort (); #endif } #ifdef ZMQ_HAVE_WINDOWS const char *zmq::wsa_error() { int no = WSAGetLastError (); // TODO: This is not a generic way to handle this... if (no == WSAEWOULDBLOCK) return NULL; return wsa_error_no (no); } const char *zmq::wsa_error_no (int no_) { // TODO: It seems that list of Windows socket errors is longer than this. // Investigate whether there's a way to convert it into the string // automatically (wsaError->HRESULT->string?). return (no_ == WSABASEERR) ? "No Error" : (no_ == WSAEINTR) ? "Interrupted system call" : (no_ == WSAEBADF) ? "Bad file number" : (no_ == WSAEACCES) ? "Permission denied" : (no_ == WSAEFAULT) ? "Bad address" : (no_ == WSAEINVAL) ? "Invalid argument" : (no_ == WSAEMFILE) ? "Too many open files" : (no_ == WSAEWOULDBLOCK) ? "Operation would block" : (no_ == WSAEINPROGRESS) ? "Operation now in progress" : (no_ == WSAEALREADY) ? "Operation already in progress" : (no_ == WSAENOTSOCK) ? "Socket operation on non-socket" : (no_ == WSAEDESTADDRREQ) ? "Destination address required" : (no_ == WSAEMSGSIZE) ? "Message too long" : (no_ == WSAEPROTOTYPE) ? "Protocol wrong type for socket" : (no_ == WSAENOPROTOOPT) ? "Bad protocol option" : (no_ == WSAEPROTONOSUPPORT) ? "Protocol not supported" : (no_ == WSAESOCKTNOSUPPORT) ? "Socket type not supported" : (no_ == WSAEOPNOTSUPP) ? "Operation not supported on socket" : (no_ == WSAEPFNOSUPPORT) ? "Protocol family not supported" : (no_ == WSAEAFNOSUPPORT) ? "Address family not supported by protocol family" : (no_ == WSAEADDRINUSE) ? "Address already in use" : (no_ == WSAEADDRNOTAVAIL) ? "Can't assign requested address" : (no_ == WSAENETDOWN) ? "Network is down" : (no_ == WSAENETUNREACH) ? "Network is unreachable" : (no_ == WSAENETRESET) ? "Net dropped connection or reset" : (no_ == WSAECONNABORTED) ? "Software caused connection abort" : (no_ == WSAECONNRESET) ? "Connection reset by peer" : (no_ == WSAENOBUFS) ? "No buffer space available" : (no_ == WSAEISCONN) ? "Socket is already connected" : (no_ == WSAENOTCONN) ? "Socket is not connected" : (no_ == WSAESHUTDOWN) ? "Can't send after socket shutdown" : (no_ == WSAETOOMANYREFS) ? "Too many references can't splice" : (no_ == WSAETIMEDOUT) ? "Connection timed out" : (no_ == WSAECONNREFUSED) ? "Connection refused" : (no_ == WSAELOOP) ? "Too many levels of symbolic links" : (no_ == WSAENAMETOOLONG) ? "File name too long" : (no_ == WSAEHOSTDOWN) ? "Host is down" : (no_ == WSAEHOSTUNREACH) ? "No Route to Host" : (no_ == WSAENOTEMPTY) ? "Directory not empty" : (no_ == WSAEPROCLIM) ? "Too many processes" : (no_ == WSAEUSERS) ? "Too many users" : (no_ == WSAEDQUOT) ? "Disc Quota Exceeded" : (no_ == WSAESTALE) ? "Stale NFS file handle" : (no_ == WSAEREMOTE) ? "Too many levels of remote in path" : (no_ == WSASYSNOTREADY) ? "Network SubSystem is unavailable" : (no_ == WSAVERNOTSUPPORTED) ? "WINSOCK DLL Version out of range" : (no_ == WSANOTINITIALISED) ? "Successful WSASTARTUP not yet performed" : (no_ == WSAHOST_NOT_FOUND) ? "Host not found" : (no_ == WSATRY_AGAIN) ? "Non-Authoritative Host not found" : (no_ == WSANO_RECOVERY) ? "Non-Recoverable errors: FORMERR REFUSED NOTIMP" : (no_ == WSANO_DATA) ? "Valid name no data record of requested" : "error not defined"; } void zmq::win_error (char *buffer_, size_t buffer_size_) { DWORD errcode = GetLastError (); DWORD rc = FormatMessageA (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, errcode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buffer_, buffer_size_, NULL ); zmq_assert (rc); } void zmq::wsa_error_to_errno () { int errcode = WSAGetLastError (); switch (errcode) { case WSAEINPROGRESS: errno = EAGAIN; return; case WSAEBADF: errno = EBADF; return; case WSAEINVAL: errno = EINVAL; return; case WSAEMFILE: errno = EMFILE; return; case WSAEFAULT: errno = EFAULT; return; case WSAEPROTONOSUPPORT: errno = EPROTONOSUPPORT; return; case WSAENOBUFS: errno = ENOBUFS; return; case WSAENETDOWN: errno = ENETDOWN; return; case WSAEADDRINUSE: errno = EADDRINUSE; return; case WSAEADDRNOTAVAIL: errno = EADDRNOTAVAIL; return; default: wsa_assert (false); } } #endif zeromq-2.2.0.orig/src/xrep.cpp0000664000000000000000000002271011732125604014743 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "xrep.hpp" #include "err.hpp" #include "pipe.hpp" zmq::xrep_t::xrep_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), current_in (0), prefetched (false), more_in (false), current_out (NULL), more_out (false), terminating (false) { options.type = ZMQ_XREP; options.requires_in = true; options.requires_out = true; // On connect, pipes are created only after initial handshaking. // That way we are aware of the peer's identity when binding to the pipes. options.immediate_connect = false; } zmq::xrep_t::~xrep_t () { zmq_assert (inpipes.empty ()); zmq_assert (outpipes.empty ()); } void zmq::xrep_t::xattach_pipes (reader_t *inpipe_, writer_t *outpipe_, const blob_t &peer_identity_) { if (outpipe_) { outpipe_->set_event_sink (this); // TODO: What if new connection has same peer identity as the old one? outpipe_t outpipe = {outpipe_, true}; bool ok = outpipes.insert (outpipes_t::value_type ( peer_identity_, outpipe)).second; zmq_assert (ok); if (terminating) { register_term_acks (1); outpipe_->terminate (); } } if (inpipe_) { inpipe_->set_event_sink (this); inpipe_t inpipe = {inpipe_, peer_identity_, true}; inpipes.push_back (inpipe); if (terminating) { register_term_acks (1); inpipe_->terminate (); } } } void zmq::xrep_t::process_term (int linger_) { terminating = true; register_term_acks (inpipes.size () + outpipes.size ()); for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); ++it) it->reader->terminate (); for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end (); ++it) it->second.writer->terminate (); socket_base_t::process_term (linger_); } void zmq::xrep_t::terminated (reader_t *pipe_) { for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); ++it) { if (it->reader == pipe_) { if ((inpipes_t::size_type) (it - inpipes.begin ()) < current_in) current_in--; inpipes.erase (it); if (current_in >= inpipes.size ()) current_in = 0; if (terminating) unregister_term_ack (); return; } } zmq_assert (false); } void zmq::xrep_t::terminated (writer_t *pipe_) { for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end (); ++it) { if (it->second.writer == pipe_) { outpipes.erase (it); if (pipe_ == current_out) current_out = NULL; if (terminating) unregister_term_ack (); return; } } zmq_assert (false); } void zmq::xrep_t::delimited (reader_t *pipe_) { } void zmq::xrep_t::activated (reader_t *pipe_) { for (inpipes_t::iterator it = inpipes.begin (); it != inpipes.end (); ++it) { if (it->reader == pipe_) { zmq_assert (!it->active); it->active = true; return; } } zmq_assert (false); } void zmq::xrep_t::activated (writer_t *pipe_) { for (outpipes_t::iterator it = outpipes.begin (); it != outpipes.end (); ++it) { if (it->second.writer == pipe_) { zmq_assert (!it->second.active); it->second.active = true; return; } } zmq_assert (false); } int zmq::xrep_t::xsend (zmq_msg_t *msg_, int flags_) { // If this is the first part of the message it's the identity of the // peer to send the message to. if (!more_out) { zmq_assert (!current_out); // If we have malformed message (prefix with no subsequent message) // then just silently ignore it. if (msg_->flags & ZMQ_MSG_MORE) { more_out = true; // Find the pipe associated with the identity stored in the prefix. // If there's no such pipe just silently ignore the message. blob_t identity ((unsigned char*) zmq_msg_data (msg_), zmq_msg_size (msg_)); outpipes_t::iterator it = outpipes.find (identity); if (it != outpipes.end ()) { current_out = it->second.writer; zmq_msg_t empty; int rc = zmq_msg_init (&empty); zmq_assert (rc == 0); if (!current_out->check_write (&empty)) { it->second.active = false; more_out = false; current_out = NULL; } rc = zmq_msg_close (&empty); zmq_assert (rc == 0); } } int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } // Check whether this is the last part of the message. more_out = msg_->flags & ZMQ_MSG_MORE; // Push the message into the pipe. If there's no out pipe, just drop it. if (current_out) { bool ok = current_out->write (msg_); zmq_assert (ok); if (!more_out) { current_out->flush (); current_out = NULL; } } else { int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); } // Detach the message from the data buffer. int rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } int zmq::xrep_t::xrecv (zmq_msg_t *msg_, int flags_) { // If there is a prefetched message, return it. if (prefetched) { zmq_msg_move (msg_, &prefetched_msg); more_in = msg_->flags & ZMQ_MSG_MORE; prefetched = false; return 0; } // Deallocate old content of the message. zmq_msg_close (msg_); // If we are in the middle of reading a message, just grab next part of it. if (more_in) { zmq_assert (inpipes [current_in].active); bool fetched = inpipes [current_in].reader->read (msg_); zmq_assert (fetched); more_in = msg_->flags & ZMQ_MSG_MORE; if (!more_in) { current_in++; if (current_in >= inpipes.size ()) current_in = 0; } return 0; } // Round-robin over the pipes to get the next message. for (int count = inpipes.size (); count != 0; count--) { // Try to fetch new message. if (inpipes [current_in].active) prefetched = inpipes [current_in].reader->read (&prefetched_msg); // If we have a message, create a prefix and return it to the caller. if (prefetched) { int rc = zmq_msg_init_size (msg_, inpipes [current_in].identity.size ()); zmq_assert (rc == 0); memcpy (zmq_msg_data (msg_), inpipes [current_in].identity.data (), zmq_msg_size (msg_)); msg_->flags |= ZMQ_MSG_MORE; return 0; } // If me don't have a message, mark the pipe as passive and // move to next pipe. inpipes [current_in].active = false; current_in++; if (current_in >= inpipes.size ()) current_in = 0; } // No message is available. Initialise the output parameter // to be a 0-byte message. zmq_msg_init (msg_); errno = EAGAIN; return -1; } int zmq::xrep_t::rollback (void) { if (current_out) { current_out->rollback (); current_out = NULL; more_out = false; } return 0; } bool zmq::xrep_t::xhas_in () { // There are subsequent parts of the partly-read message available. if (prefetched || more_in) return true; // Note that messing with current doesn't break the fairness of fair // queueing algorithm. If there are no messages available current will // get back to its original value. Otherwise it'll point to the first // pipe holding messages, skipping only pipes with no messages available. for (int count = inpipes.size (); count != 0; count--) { if (inpipes [current_in].active && inpipes [current_in].reader->check_read ()) return true; // If me don't have a message, mark the pipe as passive and // move to next pipe. inpipes [current_in].active = false; current_in++; if (current_in >= inpipes.size ()) current_in = 0; } return false; } bool zmq::xrep_t::xhas_out () { // In theory, XREP socket is always ready for writing. Whether actual // attempt to write succeeds depends on whitch pipe the message is going // to be routed to. return true; } zeromq-2.2.0.orig/src/ctx.hpp0000664000000000000000000001172111732125604014570 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CTX_HPP_INCLUDED__ #define __ZMQ_CTX_HPP_INCLUDED__ #include #include #include #include #include "../include/zmq.h" #include "mailbox.hpp" #include "semaphore.hpp" #include "ypipe.hpp" #include "array.hpp" #include "config.hpp" #include "mutex.hpp" #include "stdint.hpp" #include "thread.hpp" #include "options.hpp" namespace zmq { // Information associated with inproc endpoint. Note that endpoint options // are registered as well so that the peer can access them without a need // for synchronisation, handshaking or similar. struct endpoint_t { class socket_base_t *socket; options_t options; }; // Context object encapsulates all the global state associated with // the library. class ctx_t { public: // Create the context object. The argument specifies the size // of I/O thread pool to create. ctx_t (uint32_t io_threads_); // Returns false if object is not a context. bool check_tag (); // This function is called when user invokes zmq_term. If there are // no more sockets open it'll cause all the infrastructure to be shut // down. If there are open sockets still, the deallocation happens // after the last one is closed. int terminate (); // Create and destroy a socket. class socket_base_t *create_socket (int type_); void destroy_socket (class socket_base_t *socket_); // Send command to the destination thread. void send_command (uint32_t tid_, const command_t &command_); // Returns the I/O thread that is the least busy at the moment. // Affinity specifies which I/O threads are eligible (0 = all). // Returns NULL is no I/O thread is available. class io_thread_t *choose_io_thread (uint64_t affinity_); // Returns reaper thread object. class object_t *get_reaper (); // Management of inproc endpoints. int register_endpoint (const char *addr_, endpoint_t &endpoint_); void unregister_endpoints (class socket_base_t *socket_); endpoint_t find_endpoint (const char *addr_); // Logging. void log (const char *format_, va_list args_); enum { term_tid = 0, reaper_tid = 1 }; ~ctx_t (); private: // Used to check whether the object is a context. uint32_t tag; // Sockets belonging to this context. We need the list so that // we can notify the sockets when zmq_term() is called. The sockets // will return ETERM then. typedef array_t sockets_t; sockets_t sockets; // List of unused thread slots. typedef std::vector emtpy_slots_t; emtpy_slots_t empty_slots; // If true, zmq_term was already called. bool terminating; // Synchronisation of accesses to global slot-related data: // sockets, empty_slots, terminating. It also synchronises // access to zombie sockets as such (as oposed to slots) and provides // a memory barrier to ensure that all CPU cores see the same data. mutex_t slot_sync; // The reaper thread. class reaper_t *reaper; // I/O threads. typedef std::vector io_threads_t; io_threads_t io_threads; // Array of pointers to mailboxes for both application and I/O threads. uint32_t slot_count; mailbox_t **slots; // Mailbox for zmq_term thread. mailbox_t term_mailbox; // List of inproc endpoints within this context. typedef std::map endpoints_t; endpoints_t endpoints; // Synchronisation of access to the list of inproc endpoints. mutex_t endpoints_sync; // PUB socket for logging. The socket is shared among all the threads, // thus it is synchronised by a mutex. class socket_base_t *log_socket; mutex_t log_sync; ctx_t (const ctx_t&); const ctx_t &operator = (const ctx_t&); }; } #endif zeromq-2.2.0.orig/src/fq.hpp0000664000000000000000000000443511732125604014404 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_FQ_HPP_INCLUDED__ #define __ZMQ_FQ_HPP_INCLUDED__ #include "array.hpp" #include "pipe.hpp" namespace zmq { // Class manages a set of inbound pipes. On receive it performs fair // queueing (RFC970) so that senders gone berserk won't cause denial of // service for decent senders. class fq_t : public i_reader_events { public: fq_t (class own_t *sink_); ~fq_t (); void attach (reader_t *pipe_); void terminate (); int recv (zmq_msg_t *msg_, int flags_); bool has_in (); // i_reader_events implementation. void activated (reader_t *pipe_); void terminated (reader_t *pipe_); void delimited (reader_t *pipe_); private: // Inbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. pipes_t::size_type active; // Index of the next bound pipe to read a message from. pipes_t::size_type current; // If true, part of a multipart message was already received, but // there are following parts still waiting in the current pipe. bool more; // Object to send events to. class own_t *sink; // If true, termination process is already underway. bool terminating; fq_t (const fq_t&); const fq_t &operator = (const fq_t&); }; } #endif zeromq-2.2.0.orig/src/xpub.cpp0000664000000000000000000000346511732125604014751 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "xpub.hpp" #include "err.hpp" #include "pipe.hpp" zmq::xpub_t::xpub_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), dist (this) { options.type = ZMQ_XPUB; options.requires_in = false; options.requires_out = true; } zmq::xpub_t::~xpub_t () { } void zmq::xpub_t::xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (!inpipe_ && outpipe_); dist.attach (outpipe_); } void zmq::xpub_t::process_term (int linger_) { // Terminate the outbound pipes. dist.terminate (); // Continue with the termination immediately. socket_base_t::process_term (linger_); } int zmq::xpub_t::xsend (zmq_msg_t *msg_, int flags_) { return dist.send (msg_, flags_); } bool zmq::xpub_t::xhas_out () { return dist.has_out (); } int zmq::xpub_t::xrecv (zmq_msg_t *msg_, int flags_) { errno = EAGAIN; return -1; } bool zmq::xpub_t::xhas_in () { return false; } zeromq-2.2.0.orig/src/device.cpp0000664000000000000000000000747611732125604015240 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "platform.hpp" // On AIX, poll.h has to be included before zmq.h to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #include #endif #include "../include/zmq.h" #include "device.hpp" #include "socket_base.hpp" #include "likely.hpp" #include "err.hpp" int zmq::device (class socket_base_t *insocket_, class socket_base_t *outsocket_) { zmq_msg_t msg; int rc = zmq_msg_init (&msg); if (rc != 0) { return -1; } int64_t more; size_t moresz; zmq_pollitem_t items [2]; items [0].socket = insocket_; items [0].fd = 0; items [0].events = ZMQ_POLLIN; items [0].revents = 0; items [1].socket = outsocket_; items [1].fd = 0; items [1].events = ZMQ_POLLIN; items [1].revents = 0; while (true) { // Wait while there are either requests or replies to process. rc = zmq_poll (&items [0], 2, -1); if (unlikely (rc < 0)) { return -1; } // The algorithm below asumes ratio of request and replies processed // under full load to be 1:1. Although processing requests replies // first is tempting it is suspectible to DoS attacks (overloading // the system with unsolicited replies). // Process a request. if (items [0].revents & ZMQ_POLLIN) { while (true) { rc = insocket_->recv (&msg, 0); if (unlikely (rc < 0)) { return -1; } moresz = sizeof (more); rc = insocket_->getsockopt (ZMQ_RCVMORE, &more, &moresz); if (unlikely (rc < 0)) { return -1; } rc = outsocket_->send (&msg, more ? ZMQ_SNDMORE : 0); if (unlikely (rc < 0)) { return -1; } if (!more) break; } } // Process a reply. if (items [1].revents & ZMQ_POLLIN) { while (true) { rc = outsocket_->recv (&msg, 0); if (unlikely (rc < 0)) { return -1; } moresz = sizeof (more); rc = outsocket_->getsockopt (ZMQ_RCVMORE, &more, &moresz); if (unlikely (rc < 0)) { return -1; } rc = insocket_->send (&msg, more ? ZMQ_SNDMORE : 0); if (unlikely (rc < 0)) { return -1; } if (!more) break; } } } return 0; } zeromq-2.2.0.orig/src/err.hpp0000664000000000000000000001056511732125604014567 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ERR_HPP_INCLUDED__ #define __ZMQ_ERR_HPP_INCLUDED__ // 0MQ-specific error codes are defined in zmq.h #include "../include/zmq.h" #include #include #include #include #include #include "platform.hpp" #include "likely.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #endif namespace zmq { const char *errno_to_string (int errno_); void zmq_abort (const char *errmsg_); } #ifdef ZMQ_HAVE_WINDOWS namespace zmq { const char *wsa_error (); const char *wsa_error_no (int no_); void win_error (char *buffer_, size_t buffer_size_); void wsa_error_to_errno (); } // Provides convenient way to check WSA-style errors on Windows. #define wsa_assert(x) \ do {\ if (unlikely (!(x))) {\ const char *errstr = zmq::wsa_error ();\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ }\ } while (false) // Provides convenient way to assert on WSA-style errors on Windows. #define wsa_assert_no(no) \ do {\ const char *errstr = zmq::wsa_error_no (no);\ if (errstr != NULL) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check GetLastError-style errors on Windows. #define win_assert(x) \ do {\ if (unlikely (!(x))) {\ char errstr [256];\ zmq::win_error (errstr, 256);\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", errstr, \ __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) #endif // This macro works in exactly the same way as the normal assert. It is used // in its stead because standard assert on Win32 in broken - it prints nothing // when used within the scope of JNI library. #define zmq_assert(x) \ do {\ if (unlikely (!(x))) {\ fprintf (stderr, "Assertion failed: %s (%s:%d)\n", #x, \ __FILE__, __LINE__);\ zmq::zmq_abort (#x);\ }\ } while (false) // Provides convenient way to check for errno-style errors. #define errno_assert(x) \ do {\ if (unlikely (!(x))) {\ const char *errstr = strerror (errno);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check for POSIX errors. #define posix_assert(x) \ do {\ if (unlikely (x)) {\ const char *errstr = strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check for errors from getaddrinfo. #define gai_assert(x) \ do {\ if (unlikely (x)) {\ const char *errstr = gai_strerror (x);\ fprintf (stderr, "%s (%s:%d)\n", errstr, __FILE__, __LINE__);\ zmq::zmq_abort (errstr);\ }\ } while (false) // Provides convenient way to check whether memory allocation have succeeded. #define alloc_assert(x) \ do {\ if (unlikely (!x)) {\ fprintf (stderr, "FATAL ERROR: OUT OF MEMORY (%s:%d)\n",\ __FILE__, __LINE__);\ zmq::zmq_abort ("FATAL ERROR: OUT OF MEMORY");\ }\ } while (false) #endif zeromq-2.2.0.orig/src/io_thread.hpp0000664000000000000000000000475611732125604015742 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IO_THREAD_HPP_INCLUDED__ #define __ZMQ_IO_THREAD_HPP_INCLUDED__ #include #include "stdint.hpp" #include "object.hpp" #include "poller.hpp" #include "i_poll_events.hpp" #include "mailbox.hpp" namespace zmq { // Generic part of the I/O thread. Polling-mechanism-specific features // are implemented in separate "polling objects". class io_thread_t : public object_t, public i_poll_events { public: io_thread_t (class ctx_t *ctx_, uint32_t tid_); // Clean-up. If the thread was started, it's neccessary to call 'stop' // before invoking destructor. Otherwise the destructor would hang up. ~io_thread_t (); // Launch the physical thread. void start (); // Ask underlying thread to stop. void stop (); // Returns mailbox associated with this I/O thread. mailbox_t *get_mailbox (); // i_poll_events implementation. void in_event (); void out_event (); void timer_event (int id_); // Used by io_objects to retrieve the assciated poller object. poller_t *get_poller (); // Command handlers. void process_stop (); // Returns load experienced by the I/O thread. int get_load (); private: // I/O thread accesses incoming commands via this mailbox. mailbox_t mailbox; // Handle associated with mailbox' file descriptor. poller_t::handle_t mailbox_handle; // I/O multiplexing is performed using a poller object. poller_t *poller; io_thread_t (const io_thread_t&); const io_thread_t &operator = (const io_thread_t&); }; } #endif zeromq-2.2.0.orig/src/named_session.hpp0000664000000000000000000000333211732125604016620 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_NAMED_SESSION_HPP_INCLUDED__ #define __ZMQ_NAMED_SESSION_HPP_INCLUDED__ #include "session.hpp" #include "blob.hpp" namespace zmq { // Named session is created by listener object when the peer identifies // itself by a strong name. Named session survives reconnections. class named_session_t : public session_t { public: named_session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_, const blob_t &name_); ~named_session_t (); // Handlers for events from session base class. void attached (const blob_t &peer_identity_); void detached (); private: // Name of the session. Corresponds to the peer's strong identity. blob_t name; named_session_t (const named_session_t&); const named_session_t &operator = (const named_session_t&); }; } #endif zeromq-2.2.0.orig/src/session.hpp0000664000000000000000000001146111732125604015456 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SESSION_HPP_INCLUDED__ #define __ZMQ_SESSION_HPP_INCLUDED__ #include "own.hpp" #include "i_inout.hpp" #include "io_object.hpp" #include "blob.hpp" #include "pipe.hpp" namespace zmq { class session_t : public own_t, public io_object_t, public i_inout, public i_reader_events, public i_writer_events { public: session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_); // i_inout interface implementation. Note that detach method is not // implemented by generic session. Different session types may handle // engine disconnection in different ways. bool read (::zmq_msg_t *msg_); bool write (::zmq_msg_t *msg_); void flush (); void detach (); void attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); // i_reader_events interface implementation. void activated (class reader_t *pipe_); void terminated (class reader_t *pipe_); void delimited (class reader_t *pipe_); // i_writer_events interface implementation. void activated (class writer_t *pipe_); void terminated (class writer_t *pipe_); protected: // This function allows to shut down the session even though // there are pending messages in the inbound pipe. void terminate (); // Two events for the derived session type. Attached is triggered // when session is attached to a peer, detached is triggered at the // beginning of the termination process when session is about to // be detached from the peer. virtual void attached (const blob_t &peer_identity_) = 0; virtual void detached () = 0; // Allows derives session types to (un)register session names. bool register_session (const blob_t &name_, class session_t *session_); void unregister_session (const blob_t &name_); ~session_t (); private: // Handlers for incoming commands. void process_plug (); void process_attach (struct i_engine *engine_, const blob_t &peer_identity_); void process_term (int linger_); // i_poll_events handlers. void timer_event (int id_); // Remove any half processed messages. Flush unflushed messages. // Call this function when engine disconnect to get rid of leftovers. void clean_pipes (); // Call this function to move on with the delayed process_term. void proceed_with_term (); // Inbound pipe, i.e. one the session is getting messages from. class reader_t *in_pipe; // This flag is true if the remainder of the message being processed // is still in the in pipe. bool incomplete_in; // Outbound pipe, i.e. one the socket is sending messages to. class writer_t *out_pipe; // The protocol I/O engine connected to the session. struct i_engine *engine; // The socket the session belongs to. class socket_base_t *socket; // I/O thread the session is living in. It will be used to plug in // the engines into the same thread. class io_thread_t *io_thread; // If true, pipes were already attached to this session. bool pipes_attached; // If true, delimiter was already read from the inbound pipe. bool delimiter_processed; // If true, we should terminate the session even though there are // pending messages in the inbound pipe. bool force_terminate; // ID of the linger timer enum {linger_timer_id = 0x20}; // True is linger timer is running. bool has_linger_timer; enum { active, pending, terminating } state; session_t (const session_t&); const session_t &operator = (const session_t&); }; } #endif zeromq-2.2.0.orig/src/msg_content.hpp0000664000000000000000000000312011732125604016304 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MSG_HPP_INCLUDE__ #define __ZMQ_MSG_HPP_INCLUDE__ #include #include "../include/zmq.h" #include "atomic_counter.hpp" namespace zmq { // Shared message buffer. Message data are either allocated in one // continuous block along with this structure - thus avoiding one // malloc/free pair or they are stored in used-supplied memory. // In the latter case, ffn member stores pointer to the function to be // used to deallocate the data. If the buffer is actually shared (there // are at least 2 references to it) refcount member contains number of // references. struct msg_content_t { void *data; size_t size; zmq_free_fn *ffn; void *hint; zmq::atomic_counter_t refcnt; }; } #endif zeromq-2.2.0.orig/src/trie.cpp0000664000000000000000000001322511732125604014731 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2011-2012 Spotify AB Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "err.hpp" #include "trie.hpp" zmq::trie_t::trie_t () : refcnt (0), min (0), count (0), live_nodes (0) { } zmq::trie_t::~trie_t () { if (count == 1) { zmq_assert (next.node); delete next.node; next.node = 0; } else if (count > 1) { for (unsigned short i = 0; i != count; ++i) if (next.table [i]) delete next.table [i]; free (next.table); } } void zmq::trie_t::add (unsigned char *prefix_, size_t size_) { // We are at the node corresponding to the prefix. We are done. if (!size_) { ++refcnt; return; } unsigned char c = *prefix_; if (c < min || c >= min + count) { // The character is out of range of currently handled // charcters. We have to extend the table. if (!count) { min = c; count = 1; next.node = NULL; } else if (count == 1) { unsigned char oldc = min; trie_t *oldp = next.node; count = (min < c ? c - min : min - c) + 1; next.table = (trie_t**) malloc (sizeof (trie_t*) * count); alloc_assert (next.table); for (unsigned short i = 0; i != count; ++i) next.table [i] = 0; min = std::min (min, c); next.table [oldc - min] = oldp; } else if (min < c) { // The new character is above the current character range. unsigned short old_count = count; count = c - min + 1; next.table = (trie_t**) realloc ((void*) next.table, sizeof (trie_t*) * count); zmq_assert (next.table); for (unsigned short i = old_count; i != count; i++) next.table [i] = NULL; } else { // The new character is below the current character range. unsigned short old_count = count; count = (min + old_count) - c; next.table = (trie_t**) realloc ((void*) next.table, sizeof (trie_t*) * count); zmq_assert (next.table); memmove (next.table + min - c, next.table, old_count * sizeof (trie_t*)); for (unsigned short i = 0; i != min - c; i++) next.table [i] = NULL; min = c; } } // If next node does not exist, create one. if (count == 1) { if (!next.node) { next.node = new (std::nothrow) trie_t; alloc_assert (next.node); ++live_nodes; } next.node->add (prefix_ + 1, size_ - 1); } else { if (!next.table [c - min]) { next.table [c - min] = new (std::nothrow) trie_t; alloc_assert (next.table [c - min]); ++live_nodes; } next.table [c - min]->add (prefix_ + 1, size_ - 1); } } bool zmq::trie_t::rm (unsigned char *prefix_, size_t size_) { if (!size_) { if (!refcnt) return false; refcnt--; return true; } unsigned char c = *prefix_; if (!count || c < min || c >= min + count) return false; trie_t *next_node = count == 1 ? next.node : next.table [c - min]; if (!next_node) return false; bool ret = next_node->rm (prefix_ + 1, size_ - 1); if (next_node->is_redundant ()) { delete next_node; if (count == 1) { next.node = 0; count = 0; } else next.table [c - min] = 0; --live_nodes; } return ret; } bool zmq::trie_t::check (unsigned char *data_, size_t size_) { // This function is on critical path. It deliberately doesn't use // recursion to get a bit better performance. trie_t *current = this; while (true) { // We've found a corresponding subscription! if (current->refcnt) return true; // We've checked all the data and haven't found matching subscription. if (!size_) return false; // If there's no corresponding slot for the first character // of the prefix, the message does not match. unsigned char c = *data_; if (c < current->min || c >= current->min + current->count) return false; // Move to the next character. if (current->count == 1) current = current->next.node; else { current = current->next.table [c - current->min]; if (!current) return false; } data_++; size_--; } } bool zmq::trie_t::is_redundant() const { return refcnt == 0 && live_nodes == 0; } zeromq-2.2.0.orig/src/push.cpp0000664000000000000000000000310011732125604014734 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "push.hpp" #include "err.hpp" #include "pipe.hpp" zmq::push_t::push_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), lb (this) { options.type = ZMQ_PUSH; options.requires_in = false; options.requires_out = true; } zmq::push_t::~push_t () { } void zmq::push_t::xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (!inpipe_ && outpipe_); lb.attach (outpipe_); } void zmq::push_t::process_term (int linger_) { lb.terminate (); socket_base_t::process_term (linger_); } int zmq::push_t::xsend (zmq_msg_t *msg_, int flags_) { return lb.send (msg_, flags_); } bool zmq::push_t::xhas_out () { return lb.has_out (); } zeromq-2.2.0.orig/src/poller_base.cpp0000664000000000000000000000546111732125604016260 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "poller_base.hpp" #include "i_poll_events.hpp" #include "err.hpp" zmq::poller_base_t::poller_base_t () { } zmq::poller_base_t::~poller_base_t () { // Make sure there is no more load on the shutdown. zmq_assert (get_load () == 0); } int zmq::poller_base_t::get_load () { return load.get (); } void zmq::poller_base_t::adjust_load (int amount_) { if (amount_ > 0) load.add (amount_); else if (amount_ < 0) load.sub (-amount_); } void zmq::poller_base_t::add_timer (int timeout_, i_poll_events *sink_, int id_) { uint64_t expiration = clock.now_ms () + timeout_; timer_info_t info = {sink_, id_}; timers.insert (timers_t::value_type (expiration, info)); } void zmq::poller_base_t::cancel_timer (i_poll_events *sink_, int id_) { // Complexity of this operation is O(n). We assume it is rarely used. for (timers_t::iterator it = timers.begin (); it != timers.end (); ++it) if (it->second.sink == sink_ && it->second.id == id_) { timers.erase (it); return; } // Timer not found. zmq_assert (false); } uint64_t zmq::poller_base_t::execute_timers () { // Fast track. if (timers.empty ()) return 0; // Get the current time. uint64_t current = clock.now_ms (); // Execute the timers that are already due. timers_t::iterator it = timers.begin (); while (it != timers.end ()) { // If we have to wait to execute the item, same will be true about // all the following items (multimap is sorted). Thus we can stop // checking the subsequent timers and return the time to wait for // the next timer (at least 1ms). if (it->first > current) return it->first - current; // Trigger the timer. it->second.sink->timer_event (it->second.id); // Remove it from the list of active timers. timers_t::iterator o = it; ++it; timers.erase (o); } // There are no more timers. return 0; } zeromq-2.2.0.orig/src/ip.hpp0000664000000000000000000000436311732125604014406 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IP_HPP_INCLUDED__ #define __ZMQ_IP_HPP_INCLUDED__ #include "platform.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #endif #if !defined ZMQ_HAVE_WINDOWS && !defined ZMQ_HAVE_OPENVMS #include #endif // Some platforms (notably Darwin/OSX and NetBSD) do not define all AI_ // flags for getaddrinfo(). This can be worked around safely by defining // these to 0. #ifndef AI_ADDRCONFIG #define AI_ADDRCONFIG 0 #endif #ifndef AI_NUMERICSERV #define AI_NUMERICSERV 0 #endif namespace zmq { // Same as socket(2), but allows for transparent tweaking the options. int open_socket (int domain_, int type_, int protocol_); // Resolves network interface name in : format. Symbol "*" // (asterisk) resolves to INADDR_ANY (all network interfaces). int resolve_ip_interface (sockaddr_storage *addr_, socklen_t *addr_len_, char const *interface_); // This function resolves a string in : format. // Hostname can be either the name of the host or its IP address. int resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_, const char *hostname_); // This function sets up address for UNIX domain transport. int resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_, const char* pathname_); } #endif zeromq-2.2.0.orig/src/Makefile.am0000664000000000000000000000566311741076122015325 0ustar rootrootlib_LTLIBRARIES = libzmq.la pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = libzmq.pc include_HEADERS = ../include/zmq.h ../include/zmq.hpp ../include/zmq_utils.h libzmq_la_SOURCES = \ array.hpp \ atomic_counter.hpp \ atomic_ptr.hpp \ blob.hpp \ clock.hpp \ command.hpp \ config.hpp \ connect_session.hpp \ ctx.hpp \ decoder.hpp \ device.hpp \ devpoll.hpp \ dist.hpp \ encoder.hpp \ epoll.hpp \ err.hpp \ fd.hpp \ fq.hpp \ gcc_421_char_traits.hpp \ i_inout.hpp \ io_object.hpp \ io_thread.hpp \ ip.hpp \ i_engine.hpp \ i_poll_events.hpp \ kqueue.hpp \ lb.hpp \ likely.hpp \ mailbox.hpp \ msg_content.hpp \ mutex.hpp \ named_session.hpp \ object.hpp \ options.hpp \ own.hpp \ pgm_receiver.hpp \ pgm_sender.hpp \ pgm_socket.hpp \ pipe.hpp \ platform.hpp \ poll.hpp \ poller.hpp \ poller_base.hpp \ pair.hpp \ pub.hpp \ pull.hpp \ push.hpp \ reaper.hpp \ rep.hpp \ req.hpp \ select.hpp \ semaphore.hpp \ session.hpp \ signaler.hpp \ socket_base.hpp \ stdint.hpp \ sub.hpp \ swap.hpp \ tcp_connecter.hpp \ tcp_listener.hpp \ tcp_socket.hpp \ thread.hpp \ transient_session.hpp \ trie.hpp \ uuid.hpp \ windows.hpp \ wire.hpp \ xpub.hpp \ xrep.hpp \ xreq.hpp \ xsub.hpp \ ypipe.hpp \ yqueue.hpp \ zmq_connecter.hpp \ zmq_engine.hpp \ zmq_init.hpp \ zmq_listener.hpp \ clock.cpp \ command.cpp \ ctx.cpp \ connect_session.cpp \ decoder.cpp \ device.cpp \ devpoll.cpp \ dist.cpp \ encoder.cpp \ epoll.cpp \ err.cpp \ fq.cpp \ io_object.cpp \ io_thread.cpp \ ip.cpp \ kqueue.cpp \ lb.cpp \ mailbox.cpp \ named_session.cpp \ object.cpp \ options.cpp \ own.cpp \ pair.cpp \ pgm_receiver.cpp \ pgm_sender.cpp \ pgm_socket.cpp \ pipe.cpp \ poll.cpp \ poller_base.cpp \ pull.cpp \ push.cpp \ reaper.cpp \ pub.cpp \ rep.cpp \ req.cpp \ select.cpp \ session.cpp \ signaler.cpp \ socket_base.cpp \ sub.cpp \ swap.cpp \ tcp_connecter.cpp \ tcp_listener.cpp \ tcp_socket.cpp \ thread.cpp \ transient_session.cpp \ trie.cpp \ uuid.cpp \ xpub.cpp \ xrep.cpp \ xreq.cpp \ xsub.cpp \ zmq.cpp \ zmq_connecter.cpp \ zmq_engine.cpp \ zmq_init.cpp \ zmq_listener.cpp if ON_MINGW libzmq_la_LDFLAGS = -no-undefined -avoid-version -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ else libzmq_la_LDFLAGS = -version-info @LTVER@ @LIBZMQ_EXTRA_LDFLAGS@ endif libzmq_la_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ if BUILD_PGM libzmq_la_CPPFLAGS = -I$(top_srcdir)/@pgm_srcdir@/include/ libzmq_la_LIBADD = $(top_srcdir)/@pgm_srcdir@/libpgm_noinst.la endif dist-hook: -rm $(distdir)/platform.hpp zeromq-2.2.0.orig/src/connect_session.hpp0000664000000000000000000000355211732125604017171 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_CONNECT_SESSION_HPP_INCLUDED__ #define __ZMQ_CONNECT_SESSION_HPP_INCLUDED__ #include #include "session.hpp" namespace zmq { // Connect session contains an address to connect to. On disconnect it // attempts to reconnect. class connect_session_t : public session_t { public: connect_session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_, const char *protocol_, const char *address_); ~connect_session_t (); private: // Handlers for events from session base class. void attached (const blob_t &peer_identity_); void detached (); // Start the connection process. void start_connecting (bool wait_); // Command handlers. void process_plug (); // Address to connect to. std::string protocol; std::string address; connect_session_t (const connect_session_t&); const connect_session_t &operator = (const connect_session_t&); }; } #endif zeromq-2.2.0.orig/src/select.cpp0000664000000000000000000001265211732125604015250 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #if defined ZMQ_HAVE_HPUX #include #include #include #elif defined ZMQ_HAVE_OPENVMS #include #include #elif !defined ZMQ_HAVE_WINDOWS #include #endif #include "select.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::select_t::select_t () : maxfd (retired_fd), retired (false), stopping (false) { // Clear file descriptor sets. FD_ZERO (&source_set_in); FD_ZERO (&source_set_out); FD_ZERO (&source_set_err); } zmq::select_t::~select_t () { worker.stop (); } zmq::select_t::handle_t zmq::select_t::add_fd (fd_t fd_, i_poll_events *events_) { // Store the file descriptor. fd_entry_t entry = {fd_, events_}; fds.push_back (entry); // Ensure we do not attempt to select () on more than FD_SETSIZE // file descriptors. zmq_assert (fds.size () <= FD_SETSIZE); // Start polling on errors. FD_SET (fd_, &source_set_err); // Adjust maxfd if necessary. if (fd_ > maxfd) maxfd = fd_; // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::select_t::rm_fd (handle_t handle_) { // Mark the descriptor as retired. fd_set_t::iterator it; for (it = fds.begin (); it != fds.end (); ++it) if (it->fd == handle_) break; zmq_assert (it != fds.end ()); it->fd = retired_fd; retired = true; // Stop polling on the descriptor. FD_CLR (handle_, &source_set_in); FD_CLR (handle_, &source_set_out); FD_CLR (handle_, &source_set_err); // Discard all events generated on this file descriptor. FD_CLR (handle_, &readfds); FD_CLR (handle_, &writefds); FD_CLR (handle_, &exceptfds); // Adjust the maxfd attribute if we have removed the // highest-numbered file descriptor. if (handle_ == maxfd) { maxfd = retired_fd; for (fd_set_t::iterator it = fds.begin (); it != fds.end (); ++it) if (it->fd > maxfd) maxfd = it->fd; } // Decrease the load metric of the thread. adjust_load (-1); } void zmq::select_t::set_pollin (handle_t handle_) { FD_SET (handle_, &source_set_in); } void zmq::select_t::reset_pollin (handle_t handle_) { FD_CLR (handle_, &source_set_in); } void zmq::select_t::set_pollout (handle_t handle_) { FD_SET (handle_, &source_set_out); } void zmq::select_t::reset_pollout (handle_t handle_) { FD_CLR (handle_, &source_set_out); } void zmq::select_t::start () { worker.start (worker_routine, this); } void zmq::select_t::stop () { stopping = true; } void zmq::select_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Intialise the pollsets. memcpy (&readfds, &source_set_in, sizeof source_set_in); memcpy (&writefds, &source_set_out, sizeof source_set_out); memcpy (&exceptfds, &source_set_err, sizeof source_set_err); // Wait for events. struct timeval tv = {(long) (timeout / 1000), (long) (timeout % 1000 * 1000)}; int rc = select (maxfd + 1, &readfds, &writefds, &exceptfds, timeout ? &tv : NULL); #ifdef ZMQ_HAVE_WINDOWS wsa_assert (rc != SOCKET_ERROR); #else if (rc == -1 && errno == EINTR) continue; errno_assert (rc != -1); #endif // If there are no events (i.e. it's a timeout) there's no point // in checking the pollset. if (rc == 0) continue; for (fd_set_t::size_type i = 0; i < fds.size (); i ++) { if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &exceptfds)) fds [i].events->in_event (); if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &writefds)) fds [i].events->out_event (); if (fds [i].fd == retired_fd) continue; if (FD_ISSET (fds [i].fd, &readfds)) fds [i].events->in_event (); } // Destroy retired event sources. if (retired) { fds.erase (std::remove_if (fds.begin (), fds.end (), zmq::select_t::is_retired_fd), fds.end ()); retired = false; } } } void zmq::select_t::worker_routine (void *arg_) { ((select_t*) arg_)->loop (); } bool zmq::select_t::is_retired_fd (const fd_entry_t &entry) { return (entry.fd == retired_fd); } zeromq-2.2.0.orig/src/sub.hpp0000664000000000000000000000245211732125604014564 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SUB_HPP_INCLUDED__ #define __ZMQ_SUB_HPP_INCLUDED__ #include "xsub.hpp" namespace zmq { class sub_t : public xsub_t { public: sub_t (class ctx_t *parent_, uint32_t tid_); ~sub_t (); protected: int xsetsockopt (int option_, const void *optval_, size_t optvallen_); int xsend (zmq_msg_t *msg_, int options_); bool xhas_out (); private: sub_t (const sub_t&); const sub_t &operator = (const sub_t&); }; } #endif zeromq-2.2.0.orig/src/pgm_sender.cpp0000664000000000000000000001314311732125604016110 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include "io_thread.hpp" #include "pgm_sender.hpp" #include "err.hpp" #include "wire.hpp" #include "stdint.hpp" zmq::pgm_sender_t::pgm_sender_t (io_thread_t *parent_, const options_t &options_) : io_object_t (parent_), has_tx_timer (false), has_rx_timer (false), encoder (0), pgm_socket (false, options_), options (options_), out_buffer (NULL), out_buffer_size (0), write_size (0) { } int zmq::pgm_sender_t::init (bool udp_encapsulation_, const char *network_) { int rc = pgm_socket.init (udp_encapsulation_, network_); if (rc != 0) return rc; out_buffer_size = pgm_socket.get_max_tsdu_size (); out_buffer = (unsigned char*) malloc (out_buffer_size); alloc_assert (out_buffer); return rc; } void zmq::pgm_sender_t::plug (io_thread_t *io_thread_, i_inout *inout_) { // Alocate 2 fds for PGM socket. fd_t downlink_socket_fd = retired_fd; fd_t uplink_socket_fd = retired_fd; fd_t rdata_notify_fd = retired_fd; fd_t pending_notify_fd = retired_fd; encoder.set_inout (inout_); // Fill fds from PGM transport and add them to the poller. pgm_socket.get_sender_fds (&downlink_socket_fd, &uplink_socket_fd, &rdata_notify_fd, &pending_notify_fd); handle = add_fd (downlink_socket_fd); uplink_handle = add_fd (uplink_socket_fd); rdata_notify_handle = add_fd (rdata_notify_fd); pending_notify_handle = add_fd (pending_notify_fd); // Set POLLIN. We wont never want to stop polling for uplink = we never // want to stop porocess NAKs. set_pollin (uplink_handle); set_pollin (rdata_notify_handle); set_pollin (pending_notify_handle); // Set POLLOUT for downlink_socket_handle. set_pollout (handle); } void zmq::pgm_sender_t::unplug () { if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } if (has_tx_timer) { cancel_timer (tx_timer_id); has_tx_timer = false; } rm_fd (handle); rm_fd (uplink_handle); rm_fd (rdata_notify_handle); rm_fd (pending_notify_handle); encoder.set_inout (NULL); } void zmq::pgm_sender_t::terminate () { unplug (); delete this; } void zmq::pgm_sender_t::activate_out () { set_pollout (handle); out_event (); } void zmq::pgm_sender_t::activate_in () { zmq_assert (false); } zmq::pgm_sender_t::~pgm_sender_t () { if (out_buffer) { free (out_buffer); out_buffer = NULL; } } void zmq::pgm_sender_t::in_event () { if (has_rx_timer) { cancel_timer (rx_timer_id); has_rx_timer = false; } // In-event on sender side means NAK or SPMR receiving from some peer. pgm_socket.process_upstream (); if (errno == ENOMEM || errno == EBUSY) { const long timeout = pgm_socket.get_rx_timeout (); add_timer (timeout, rx_timer_id); has_rx_timer = true; } } void zmq::pgm_sender_t::out_event () { // POLLOUT event from send socket. If write buffer is empty, // try to read new data from the encoder. if (write_size == 0) { // First two bytes (sizeof uint16_t) are used to store message // offset in following steps. Note that by passing our buffer to // the get data function we prevent it from returning its own buffer. unsigned char *bf = out_buffer + sizeof (uint16_t); size_t bfsz = out_buffer_size - sizeof (uint16_t); int offset = -1; encoder.get_data (&bf, &bfsz, &offset); // If there are no data to write stop polling for output. if (!bfsz) { reset_pollout (handle); return; } // Put offset information in the buffer. write_size = bfsz + sizeof (uint16_t); put_uint16 (out_buffer, offset == -1 ? 0xffff : (uint16_t) offset); } if (has_tx_timer) { cancel_timer (tx_timer_id); has_tx_timer = false; } // Send the data. size_t nbytes = pgm_socket.send (out_buffer, write_size); // We can write either all data or 0 which means rate limit reached. if (nbytes == write_size) { write_size = 0; } else { zmq_assert (nbytes == 0); if (errno == ENOMEM) { const long timeout = pgm_socket.get_tx_timeout (); add_timer (timeout, tx_timer_id); has_tx_timer = true; } else zmq_assert (errno == EBUSY); } } void zmq::pgm_sender_t::timer_event (int token) { // Timer cancels on return by poller_base. if (token == rx_timer_id) { has_rx_timer = false; in_event (); } else if (token == tx_timer_id) { has_tx_timer = false; out_event (); } else zmq_assert (false); } #endif zeromq-2.2.0.orig/src/socket_base.cpp0000664000000000000000000005725611737023311016261 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include #include "../include/zmq.h" #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #if defined _MSC_VER #include #endif #else #include #endif #include "socket_base.hpp" #include "zmq_listener.hpp" #include "zmq_connecter.hpp" #include "io_thread.hpp" #include "connect_session.hpp" #include "config.hpp" #include "clock.hpp" #include "pipe.hpp" #include "err.hpp" #include "ctx.hpp" #include "platform.hpp" #include "likely.hpp" #include "uuid.hpp" #include "pair.hpp" #include "pub.hpp" #include "sub.hpp" #include "req.hpp" #include "rep.hpp" #include "pull.hpp" #include "push.hpp" #include "xreq.hpp" #include "xrep.hpp" #include "xpub.hpp" #include "xsub.hpp" bool zmq::socket_base_t::check_tag () { return tag == 0xbaddecaf; } zmq::socket_base_t *zmq::socket_base_t::create (int type_, class ctx_t *parent_, uint32_t tid_) { socket_base_t *s = NULL; switch (type_) { case ZMQ_PAIR: s = new (std::nothrow) pair_t (parent_, tid_); break; case ZMQ_PUB: s = new (std::nothrow) pub_t (parent_, tid_); break; case ZMQ_SUB: s = new (std::nothrow) sub_t (parent_, tid_); break; case ZMQ_REQ: s = new (std::nothrow) req_t (parent_, tid_); break; case ZMQ_REP: s = new (std::nothrow) rep_t (parent_, tid_); break; case ZMQ_XREQ: s = new (std::nothrow) xreq_t (parent_, tid_); break; case ZMQ_XREP: s = new (std::nothrow) xrep_t (parent_, tid_); break; case ZMQ_PULL: s = new (std::nothrow) pull_t (parent_, tid_); break; case ZMQ_PUSH: s = new (std::nothrow) push_t (parent_, tid_); break; case ZMQ_XPUB: s = new (std::nothrow) xpub_t (parent_, tid_); break; case ZMQ_XSUB: s = new (std::nothrow) xsub_t (parent_, tid_); break; default: errno = EINVAL; return NULL; } alloc_assert (s); return s; } zmq::socket_base_t::socket_base_t (ctx_t *parent_, uint32_t tid_) : own_t (parent_, tid_), tag (0xbaddecaf), ctx_terminated (false), destroyed (false), last_tsc (0), ticks (0), rcvmore (false) { } zmq::socket_base_t::~socket_base_t () { zmq_assert (destroyed); // Check whether there are no session leaks. sessions_sync.lock (); zmq_assert (sessions.empty ()); sessions_sync.unlock (); // Mark the socket as dead. tag = 0xdeadbeef; } zmq::mailbox_t *zmq::socket_base_t::get_mailbox () { return &mailbox; } void zmq::socket_base_t::stop () { // Called by ctx when it is terminated (zmq_term). // 'stop' command is sent from the threads that called zmq_term to // the thread owning the socket. This way, blocking call in the // owner thread can be interrupted. send_stop (); } int zmq::socket_base_t::parse_uri (const char *uri_, std::string &protocol_, std::string &address_) { zmq_assert (uri_ != NULL); std::string uri (uri_); std::string::size_type pos = uri.find ("://"); if (pos == std::string::npos) { errno = EINVAL; return -1; } protocol_ = uri.substr (0, pos); address_ = uri.substr (pos + 3); if (protocol_.empty () || address_.empty ()) { errno = EINVAL; return -1; } return 0; } int zmq::socket_base_t::check_protocol (const std::string &protocol_) { // First check out whether the protcol is something we are aware of. if (protocol_ != "inproc" && protocol_ != "ipc" && protocol_ != "tcp" && protocol_ != "pgm" && protocol_ != "epgm" && protocol_ != "sys") { errno = EPROTONOSUPPORT; return -1; } // If 0MQ is not compiled with OpenPGM, pgm and epgm transports // are not avaialble. #if !defined ZMQ_HAVE_OPENPGM if (protocol_ == "pgm" || protocol_ == "epgm") { errno = EPROTONOSUPPORT; return -1; } #endif // IPC transport is not available on Windows and OpenVMS. #if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS if (protocol_ == "ipc") { // Unknown protocol. errno = EPROTONOSUPPORT; return -1; } #endif // Check whether socket type and transport protocol match. // Specifically, multicast protocols can't be combined with // bi-directional messaging patterns (socket types). if ((protocol_ == "pgm" || protocol_ == "epgm") && options.type != ZMQ_PUB && options.type != ZMQ_SUB && options.type != ZMQ_XPUB && options.type != ZMQ_XSUB) { errno = ENOCOMPATPROTO; return -1; } // Protocol is available. return 0; } void zmq::socket_base_t::attach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { // If the peer haven't specified it's identity, let's generate one. if (peer_identity_.size ()) { xattach_pipes (inpipe_, outpipe_, peer_identity_); } else { blob_t identity (1, 0); identity.append (uuid_t ().to_blob (), uuid_t::uuid_blob_len); xattach_pipes (inpipe_, outpipe_, identity); } } int zmq::socket_base_t::setsockopt (int option_, const void *optval_, size_t optvallen_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // First, check whether specific socket type overloads the option. int rc = xsetsockopt (option_, optval_, optvallen_); if (rc == 0 || errno != EINVAL) return rc; // If the socket type doesn't support the option, pass it to // the generic option parser. return options.setsockopt (option_, optval_, optvallen_); } int zmq::socket_base_t::getsockopt (int option_, void *optval_, size_t *optvallen_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } if (option_ == ZMQ_RCVMORE) { if (*optvallen_ < sizeof (int64_t)) { errno = EINVAL; return -1; } *((int64_t*) optval_) = rcvmore ? 1 : 0; *optvallen_ = sizeof (int64_t); return 0; } if (option_ == ZMQ_FD) { if (*optvallen_ < sizeof (fd_t)) { errno = EINVAL; return -1; } *((fd_t*) optval_) = mailbox.get_fd (); *optvallen_ = sizeof (fd_t); return 0; } if (option_ == ZMQ_EVENTS) { if (*optvallen_ < sizeof (uint32_t)) { errno = EINVAL; return -1; } int rc = process_commands (0, false); if (rc != 0 && (errno == EINTR || errno == ETERM)) return -1; errno_assert (rc == 0); *((uint32_t*) optval_) = 0; if (has_out ()) *((uint32_t*) optval_) |= ZMQ_POLLOUT; if (has_in ()) *((uint32_t*) optval_) |= ZMQ_POLLIN; *optvallen_ = sizeof (uint32_t); return 0; } return options.getsockopt (option_, optval_, optvallen_); } int zmq::socket_base_t::bind (const char *addr_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Parse addr_ string. std::string protocol; std::string address; int rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; rc = check_protocol (protocol); if (rc != 0) return -1; if (protocol == "inproc" || protocol == "sys") { endpoint_t endpoint = {this, options}; return register_endpoint (addr_, endpoint); } if (protocol == "tcp" || protocol == "ipc") { // Choose I/O thread to run the listerner in. io_thread_t *io_thread = choose_io_thread (options.affinity); if (!io_thread) { errno = EMTHREAD; return -1; } // Create and run the listener. zmq_listener_t *listener = new (std::nothrow) zmq_listener_t ( io_thread, this, options); alloc_assert (listener); int rc = listener->set_address (protocol.c_str(), address.c_str ()); if (rc != 0) { delete listener; return -1; } launch_child (listener); return 0; } if (protocol == "pgm" || protocol == "epgm") { // For convenience's sake, bind can be used interchageable with // connect for PGM and EPGM transports. return connect (addr_); } zmq_assert (false); return -1; } int zmq::socket_base_t::connect (const char *addr_) { if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Parse addr_ string. std::string protocol; std::string address; int rc = parse_uri (addr_, protocol, address); if (rc != 0) return -1; // Checks that protocol is valid and supported on this system rc = check_protocol (protocol); if (rc != 0) return -1; // Parsed address for validation sockaddr_storage addr; socklen_t addr_len; if (protocol == "tcp") rc = resolve_ip_hostname (&addr, &addr_len, address.c_str ()); else if (protocol == "ipc") rc = resolve_local_path (&addr, &addr_len, address.c_str ()); if (rc != 0) return -1; if (protocol == "inproc" || protocol == "sys") { // TODO: inproc connect is specific with respect to creating pipes // as there's no 'reconnect' functionality implemented. Once that // is in place we should follow generic pipe creation algorithm. // Find the peer endpoint. endpoint_t peer = find_endpoint (addr_); if (!peer.socket) return -1; reader_t *inpipe_reader = NULL; writer_t *inpipe_writer = NULL; reader_t *outpipe_reader = NULL; writer_t *outpipe_writer = NULL; // The total HWM for an inproc connection should be the sum of // the binder's HWM and the connector's HWM. (Similarly for the // SWAP.) int64_t hwm; if (options.hwm == 0 || peer.options.hwm == 0) hwm = 0; else hwm = options.hwm + peer.options.hwm; int64_t swap; if (options.swap == 0 && peer.options.swap == 0) swap = 0; else swap = options.swap + peer.options.swap; // Create inbound pipe, if required. if (options.requires_in) create_pipe (this, peer.socket, hwm, swap, &inpipe_reader, &inpipe_writer); // Create outbound pipe, if required. if (options.requires_out) create_pipe (peer.socket, this, hwm, swap, &outpipe_reader, &outpipe_writer); // Attach the pipes to this socket object. attach_pipes (inpipe_reader, outpipe_writer, peer.options.identity); // Attach the pipes to the peer socket. Note that peer's seqnum // was incremented in find_endpoint function. We don't need it // increased here. send_bind (peer.socket, outpipe_reader, inpipe_writer, options.identity, false); return 0; } // Choose the I/O thread to run the session in. io_thread_t *io_thread = choose_io_thread (options.affinity); if (!io_thread) { errno = EMTHREAD; return -1; } // Create session. connect_session_t *session = new (std::nothrow) connect_session_t ( io_thread, this, options, protocol.c_str (), address.c_str ()); alloc_assert (session); // If 'immediate connect' feature is required, we'll create the pipes // to the session straight away. Otherwise, they'll be created by the // session once the connection is established. if (options.immediate_connect) { reader_t *inpipe_reader = NULL; writer_t *inpipe_writer = NULL; reader_t *outpipe_reader = NULL; writer_t *outpipe_writer = NULL; // Create inbound pipe, if required. if (options.requires_in) create_pipe (this, session, options.hwm, options.swap, &inpipe_reader, &inpipe_writer); // Create outbound pipe, if required. if (options.requires_out) create_pipe (session, this, options.hwm, options.swap, &outpipe_reader, &outpipe_writer); // Attach the pipes to the socket object. attach_pipes (inpipe_reader, outpipe_writer, blob_t ()); // Attach the pipes to the session object. session->attach_pipes (outpipe_reader, inpipe_writer, blob_t ()); } // Activate the session. Make it a child of this socket. launch_child (session); return 0; } int zmq::socket_base_t::send (::zmq_msg_t *msg_, int flags_) { // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Check whether message passed to the function is valid. if (unlikely ((msg_->flags | ZMQ_MSG_MASK) != 0xff)) { errno = EFAULT; return -1; } // Process pending commands, if any. int rc = process_commands (0, true); if (unlikely (rc != 0)) return -1; // At this point we impose the MORE flag on the message. if (flags_ & ZMQ_SNDMORE) msg_->flags |= ZMQ_MSG_MORE; // Try to send the message. rc = xsend (msg_, flags_); if (rc == 0) return 0; if (unlikely (errno != EAGAIN)) return -1; // In case of non-blocking send we'll simply propagate // the error - including EAGAIN - upwards. if (flags_ & ZMQ_NOBLOCK || options.sndtimeo == 0) return -1; // Compute the time when the timeout should occur. // If the timeout is infite, don't care. clock_t clock ; int timeout = options.sndtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // Oops, we couldn't send the message. Wait for the next // command, process it and try to send the message again. while (true) { if (unlikely (process_commands (timeout, false) != 0)) return -1; rc = xsend (msg_, flags_); if (rc == 0) break; if (unlikely (errno != EAGAIN)) return -1; if (timeout > 0) { timeout = (int) (end - clock.now_ms ()); if (timeout <= 0) { errno = EAGAIN; return -1; } } } return 0; } int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) { // Check whether the library haven't been shut down yet. if (unlikely (ctx_terminated)) { errno = ETERM; return -1; } // Check whether message passed to the function is valid. if (unlikely ((msg_->flags | ZMQ_MSG_MASK) != 0xff)) { errno = EFAULT; return -1; } // Get the message. int rc = xrecv (msg_, flags_); if (unlikely (rc != 0 && errno != EAGAIN)) return -1; int err = errno; // Once every inbound_poll_rate messages check for signals and process // incoming commands. This happens only if we are not polling altogether // because there are messages available all the time. If poll occurs, // ticks is set to zero and thus we avoid this code. // // Note that 'recv' uses different command throttling algorithm (the one // described above) from the one used by 'send'. This is because counting // ticks is more efficient than doing RDTSC all the time. if (++ticks == inbound_poll_rate) { if (unlikely (process_commands (0, false) != 0)) return -1; ticks = 0; } // If we have the message, return immediately. if (rc == 0) { rcvmore = msg_->flags & ZMQ_MSG_MORE; if (rcvmore) msg_->flags &= ~ZMQ_MSG_MORE; return 0; } // If we don't have the message, restore the original cause of the problem. errno = err; // If the message cannot be fetched immediately, there are two scenarios. // For non-blocking recv, commands are processed in case there's an // activate_reader command already waiting int a command pipe. // If it's not, return EAGAIN. if (flags_ & ZMQ_NOBLOCK || options.rcvtimeo == 0) { if (errno != EAGAIN) return -1; if (unlikely (process_commands (0, false) != 0)) return -1; ticks = 0; rc = xrecv (msg_, flags_); if (rc == 0) { rcvmore = msg_->flags & ZMQ_MSG_MORE; if (rcvmore) msg_->flags &= ~ZMQ_MSG_MORE; } return rc; } // Compute the time when the timeout should occur. // If the timeout is infite, don't care. clock_t clock ; int timeout = options.rcvtimeo; uint64_t end = timeout < 0 ? 0 : (clock.now_ms () + timeout); // In blocking scenario, commands are processed over and over again until // we are able to fetch a message. bool block = (ticks != 0); while (true) { if (unlikely (process_commands (block ? timeout : 0, false) != 0)) return -1; rc = xrecv (msg_, flags_); if (rc == 0) { ticks = 0; break; } if (unlikely (errno != EAGAIN)) return -1; block = true; if (timeout > 0) { timeout = (int) (end - clock.now_ms ()); if (timeout <= 0) { errno = EAGAIN; return -1; } } } rcvmore = msg_->flags & ZMQ_MSG_MORE; if (rcvmore) msg_->flags &= ~ZMQ_MSG_MORE; return 0; } int zmq::socket_base_t::close () { // Transfer the ownership of the socket from this application thread // to the reaper thread which will take care of the rest of shutdown // process. send_reap (this); return 0; } bool zmq::socket_base_t::has_in () { return xhas_in (); } bool zmq::socket_base_t::has_out () { return xhas_out (); } bool zmq::socket_base_t::register_session (const blob_t &name_, session_t *session_) { sessions_sync.lock (); bool registered = sessions.insert ( sessions_t::value_type (name_, session_)).second; sessions_sync.unlock (); return registered; } void zmq::socket_base_t::unregister_session (const blob_t &name_) { sessions_sync.lock (); sessions_t::iterator it = sessions.find (name_); zmq_assert (it != sessions.end ()); sessions.erase (it); sessions_sync.unlock (); } zmq::session_t *zmq::socket_base_t::find_session (const blob_t &name_) { sessions_sync.lock (); sessions_t::iterator it = sessions.find (name_); if (it == sessions.end ()) { sessions_sync.unlock (); return NULL; } session_t *session = it->second; // Prepare the session for subsequent attach command. session->inc_seqnum (); sessions_sync.unlock (); return session; } void zmq::socket_base_t::start_reaping (poller_t *poller_) { poller = poller_; handle = poller->add_fd (mailbox.get_fd (), this); poller->set_pollin (handle); } int zmq::socket_base_t::process_commands (int timeout_, bool throttle_) { int rc; command_t cmd; if (timeout_ != 0) { // If we are asked to wait, simply ask mailbox to wait. rc = mailbox.recv (&cmd, timeout_); } else { // If we are asked not to wait, check whether we haven't processed // commands recently, so that we can throttle the new commands. // Get the CPU's tick counter. If 0, the counter is not available. uint64_t tsc = zmq::clock_t::rdtsc (); // Optimised version of command processing - it doesn't have to check // for incoming commands each time. It does so only if certain time // elapsed since last command processing. Command delay varies // depending on CPU speed: It's ~1ms on 3GHz CPU, ~2ms on 1.5GHz CPU // etc. The optimisation makes sense only on platforms where getting // a timestamp is a very cheap operation (tens of nanoseconds). if (tsc && throttle_) { // Check whether TSC haven't jumped backwards (in case of migration // between CPU cores) and whether certain time have elapsed since // last command processing. If it didn't do nothing. if (tsc >= last_tsc && tsc - last_tsc <= max_command_delay) return 0; last_tsc = tsc; } // Check whether there are any commands pending for this thread. rc = mailbox.recv (&cmd, 0); } // Process all the commands available at the moment. while (true) { if (rc == -1 && errno == EAGAIN) break; if (rc == -1 && errno == EINTR) return -1; errno_assert (rc == 0); cmd.destination->process_command (cmd); rc = mailbox.recv (&cmd, 0); } if (ctx_terminated) { errno = ETERM; return -1; } return 0; } void zmq::socket_base_t::process_stop () { // Here, someone have called zmq_term while the socket was still alive. // We'll remember the fact so that any blocking call is interrupted and any // further attempt to use the socket will return ETERM. The user is still // responsible for calling zmq_close on the socket though! ctx_terminated = true; } void zmq::socket_base_t::process_bind (reader_t *in_pipe_, writer_t *out_pipe_, const blob_t &peer_identity_) { attach_pipes (in_pipe_, out_pipe_, peer_identity_); } void zmq::socket_base_t::process_unplug () { } void zmq::socket_base_t::process_term (int linger_) { // Unregister all inproc endpoints associated with this socket. // Doing this we make sure that no new pipes from other sockets (inproc) // will be initiated. unregister_endpoints (this); // Continue the termination process immediately. own_t::process_term (linger_); } void zmq::socket_base_t::process_destroy () { destroyed = true; } int zmq::socket_base_t::xsetsockopt (int option_, const void *optval_, size_t optvallen_) { errno = EINVAL; return -1; } bool zmq::socket_base_t::xhas_out () { return false; } int zmq::socket_base_t::xsend (zmq_msg_t *msg_, int options_) { errno = ENOTSUP; return -1; } bool zmq::socket_base_t::xhas_in () { return false; } int zmq::socket_base_t::xrecv (zmq_msg_t *msg_, int options_) { errno = ENOTSUP; return -1; } void zmq::socket_base_t::in_event () { // Process any commands from other threads/sockets that may be available // at the moment. Ultimately, socket will be destroyed. process_commands (false, false); check_destroy (); } void zmq::socket_base_t::out_event () { zmq_assert (false); } void zmq::socket_base_t::timer_event (int id_) { zmq_assert (false); } void zmq::socket_base_t::check_destroy () { // If the object was already marked as destroyed, finish the deallocation. if (destroyed) { // Remove the socket from the reaper's poller. poller->rm_fd (handle); // Remove the socket from the context. destroy_socket (this); // Notify the reaper about the fact. send_reaped (); // Deallocate. own_t::process_destroy (); } } zeromq-2.2.0.orig/src/rep.cpp0000664000000000000000000000657711732125604014570 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "rep.hpp" #include "err.hpp" zmq::rep_t::rep_t (class ctx_t *parent_, uint32_t tid_) : xrep_t (parent_, tid_), sending_reply (false), request_begins (true) { options.type = ZMQ_REP; } zmq::rep_t::~rep_t () { } int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_) { // If we are in the middle of receiving a request, we cannot send reply. if (!sending_reply) { errno = EFSM; return -1; } bool more = (msg_->flags & ZMQ_MSG_MORE); // Push message to the reply pipe. int rc = xrep_t::xsend (msg_, flags_); if (rc != 0) return rc; // If the reply is complete flip the FSM back to request receiving state. if (!more) sending_reply = false; return 0; } int zmq::rep_t::xrecv (zmq_msg_t *msg_, int flags_) { // If we are in middle of sending a reply, we cannot receive next request. if (sending_reply) { errno = EFSM; return -1; } if (request_begins) { // Copy the backtrace stack to the reply pipe. bool bottom = false; while (!bottom) { // TODO: What if request can be read but reply pipe is not // ready for writing? // Get next part of the backtrace stack. int rc = xrep_t::xrecv (msg_, flags_); if (rc != 0) return rc; if ((msg_->flags & ZMQ_MSG_MORE)) { // Empty message part delimits the traceback stack. bottom = (zmq_msg_size (msg_) == 0); // Push it to the reply pipe. rc = xrep_t::xsend (msg_, flags_); errno_assert (rc == 0); } else { // If the traceback stack is malformed, discard anything // already sent to pipe (we're at end of invalid message). rc = xrep_t::rollback (); zmq_assert (rc == 0); } } request_begins = false; } // Now the routing info is safely stored. Get the first part // of the message payload and exit. int rc = xrep_t::xrecv (msg_, flags_); if (rc != 0) return rc; // If whole request is read, flip the FSM to reply-sending state. if (!(msg_->flags & ZMQ_MSG_MORE)) { sending_reply = true; request_begins = true; } return 0; } bool zmq::rep_t::xhas_in () { if (sending_reply) return false; return xrep_t::xhas_in (); } bool zmq::rep_t::xhas_out () { if (!sending_reply) return false; return xrep_t::xhas_out (); } zeromq-2.2.0.orig/src/zmq.cpp0000664000000000000000000005635711732125604014612 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" // On AIX, poll.h has to be included before zmq.h to get consistent // definition of pollfd structure (AIX uses 'reqevents' and 'retnevents' // instead of 'events' and 'revents' and defines macros to map from POSIX-y // names to AIX-specific names). #if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #include #endif #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include #include "device.hpp" #include "socket_base.hpp" #include "msg_content.hpp" #include "stdint.hpp" #include "config.hpp" #include "likely.hpp" #include "clock.hpp" #include "ctx.hpp" #include "err.hpp" #include "fd.hpp" #if !defined ZMQ_HAVE_WINDOWS #include #endif #if defined ZMQ_HAVE_OPENPGM #define __PGM_WININT_H__ #include // TODO: OpenPGM redefines bool -- remove this once OpenPGM is fixed. #if defined bool #undef bool #endif #endif void zmq_version (int *major_, int *minor_, int *patch_) { *major_ = ZMQ_VERSION_MAJOR; *minor_ = ZMQ_VERSION_MINOR; *patch_ = ZMQ_VERSION_PATCH; } const char *zmq_strerror (int errnum_) { return zmq::errno_to_string (errnum_); } int zmq_msg_init (zmq_msg_t *msg_) { msg_->content = (zmq::msg_content_t*) ZMQ_VSM; msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; msg_->vsm_size = 0; return 0; } int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_) { if (size_ <= ZMQ_MAX_VSM_SIZE) { msg_->content = (zmq::msg_content_t*) ZMQ_VSM; msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; msg_->vsm_size = (uint8_t) size_; } else { msg_->content = (zmq::msg_content_t*) malloc (sizeof (zmq::msg_content_t) + size_); if (!msg_->content) { errno = ENOMEM; return -1; } msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; content->data = (void*) (content + 1); content->size = size_; content->ffn = NULL; content->hint = NULL; new (&content->refcnt) zmq::atomic_counter_t (); } return 0; } int zmq_msg_init_data (zmq_msg_t *msg_, void *data_, size_t size_, zmq_free_fn *ffn_, void *hint_) { msg_->content = (zmq::msg_content_t*) malloc (sizeof (zmq::msg_content_t)); alloc_assert (msg_->content); msg_->flags = (unsigned char) ~ZMQ_MSG_MASK; zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; content->data = data_; content->size = size_; content->ffn = ffn_; content->hint = hint_; new (&content->refcnt) zmq::atomic_counter_t (); return 0; } int zmq_msg_close (zmq_msg_t *msg_) { // Check the validity tag. if (unlikely (msg_->flags | ZMQ_MSG_MASK) != 0xff) { errno = EFAULT; return -1; } // For VSMs and delimiters there are no resources to free. if (msg_->content != (zmq::msg_content_t*) ZMQ_DELIMITER && msg_->content != (zmq::msg_content_t*) ZMQ_VSM) { // If the content is not shared, or if it is shared and the reference. // count has dropped to zero, deallocate it. zmq::msg_content_t *content = (zmq::msg_content_t*) msg_->content; if (!(msg_->flags & ZMQ_MSG_SHARED) || !content->refcnt.sub (1)) { // We used "placement new" operator to initialize the reference. // counter so we call its destructor now. content->refcnt.~atomic_counter_t (); if (content->ffn) content->ffn (content->data, content->hint); free (content); } } // Remove the validity tag from the message. msg_->flags = 0; return 0; } int zmq_msg_move (zmq_msg_t *dest_, zmq_msg_t *src_) { #if 0 // Check the validity tags. if (unlikely ((dest_->flags | ZMQ_MSG_MASK) != 0xff || (src_->flags | ZMQ_MSG_MASK) != 0xff)) { errno = EFAULT; return -1; } #endif zmq_msg_close (dest_); *dest_ = *src_; zmq_msg_init (src_); return 0; } int zmq_msg_copy (zmq_msg_t *dest_, zmq_msg_t *src_) { // Check the validity tags. if (unlikely ((dest_->flags | ZMQ_MSG_MASK) != 0xff || (src_->flags | ZMQ_MSG_MASK) != 0xff)) { errno = EFAULT; return -1; } zmq_msg_close (dest_); // VSMs and delimiters require no special handling. if (src_->content != (zmq::msg_content_t*) ZMQ_DELIMITER && src_->content != (zmq::msg_content_t*) ZMQ_VSM) { // One reference is added to shared messages. Non-shared messages // are turned into shared messages and reference count is set to 2. zmq::msg_content_t *content = (zmq::msg_content_t*) src_->content; if (src_->flags & ZMQ_MSG_SHARED) content->refcnt.add (1); else { src_->flags |= ZMQ_MSG_SHARED; content->refcnt.set (2); } } *dest_ = *src_; return 0; } void *zmq_msg_data (zmq_msg_t *msg_) { zmq_assert ((msg_->flags | ZMQ_MSG_MASK) == 0xff); if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) return msg_->vsm_data; if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) return NULL; return ((zmq::msg_content_t*) msg_->content)->data; } size_t zmq_msg_size (zmq_msg_t *msg_) { zmq_assert ((msg_->flags | ZMQ_MSG_MASK) == 0xff); if (msg_->content == (zmq::msg_content_t*) ZMQ_VSM) return msg_->vsm_size; if (msg_->content == (zmq::msg_content_t*) ZMQ_DELIMITER) return 0; return ((zmq::msg_content_t*) msg_->content)->size; } void *zmq_init (int io_threads_) { if (io_threads_ < 0) { errno = EINVAL; return NULL; } #if defined ZMQ_HAVE_OPENPGM // Init PGM transport. Ensure threading and timer are enabled. Find PGM // protocol ID. Note that if you want to use gettimeofday and sleep for // openPGM timing, set environment variables PGM_TIMER to "GTOD" and // PGM_SLEEP to "USLEEP". pgm_error_t *pgm_error = NULL; const bool ok = pgm_init (&pgm_error); if (ok != TRUE) { // Invalid parameters don't set pgm_error_t zmq_assert (pgm_error != NULL); if (pgm_error->domain == PGM_ERROR_DOMAIN_TIME && ( pgm_error->code == PGM_ERROR_FAILED)) { // Failed to access RTC or HPET device. pgm_error_free (pgm_error); errno = EINVAL; return NULL; } // PGM_ERROR_DOMAIN_ENGINE: WSAStartup errors or missing WSARecvMsg. zmq_assert (false); } #endif #ifdef ZMQ_HAVE_WINDOWS // Intialise Windows sockets. Note that WSAStartup can be called multiple // times given that WSACleanup will be called for each WSAStartup. // We do this before the ctx constructor since its embedded mailbox_t // object needs Winsock to be up and running. WORD version_requested = MAKEWORD (2, 2); WSADATA wsa_data; int rc = WSAStartup (version_requested, &wsa_data); zmq_assert (rc == 0); zmq_assert (LOBYTE (wsa_data.wVersion) == 2 && HIBYTE (wsa_data.wVersion) == 2); #endif // Create 0MQ context. zmq::ctx_t *ctx = new (std::nothrow) zmq::ctx_t ((uint32_t) io_threads_); alloc_assert (ctx); return (void*) ctx; } int zmq_term (void *ctx_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return -1; } int rc = ((zmq::ctx_t*) ctx_)->terminate (); int en = errno; #ifdef ZMQ_HAVE_WINDOWS // On Windows, uninitialise socket layer. rc = WSACleanup (); wsa_assert (rc != SOCKET_ERROR); #endif #if defined ZMQ_HAVE_OPENPGM // Shut down the OpenPGM library. if (pgm_shutdown () != TRUE) zmq_assert (false); #endif errno = en; return rc; } void *zmq_socket (void *ctx_, int type_) { if (!ctx_ || !((zmq::ctx_t*) ctx_)->check_tag ()) { errno = EFAULT; return NULL; } return (void*) (((zmq::ctx_t*) ctx_)->create_socket (type_)); } int zmq_close (void *s_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } ((zmq::socket_base_t*) s_)->close (); return 0; } int zmq_setsockopt (void *s_, int option_, const void *optval_, size_t optvallen_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->setsockopt (option_, optval_, optvallen_)); } int zmq_getsockopt (void *s_, int option_, void *optval_, size_t *optvallen_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->getsockopt (option_, optval_, optvallen_)); } int zmq_bind (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->bind (addr_)); } int zmq_connect (void *s_, const char *addr_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->connect (addr_)); } int zmq_send (void *s_, zmq_msg_t *msg_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->send (msg_, flags_)); } int zmq_recv (void *s_, zmq_msg_t *msg_, int flags_) { if (!s_ || !((zmq::socket_base_t*) s_)->check_tag ()) { errno = ENOTSOCK; return -1; } return (((zmq::socket_base_t*) s_)->recv (msg_, flags_)); } #if defined ZMQ_FORCE_SELECT #define ZMQ_POLL_BASED_ON_SELECT #elif defined ZMQ_FORCE_POLL #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #define ZMQ_POLL_BASED_ON_POLL #elif defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS #define ZMQ_POLL_BASED_ON_SELECT #endif int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_) { #if defined ZMQ_POLL_BASED_ON_POLL if (unlikely (nitems_ < 0)) { errno = EINVAL; return -1; } if (unlikely (nitems_ == 0)) { if (timeout_ == 0) return 0; #if defined ZMQ_HAVE_WINDOWS Sleep (timeout_ > 0 ? timeout_ / 1000 : INFINITE); return 0; #else usleep (timeout_); return 0; #endif } if (!items_) { errno = EFAULT; return -1; } zmq::clock_t clock; uint64_t now = 0; uint64_t end = 0; pollfd *pollfds = (pollfd*) malloc (nitems_ * sizeof (pollfd)); alloc_assert (pollfds); // Build pollset for poll () system call. for (int i = 0; i != nitems_; i++) { // If the poll item is a 0MQ socket, we poll on the file descriptor // retrieved by the ZMQ_FD socket option. if (items_ [i].socket) { size_t zmq_fd_size = sizeof (zmq::fd_t); if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, &pollfds [i].fd, &zmq_fd_size) == -1) { free (pollfds); return -1; } pollfds [i].events = items_ [i].events ? POLLIN : 0; } // Else, the poll item is a raw file descriptor. Just convert the // events to normal POLLIN/POLLOUT for poll (). else { pollfds [i].fd = items_ [i].fd; pollfds [i].events = (items_ [i].events & ZMQ_POLLIN ? POLLIN : 0) | (items_ [i].events & ZMQ_POLLOUT ? POLLOUT : 0); } } bool first_pass = true; int nevents = 0; while (true) { // Compute the timeout for the subsequent poll. int timeout; if (first_pass) timeout = 0; else if (timeout_ < 0) timeout = -1; else timeout = end - now; // Wait for events. while (true) { int rc = poll (pollfds, nitems_, timeout); if (rc == -1 && errno == EINTR) { free (pollfds); return -1; } errno_assert (rc >= 0); break; } // Check for the events. for (int i = 0; i != nitems_; i++) { items_ [i].revents = 0; // The poll item is a 0MQ socket. Retrieve pending events // using the ZMQ_EVENTS socket option. if (items_ [i].socket) { size_t zmq_events_size = sizeof (uint32_t); uint32_t zmq_events; if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events, &zmq_events_size) == -1) { free (pollfds); return -1; } if ((items_ [i].events & ZMQ_POLLOUT) && (zmq_events & ZMQ_POLLOUT)) items_ [i].revents |= ZMQ_POLLOUT; if ((items_ [i].events & ZMQ_POLLIN) && (zmq_events & ZMQ_POLLIN)) items_ [i].revents |= ZMQ_POLLIN; } // Else, the poll item is a raw file descriptor, simply convert // the events to zmq_pollitem_t-style format. else { if (pollfds [i].revents & POLLIN) items_ [i].revents |= ZMQ_POLLIN; if (pollfds [i].revents & POLLOUT) items_ [i].revents |= ZMQ_POLLOUT; if (pollfds [i].revents & ~(POLLIN | POLLOUT)) items_ [i].revents |= ZMQ_POLLERR; } if (items_ [i].revents) nevents++; } // If timout is zero, exit immediately whether there are events or not. if (timeout_ == 0) break; // If there are events to return, we can exit immediately. if (nevents) break; // At this point we are meant to wait for events but there are none. // If timeout is infinite we can just loop until we get some events. if (timeout_ < 0) { if (first_pass) first_pass = false; continue; } // The timeout is finite and there are no events. In the first pass // we get a timestamp of when the polling have begun. (We assume that // first pass have taken negligible time). We also compute the time // when the polling should time out. if (first_pass) { now = clock.now_ms (); end = now + (timeout_ / 1000); if (now == end) break; first_pass = false; continue; } // Find out whether timeout have expired. now = clock.now_ms (); if (now >= end) break; } free (pollfds); return nevents; #elif defined ZMQ_POLL_BASED_ON_SELECT if (unlikely (nitems_ < 0)) { errno = EINVAL; return -1; } if (unlikely (nitems_ == 0)) { if (timeout_ == 0) return 0; #if defined ZMQ_HAVE_WINDOWS Sleep (timeout_ > 0 ? timeout_ / 1000 : INFINITE); return 0; #else usleep (timeout_); return 0; #endif } if (!items_) { errno = EFAULT; return -1; } zmq::clock_t clock; uint64_t now = 0; uint64_t end = 0; // Ensure we do not attempt to select () on more than FD_SETSIZE // file descriptors. zmq_assert (nitems_ <= FD_SETSIZE); fd_set pollset_in; FD_ZERO (&pollset_in); fd_set pollset_out; FD_ZERO (&pollset_out); fd_set pollset_err; FD_ZERO (&pollset_err); zmq::fd_t maxfd = 0; // Build the fd_sets for passing to select (). for (int i = 0; i != nitems_; i++) { // If the poll item is a 0MQ socket we are interested in input on the // notification file descriptor retrieved by the ZMQ_FD socket option. if (items_ [i].socket) { size_t zmq_fd_size = sizeof (zmq::fd_t); zmq::fd_t notify_fd; if (zmq_getsockopt (items_ [i].socket, ZMQ_FD, ¬ify_fd, &zmq_fd_size) == -1) return -1; if (items_ [i].events) { FD_SET (notify_fd, &pollset_in); if (maxfd < notify_fd) maxfd = notify_fd; } } // Else, the poll item is a raw file descriptor. Convert the poll item // events to the appropriate fd_sets. else { if (items_ [i].events & ZMQ_POLLIN) FD_SET (items_ [i].fd, &pollset_in); if (items_ [i].events & ZMQ_POLLOUT) FD_SET (items_ [i].fd, &pollset_out); if (items_ [i].events & ZMQ_POLLERR) FD_SET (items_ [i].fd, &pollset_err); if (maxfd < items_ [i].fd) maxfd = items_ [i].fd; } } bool first_pass = true; int nevents = 0; fd_set inset, outset, errset; while (true) { // Compute the timeout for the subsequent poll. timeval timeout; timeval *ptimeout; if (first_pass) { timeout.tv_sec = 0; timeout.tv_usec = 0; ptimeout = &timeout; } else if (timeout_ < 0) ptimeout = NULL; else { timeout.tv_sec = (long) ((end - now) / 1000); timeout.tv_usec = (long) ((end - now) % 1000 * 1000); ptimeout = &timeout; } // Wait for events. Ignore interrupts if there's infinite timeout. while (true) { memcpy (&inset, &pollset_in, sizeof (fd_set)); memcpy (&outset, &pollset_out, sizeof (fd_set)); memcpy (&errset, &pollset_err, sizeof (fd_set)); #if defined ZMQ_HAVE_WINDOWS int rc = select (0, &inset, &outset, &errset, ptimeout); if (unlikely (rc == SOCKET_ERROR)) { zmq::wsa_error_to_errno (); if (errno == ENOTSOCK) return -1; wsa_assert (false); } #else int rc = select (maxfd + 1, &inset, &outset, &errset, ptimeout); if (unlikely (rc == -1)) { if (errno == EINTR || errno == EBADF) return -1; errno_assert (false); } #endif break; } // Check for the events. for (int i = 0; i != nitems_; i++) { items_ [i].revents = 0; // The poll item is a 0MQ socket. Retrieve pending events // using the ZMQ_EVENTS socket option. if (items_ [i].socket) { size_t zmq_events_size = sizeof (uint32_t); uint32_t zmq_events; if (zmq_getsockopt (items_ [i].socket, ZMQ_EVENTS, &zmq_events, &zmq_events_size) == -1) return -1; if ((items_ [i].events & ZMQ_POLLOUT) && (zmq_events & ZMQ_POLLOUT)) items_ [i].revents |= ZMQ_POLLOUT; if ((items_ [i].events & ZMQ_POLLIN) && (zmq_events & ZMQ_POLLIN)) items_ [i].revents |= ZMQ_POLLIN; } // Else, the poll item is a raw file descriptor, simply convert // the events to zmq_pollitem_t-style format. else { if (FD_ISSET (items_ [i].fd, &inset)) items_ [i].revents |= ZMQ_POLLIN; if (FD_ISSET (items_ [i].fd, &outset)) items_ [i].revents |= ZMQ_POLLOUT; if (FD_ISSET (items_ [i].fd, &errset)) items_ [i].revents |= ZMQ_POLLERR; } if (items_ [i].revents) nevents++; } // If timout is zero, exit immediately whether there are events or not. if (timeout_ == 0) break; // If there are events to return, we can exit immediately. if (nevents) break; // At this point we are meant to wait for events but there are none. // If timeout is infinite we can just loop until we get some events. if (timeout_ < 0) { if (first_pass) first_pass = false; continue; } // The timeout is finite and there are no events. In the first pass // we get a timestamp of when the polling have begun. (We assume that // first pass have taken negligible time). We also compute the time // when the polling should time out. if (first_pass) { now = clock.now_ms (); end = now + (timeout_ / 1000); if (now == end) break; first_pass = false; continue; } // Find out whether timeout have expired. now = clock.now_ms (); if (now >= end) break; } return nevents; #else // Exotic platforms that support neither poll() nor select(). errno = ENOTSUP; return -1; #endif } #if defined ZMQ_POLL_BASED_ON_SELECT #undef ZMQ_POLL_BASED_ON_SELECT #endif #if defined ZMQ_POLL_BASED_ON_POLL #undef ZMQ_POLL_BASED_ON_POLL #endif int zmq_errno () { return errno; } int zmq_device (int device_, void *insocket_, void *outsocket_) { if (!insocket_ || !outsocket_) { errno = EFAULT; return -1; } if (device_ != ZMQ_FORWARDER && device_ != ZMQ_QUEUE && device_ != ZMQ_STREAMER) { errno = EINVAL; return -1; } return zmq::device ((zmq::socket_base_t*) insocket_, (zmq::socket_base_t*) outsocket_); } //////////////////////////////////////////////////////////////////////////////// // 0MQ utils - to be used by perf tests //////////////////////////////////////////////////////////////////////////////// void zmq_sleep (int seconds_) { #if defined ZMQ_HAVE_WINDOWS Sleep (seconds_ * 1000); #else sleep (seconds_); #endif } void *zmq_stopwatch_start () { uint64_t *watch = (uint64_t*) malloc (sizeof (uint64_t)); alloc_assert (watch); *watch = zmq::clock_t::now_us (); return (void*) watch; } unsigned long zmq_stopwatch_stop (void *watch_) { uint64_t end = zmq::clock_t::now_us (); uint64_t start = *(uint64_t*) watch_; free (watch_); return (unsigned long) (end - start); } zeromq-2.2.0.orig/src/pair.hpp0000664000000000000000000000421011732125604014720 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PAIR_HPP_INCLUDED__ #define __ZMQ_PAIR_HPP_INCLUDED__ #include "socket_base.hpp" #include "pipe.hpp" namespace zmq { class pair_t : public socket_base_t, public i_reader_events, public i_writer_events { public: pair_t (class ctx_t *parent_, uint32_t tid_); ~pair_t (); // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); bool xhas_out (); // i_reader_events interface implementation. void activated (class reader_t *pipe_); void terminated (class reader_t *pipe_); void delimited (class reader_t *pipe_); // i_writer_events interface implementation. void activated (class writer_t *pipe_); void terminated (class writer_t *pipe_); private: // Hook into termination process. void process_term (int linger_); class reader_t *inpipe; class writer_t *outpipe; bool inpipe_alive; bool outpipe_alive; bool terminating; pair_t (const pair_t&); const pair_t &operator = (const pair_t&); }; } #endif zeromq-2.2.0.orig/src/ypipe.hpp0000664000000000000000000001602611732125604015123 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YPIPE_HPP_INCLUDED__ #define __ZMQ_YPIPE_HPP_INCLUDED__ #include "atomic_ptr.hpp" #include "yqueue.hpp" #include "platform.hpp" namespace zmq { // Lock-free queue implementation. // Only a single thread can read from the pipe at any specific moment. // Only a single thread can write to the pipe at any specific moment. // T is the type of the object in the queue. // N is granularity of the pipe, i.e. how many items are needed to // perform next memory allocation. template class ypipe_t { public: // Initialises the pipe. inline ypipe_t () { // Insert terminator element into the queue. queue.push (); // Let all the pointers to point to the terminator. // (unless pipe is dead, in which case c is set to NULL). r = w = f = &queue.back (); c.set (&queue.back ()); } // The destructor doesn't have to be virtual. It is mad virtual // just to keep ICC and code checking tools from complaining. inline virtual ~ypipe_t () { } // Following function (write) deliberately copies uninitialised data // when used with zmq_msg. Initialising the VSM body for // non-VSM messages won't be good for performance. #ifdef ZMQ_HAVE_OPENVMS #pragma message save #pragma message disable(UNINIT) #endif // Write an item to the pipe. Don't flush it yet. If incomplete is // set to true the item is assumed to be continued by items // subsequently written to the pipe. Incomplete items are never // flushed down the stream. inline void write (const T &value_, bool incomplete_) { // Place the value to the queue, add new terminator element. queue.back () = value_; queue.push (); // Move the "flush up to here" poiter. if (!incomplete_) f = &queue.back (); } #ifdef ZMQ_HAVE_OPENVMS #pragma message restore #endif // Pop an incomplete item from the pipe. Returns true is such // item exists, false otherwise. inline bool unwrite (T *value_) { if (f == &queue.back ()) return false; queue.unpush (); *value_ = queue.back (); return true; } // Flush all the completed items into the pipe. Returns false if // the reader thread is sleeping. In that case, caller is obliged to // wake the reader up before using the pipe again. inline bool flush () { // If there are no un-flushed items, do nothing. if (w == f) return true; // Try to set 'c' to 'f'. if (c.cas (w, f) != w) { // Compare-and-swap was unseccessful because 'c' is NULL. // This means that the reader is asleep. Therefore we don't // care about thread-safeness and update c in non-atomic // manner. We'll return false to let the caller know // that reader is sleeping. c.set (f); w = f; return false; } // Reader is alive. Nothing special to do now. Just move // the 'first un-flushed item' pointer to 'f'. w = f; return true; } // Check whether item is available for reading. inline bool check_read () { // Was the value prefetched already? If so, return. if (&queue.front () != r && r) return true; // There's no prefetched value, so let us prefetch more values. // Prefetching is to simply retrieve the // pointer from c in atomic fashion. If there are no // items to prefetch, set c to NULL (using compare-and-swap). r = c.cas (&queue.front (), NULL); // If there are no elements prefetched, exit. // During pipe's lifetime r should never be NULL, however, // it can happen during pipe shutdown when items // are being deallocated. if (&queue.front () == r || !r) return false; // There was at least one value prefetched. return true; } // Reads an item from the pipe. Returns false if there is no value. // available. inline bool read (T *value_) { // Try to prefetch a value. if (!check_read ()) return false; // There was at least one value prefetched. // Return it to the caller. *value_ = queue.front (); queue.pop (); return true; } // Applies the function fn to the first elemenent in the pipe // and returns the value returned by the fn. // The pipe mustn't be empty or the function crashes. inline bool probe (bool (*fn)(T &)) { bool rc = check_read (); zmq_assert (rc); return (*fn) (queue.front ()); } protected: // Allocation-efficient queue to store pipe items. // Front of the queue points to the first prefetched item, back of // the pipe points to last un-flushed item. Front is used only by // reader thread, while back is used only by writer thread. yqueue_t queue; // Points to the first un-flushed item. This variable is used // exclusively by writer thread. T *w; // Points to the first un-prefetched item. This variable is used // exclusively by reader thread. T *r; // Points to the first item to be flushed in the future. T *f; // The single point of contention between writer and reader thread. // Points past the last flushed item. If it is NULL, // reader is asleep. This pointer should be always accessed using // atomic operations. atomic_ptr_t c; // Disable copying of ypipe object. ypipe_t (const ypipe_t&); const ypipe_t &operator = (const ypipe_t&); }; } #endif zeromq-2.2.0.orig/src/pgm_sender.hpp0000664000000000000000000000534611732125604016123 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_PGM_SENDER_HPP_INCLUDED__ #define __ZMQ_PGM_SENDER_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_OPENPGM #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include "stdint.hpp" #include "io_object.hpp" #include "i_engine.hpp" #include "options.hpp" #include "pgm_socket.hpp" #include "encoder.hpp" namespace zmq { class pgm_sender_t : public io_object_t, public i_engine { public: pgm_sender_t (class io_thread_t *parent_, const options_t &options_); ~pgm_sender_t (); int init (bool udp_encapsulation_, const char *network_); // i_engine interface implementation. void plug (class io_thread_t *io_thread_, struct i_inout *inout_); void unplug (); void terminate (); void activate_in (); void activate_out (); // i_poll_events interface implementation. void in_event (); void out_event (); void timer_event (int token); private: // TX and RX timeout timer ID's. enum {tx_timer_id = 0xa0, rx_timer_id = 0xa1}; // Timers are running. bool has_tx_timer; bool has_rx_timer; // Message encoder. encoder_t encoder; // PGM socket. pgm_socket_t pgm_socket; // Socket options. options_t options; // Poll handle associated with PGM socket. handle_t handle; handle_t uplink_handle; handle_t rdata_notify_handle; handle_t pending_notify_handle; // Output buffer from pgm_socket. unsigned char *out_buffer; // Output buffer size. size_t out_buffer_size; // Number of bytes in the buffer to be written to the socket. // If zero, there are no data to be sent. size_t write_size; pgm_sender_t (const pgm_sender_t&); const pgm_sender_t &operator = (const pgm_sender_t&); }; } #endif #endif zeromq-2.2.0.orig/src/kqueue.hpp0000664000000000000000000000532311732125604015272 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_KQUEUE_HPP_INCLUDED__ #define __ZMQ_KQUEUE_HPP_INCLUDED__ #include "platform.hpp" #if defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_OPENBSD ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_NETBSD #include #include "fd.hpp" #include "thread.hpp" #include "poller_base.hpp" namespace zmq { // Implements socket polling mechanism using the BSD-specific // kqueue interface. class kqueue_t : public poller_base_t { public: typedef void* handle_t; kqueue_t (); ~kqueue_t (); // "poller" concept. handle_t add_fd (fd_t fd_, struct i_poll_events *events_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void start (); void stop (); private: // Main worker thread routine. static void worker_routine (void *arg_); // Main event loop. void loop (); // File descriptor referring to the kernel event queue. fd_t kqueue_fd; // Adds the event to the kqueue. void kevent_add (fd_t fd_, short filter_, void *udata_); // Deletes the event from the kqueue. void kevent_delete (fd_t fd_, short filter_); struct poll_entry_t { fd_t fd; bool flag_pollin; bool flag_pollout; i_poll_events *reactor; }; // List of retired event sources. typedef std::vector retired_t; retired_t retired; // If true, thread is in the process of shutting down. bool stopping; // Handle of the physical thread doing the I/O work. thread_t worker; kqueue_t (const kqueue_t&); const kqueue_t &operator = (const kqueue_t&); }; } #endif #endif zeromq-2.2.0.orig/src/named_session.cpp0000664000000000000000000000526211732125604016617 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "named_session.hpp" #include "socket_base.hpp" zmq::named_session_t::named_session_t (class io_thread_t *io_thread_, socket_base_t *socket_, const options_t &options_, const blob_t &name_) : session_t (io_thread_, socket_, options_), name (name_) { // Make double sure that the session has valid name. zmq_assert (!name.empty ()); zmq_assert (name [0] != 0); if (!socket_->register_session (name, this)) { // TODO: There's already a session with the specified // identity. We should log the error and drop the // session. zmq_assert (false); } } zmq::named_session_t::~named_session_t () { // Unregister the session from the global list of named sessions. if (!name.empty ()) unregister_session (name); } void zmq::named_session_t::attached (const blob_t &peer_identity_) { if (!name.empty ()) { // If both IDs are temporary, no checking is needed. // TODO: Old ID should be reused in this case... if (name.empty () || name [0] != 0 || peer_identity_.empty () || peer_identity_ [0] != 0) { // If we already know the peer name do nothing, just check whether // it haven't changed. zmq_assert (name == peer_identity_); } } else if (!peer_identity_.empty ()) { // Store the peer identity. name = peer_identity_; // Register the session using the peer name. if (!register_session (name, this)) { // TODO: There's already a session with the specified // identity. We should presumably syslog it and drop the // session. zmq_assert (false); } } } void zmq::named_session_t::detached () { // Do nothing. Named sessions are never destroyed because of disconnection, // neither they have to actively reconnect. } zeromq-2.2.0.orig/src/devpoll.cpp0000664000000000000000000001201611732125604015430 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_SOLARIS || defined ZMQ_HAVE_HPUX #include #include #include #include #include #include #include #include #include #include "devpoll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::devpoll_t::devpoll_t () : stopping (false) { devpoll_fd = open ("/dev/poll", O_RDWR); errno_assert (devpoll_fd != -1); } zmq::devpoll_t::~devpoll_t () { worker.stop (); close (devpoll_fd); } void zmq::devpoll_t::devpoll_ctl (fd_t fd_, short events_) { struct pollfd pfd = {fd_, events_, 0}; ssize_t rc = write (devpoll_fd, &pfd, sizeof pfd); zmq_assert (rc == sizeof pfd); } zmq::devpoll_t::handle_t zmq::devpoll_t::add_fd (fd_t fd_, i_poll_events *reactor_) { // If the file descriptor table is too small expand it. fd_table_t::size_type sz = fd_table.size (); if (sz <= (fd_table_t::size_type) fd_) { fd_table.resize (fd_ + 1); while (sz != (fd_table_t::size_type) (fd_ + 1)) { fd_table [sz].valid = false; ++sz; } } assert (!fd_table [fd_].valid); fd_table [fd_].events = 0; fd_table [fd_].reactor = reactor_; fd_table [fd_].valid = true; fd_table [fd_].accepted = false; devpoll_ctl (fd_, 0); pending_list.push_back (fd_); // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::devpoll_t::rm_fd (handle_t handle_) { assert (fd_table [handle_].valid); devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].valid = false; // Decrease the load metric of the thread. adjust_load (-1); } void zmq::devpoll_t::set_pollin (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events |= POLLIN; devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::reset_pollin (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events &= ~((short) POLLIN); devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::set_pollout (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events |= POLLOUT; devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::reset_pollout (handle_t handle_) { devpoll_ctl (handle_, POLLREMOVE); fd_table [handle_].events &= ~((short) POLLOUT); devpoll_ctl (handle_, fd_table [handle_].events); } void zmq::devpoll_t::start () { worker.start (worker_routine, this); } void zmq::devpoll_t::stop () { stopping = true; } void zmq::devpoll_t::loop () { while (!stopping) { struct pollfd ev_buf [max_io_events]; struct dvpoll poll_req; for (pending_list_t::size_type i = 0; i < pending_list.size (); i ++) fd_table [pending_list [i]].accepted = true; pending_list.clear (); // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. // On Solaris, we can retrieve no more then (OPEN_MAX - 1) events. poll_req.dp_fds = &ev_buf [0]; #if defined ZMQ_HAVE_SOLARIS poll_req.dp_nfds = std::min ((int) max_io_events, OPEN_MAX - 1); #else poll_req.dp_nfds = max_io_events; #endif poll_req.dp_timeout = timeout ? timeout : -1; int n = ioctl (devpoll_fd, DP_POLL, &poll_req); if (n == -1 && errno == EINTR) continue; errno_assert (n != -1); for (int i = 0; i < n; i ++) { fd_entry_t *fd_ptr = &fd_table [ev_buf [i].fd]; if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & (POLLERR | POLLHUP)) fd_ptr->reactor->in_event (); if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & POLLOUT) fd_ptr->reactor->out_event (); if (!fd_ptr->valid || !fd_ptr->accepted) continue; if (ev_buf [i].revents & POLLIN) fd_ptr->reactor->in_event (); } } } void zmq::devpoll_t::worker_routine (void *arg_) { ((devpoll_t*) arg_)->loop (); } #endif zeromq-2.2.0.orig/src/poll.cpp0000664000000000000000000001137011732125604014733 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OPENBSD || defined ZMQ_HAVE_SOLARIS ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_QNXNTO ||\ defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_AIX ||\ defined ZMQ_HAVE_NETBSD #include #include #include #include #include "poll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::poll_t::poll_t () : retired (false), stopping (false) { } zmq::poll_t::~poll_t () { worker.stop (); } zmq::poll_t::handle_t zmq::poll_t::add_fd (fd_t fd_, i_poll_events *events_) { // If the file descriptor table is too small expand it. fd_table_t::size_type sz = fd_table.size (); if (sz <= (fd_table_t::size_type) fd_) { fd_table.resize (fd_ + 1); while (sz != (fd_table_t::size_type) (fd_ + 1)) { fd_table [sz].index = retired_fd; ++sz; } } pollfd pfd = {fd_, 0, 0}; pollset.push_back (pfd); assert (fd_table [fd_].index == retired_fd); fd_table [fd_].index = pollset.size() - 1; fd_table [fd_].events = events_; // Increase the load metric of the thread. adjust_load (1); return fd_; } void zmq::poll_t::rm_fd (handle_t handle_) { fd_t index = fd_table [handle_].index; assert (index != retired_fd); // Mark the fd as unused. pollset [index].fd = retired_fd; fd_table [handle_].index = retired_fd; retired = true; // Decrease the load metric of the thread. adjust_load (-1); } void zmq::poll_t::set_pollin (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events |= POLLIN; } void zmq::poll_t::reset_pollin (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLIN); } void zmq::poll_t::set_pollout (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events |= POLLOUT; } void zmq::poll_t::reset_pollout (handle_t handle_) { int index = fd_table [handle_].index; pollset [index].events &= ~((short) POLLOUT); } void zmq::poll_t::start () { worker.start (worker_routine, this); } void zmq::poll_t::stop () { stopping = true; } void zmq::poll_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. int rc = poll (&pollset [0], pollset.size (), timeout ? timeout : -1); if (rc == -1 && errno == EINTR) continue; errno_assert (rc != -1); // If there are no events (i.e. it's a timeout) there's no point // in checking the pollset. if (rc == 0) continue; for (pollset_t::size_type i = 0; i != pollset.size (); i++) { zmq_assert (!(pollset [i].revents & POLLNVAL)); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & (POLLERR | POLLHUP)) fd_table [pollset [i].fd].events->in_event (); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & POLLOUT) fd_table [pollset [i].fd].events->out_event (); if (pollset [i].fd == retired_fd) continue; if (pollset [i].revents & POLLIN) fd_table [pollset [i].fd].events->in_event (); } // Clean up the pollset and update the fd_table accordingly. if (retired) { pollset_t::size_type i = 0; while (i < pollset.size ()) { if (pollset [i].fd == retired_fd) pollset.erase (pollset.begin () + i); else { fd_table [pollset [i].fd].index = i; i ++; } } retired = false; } } } void zmq::poll_t::worker_routine (void *arg_) { ((poll_t*) arg_)->loop (); } #endif zeromq-2.2.0.orig/src/zmq_listener.hpp0000664000000000000000000000360211732125604016505 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ZMQ_LISTENER_HPP_INCLUDED__ #define __ZMQ_ZMQ_LISTENER_HPP_INCLUDED__ #include "own.hpp" #include "io_object.hpp" #include "tcp_listener.hpp" #include "stdint.hpp" namespace zmq { class zmq_listener_t : public own_t, public io_object_t { public: zmq_listener_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_); ~zmq_listener_t (); // Set address to listen on. int set_address (const char* protocol_, const char *addr_); private: // Handlers for incoming commands. void process_plug (); void process_term (int linger_); // Handlers for I/O events. void in_event (); // Actual listening socket. tcp_listener_t tcp_listener; // Handle corresponding to the listening socket. handle_t handle; // Socket the listerner belongs to. class socket_base_t *socket; zmq_listener_t (const zmq_listener_t&); const zmq_listener_t &operator = (const zmq_listener_t&); }; } #endif zeromq-2.2.0.orig/src/zmq_connecter.hpp0000664000000000000000000000551411732125604016644 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ZMQ_CONNECTER_HPP_INCLUDED__ #define __ZMQ_ZMQ_CONNECTER_HPP_INCLUDED__ #include "own.hpp" #include "io_object.hpp" #include "tcp_connecter.hpp" #include "stdint.hpp" namespace zmq { class zmq_connecter_t : public own_t, public io_object_t { public: // If 'wait' is true connecter first waits for a while, then starts // connection process. zmq_connecter_t (class io_thread_t *io_thread_, class session_t *session_, const options_t &options_, const char *protocol_, const char *address_, bool delay_); ~zmq_connecter_t (); private: // ID of the timer used to delay the reconnection. enum {reconnect_timer_id = 1}; // Handlers for incoming commands. void process_plug (); // Handlers for I/O events. void in_event (); void out_event (); void timer_event (int id_); // Internal function to start the actual connection establishment. void start_connecting (); // Internal function to add a reconnect timer void add_reconnect_timer(); // Internal function to return a reconnect backoff delay. // Will modify the current_reconnect_ivl used for next call // Returns the currently used interval int get_new_reconnect_ivl (); // Actual connecting socket. tcp_connecter_t tcp_connecter; // Handle corresponding to the listening socket. handle_t handle; // If true file descriptor is registered with the poller and 'handle' // contains valid value. bool handle_valid; // If true, connecter is waiting a while before trying to connect. bool wait; // Reference to the session we belong to. class session_t *session; // Current reconnect ivl, updated for backoff strategy int current_reconnect_ivl; zmq_connecter_t (const zmq_connecter_t&); const zmq_connecter_t &operator = (const zmq_connecter_t&); }; } #endif zeromq-2.2.0.orig/src/transient_session.hpp0000664000000000000000000000314611732125604017546 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TRANSIENT_SESSION_HPP_INCLUDED__ #define __ZMQ_TRANSIENT_SESSION_HPP_INCLUDED__ #include "session.hpp" namespace zmq { // Transient session is created by the listener when the connected peer // stays anonymous. Transient session is destroyed on disconnect. class transient_session_t : public session_t { public: transient_session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_); ~transient_session_t (); private: // Handlers for events from session base class. void attached (const blob_t &peer_identity_); void detached (); transient_session_t (const transient_session_t&); const transient_session_t &operator = (const transient_session_t&); }; } #endif zeromq-2.2.0.orig/src/io_object.hpp0000664000000000000000000000443611732125604015734 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_IO_OBJECT_HPP_INCLUDED__ #define __ZMQ_IO_OBJECT_HPP_INCLUDED__ #include #include "stdint.hpp" #include "poller.hpp" #include "i_poll_events.hpp" namespace zmq { // Simple base class for objects that live in I/O threads. // It makes communication with the poller object easier and // makes defining unneeded event handlers unnecessary. class io_object_t : public i_poll_events { public: io_object_t (class io_thread_t *io_thread_ = NULL); ~io_object_t (); // When migrating an object from one I/O thread to another, first // unplug it, then migrate it, then plug it to the new thread. void plug (class io_thread_t *io_thread_); void unplug (); protected: typedef poller_t::handle_t handle_t; // Methods to access underlying poller object. handle_t add_fd (fd_t fd_); void rm_fd (handle_t handle_); void set_pollin (handle_t handle_); void reset_pollin (handle_t handle_); void set_pollout (handle_t handle_); void reset_pollout (handle_t handle_); void add_timer (int timout_, int id_); void cancel_timer (int id_); // i_poll_events interface implementation. void in_event (); void out_event (); void timer_event (int id_); private: poller_t *poller; io_object_t (const io_object_t&); const io_object_t &operator = (const io_object_t&); }; } #endif zeromq-2.2.0.orig/src/mutex.hpp0000664000000000000000000000502111732125604015130 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MUTEX_HPP_INCLUDED__ #define __ZMQ_MUTEX_HPP_INCLUDED__ #include "platform.hpp" #include "err.hpp" // Mutex class encapsulates OS mutex in a platform-independent way. #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" namespace zmq { class mutex_t { public: inline mutex_t () { InitializeCriticalSection (&cs); } inline ~mutex_t () { DeleteCriticalSection (&cs); } inline void lock () { EnterCriticalSection (&cs); } inline void unlock () { LeaveCriticalSection (&cs); } private: CRITICAL_SECTION cs; // Disable copy construction and assignment. mutex_t (const mutex_t&); void operator = (const mutex_t&); }; } #else #include namespace zmq { class mutex_t { public: inline mutex_t () { int rc = pthread_mutex_init (&mutex, NULL); if (rc) posix_assert (rc); } inline ~mutex_t () { int rc = pthread_mutex_destroy (&mutex); if (rc) posix_assert (rc); } inline void lock () { int rc = pthread_mutex_lock (&mutex); if (rc) posix_assert (rc); } inline void unlock () { int rc = pthread_mutex_unlock (&mutex); if (rc) posix_assert (rc); } private: pthread_mutex_t mutex; // Disable copy construction and assignment. mutex_t (const mutex_t&); const mutex_t &operator = (const mutex_t&); }; } #endif #endif zeromq-2.2.0.orig/src/tcp_connecter.hpp0000664000000000000000000000427611732125604016627 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_TCP_CONNECTER_HPP_INCLUDED__ #define __ZMQ_TCP_CONNECTER_HPP_INCLUDED__ #include "platform.hpp" #include "fd.hpp" #ifdef ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #endif namespace zmq { // The class encapsulating simple TCP listening socket. class tcp_connecter_t { public: tcp_connecter_t (); ~tcp_connecter_t (); // Set address to connect to. int set_address (const char *protocol, const char *addr_); // Open TCP connecting socket. Address is in // : format. Returns -1 in case of error, // 0 if connect was successfull immediately and 1 if async connect // was launched. int open (); // Close the connecting socket. int close (); // Get the file descriptor to poll on to get notified about // connection success. fd_t get_fd (); // Get the file descriptor of newly created connection. Returns // retired_fd if the connection was unsuccessfull. fd_t connect (); private: // Address to connect to. sockaddr_storage addr; socklen_t addr_len; // Underlying socket. fd_t s; tcp_connecter_t (const tcp_connecter_t&); const tcp_connecter_t &operator = (const tcp_connecter_t&); }; } #endif zeromq-2.2.0.orig/src/lb.hpp0000664000000000000000000000431611732125604014371 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_LB_HPP_INCLUDED__ #define __ZMQ_LB_HPP_INCLUDED__ #include "array.hpp" #include "pipe.hpp" namespace zmq { // Class manages a set of outbound pipes. On send it load balances // messages fairly among the pipes. class lb_t : public i_writer_events { public: lb_t (class own_t *sink_); ~lb_t (); void attach (writer_t *pipe_); void terminate (); int send (zmq_msg_t *msg_, int flags_); bool has_out (); // i_writer_events interface implementation. void activated (writer_t *pipe_); void terminated (writer_t *pipe_); private: // List of outbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. pipes_t::size_type active; // Points to the last pipe that the most recent message was sent to. pipes_t::size_type current; // True if last we are in the middle of a multipart message. bool more; // True if we are dropping current message. bool dropping; // Object to send events to. class own_t *sink; // If true, termination process is already underway. bool terminating; lb_t (const lb_t&); const lb_t &operator = (const lb_t&); }; } #endif zeromq-2.2.0.orig/src/epoll.cpp0000664000000000000000000001113211732125604015074 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #ifdef ZMQ_HAVE_LINUX #include #include #include #include #include #include #include "epoll.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" zmq::epoll_t::epoll_t () : stopping (false) { epoll_fd = epoll_create (1); errno_assert (epoll_fd != -1); } zmq::epoll_t::~epoll_t () { // Wait till the worker thread exits. worker.stop (); close (epoll_fd); for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; } zmq::epoll_t::handle_t zmq::epoll_t::add_fd (fd_t fd_, i_poll_events *events_) { poll_entry_t *pe = new (std::nothrow) poll_entry_t; alloc_assert (pe); // The memset is not actually needed. It's here to prevent debugging // tools to complain about using uninitialised memory. memset (pe, 0, sizeof (poll_entry_t)); pe->fd = fd_; pe->ev.events = 0; pe->ev.data.ptr = pe; pe->events = events_; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_ADD, fd_, &pe->ev); errno_assert (rc != -1); // Increase the load metric of the thread. adjust_load (1); return pe; } void zmq::epoll_t::rm_fd (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_DEL, pe->fd, &pe->ev); errno_assert (rc != -1); pe->fd = retired_fd; retired.push_back (pe); // Decrease the load metric of the thread. adjust_load (-1); } void zmq::epoll_t::set_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events |= EPOLLIN; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::reset_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events &= ~((short) EPOLLIN); int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::set_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events |= EPOLLOUT; int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::reset_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; pe->ev.events &= ~((short) EPOLLOUT); int rc = epoll_ctl (epoll_fd, EPOLL_CTL_MOD, pe->fd, &pe->ev); errno_assert (rc != -1); } void zmq::epoll_t::start () { worker.start (worker_routine, this); } void zmq::epoll_t::stop () { stopping = true; } void zmq::epoll_t::loop () { epoll_event ev_buf [max_io_events]; while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. int n = epoll_wait (epoll_fd, &ev_buf [0], max_io_events, timeout ? timeout : -1); if (n == -1 && errno == EINTR) continue; errno_assert (n != -1); for (int i = 0; i < n; i ++) { poll_entry_t *pe = ((poll_entry_t*) ev_buf [i].data.ptr); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & (EPOLLERR | EPOLLHUP)) pe->events->in_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & EPOLLOUT) pe->events->out_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].events & EPOLLIN) pe->events->in_event (); } // Destroy retired event sources. for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; retired.clear (); } } void zmq::epoll_t::worker_routine (void *arg_) { ((epoll_t*) arg_)->loop (); } #endif zeromq-2.2.0.orig/src/zmq_init.hpp0000664000000000000000000000525411732125604015630 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_ZMQ_INIT_HPP_INCLUDED__ #define __ZMQ_ZMQ_INIT_HPP_INCLUDED__ #include "i_inout.hpp" #include "i_engine.hpp" #include "own.hpp" #include "fd.hpp" #include "stdint.hpp" #include "stdint.hpp" #include "blob.hpp" namespace zmq { // The class handles initialisation phase of 0MQ wire-level protocol. class zmq_init_t : public own_t, public i_inout { public: zmq_init_t (class io_thread_t *io_thread_, class socket_base_t *socket_, class session_t *session_, fd_t fd_, const options_t &options_); ~zmq_init_t (); private: void finalise_initialisation (); void dispatch_engine (); // i_inout interface implementation. bool read (::zmq_msg_t *msg_); bool write (::zmq_msg_t *msg_); void flush (); void detach (); // Handlers for incoming commands. void process_plug (); void process_unplug (); // Associated wire-protocol engine. i_engine *engine; // Detached transient engine. i_engine *ephemeral_engine; // True if our own identity was already sent to the peer. bool sent; // True if peer's identity was already received. bool received; // Socket the object belongs to. class socket_base_t *socket; // Reference to the session the init object belongs to. // If the associated session is unknown and should be found // depending on peer identity this value is NULL. class session_t *session; // Identity of the peer socket. blob_t peer_identity; // I/O thread the object is living in. It will be used to plug // the engine into the same I/O thread. class io_thread_t *io_thread; zmq_init_t (const zmq_init_t&); const zmq_init_t &operator = (const zmq_init_t&); }; } #endif zeromq-2.2.0.orig/src/semaphore.hpp0000664000000000000000000001125111732125604015753 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_SEMAPHORE_HPP_INCLUDED__ #define __ZMQ_SEMAPHORE_HPP_INCLUDED__ #include "platform.hpp" #include "err.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #elif defined ZMQ_HAVE_OPENVMS #include #else #include #endif namespace zmq { // Simple semaphore. Only single thread may be waiting at any given time. // Also, the semaphore may not be posted before the previous post // was matched by corresponding wait and the waiting thread was // released. #if defined ZMQ_HAVE_WINDOWS // On Windows platform simple semaphore is implemeted using event object. class semaphore_t { public: // Initialise the semaphore. inline semaphore_t () { ev = CreateEvent (NULL, FALSE, FALSE, NULL); win_assert (ev != NULL); } // Destroy the semaphore. inline ~semaphore_t () { int rc = CloseHandle (ev); win_assert (rc != 0); } // Wait for the semaphore. inline void wait () { DWORD rc = WaitForSingleObject (ev, INFINITE); win_assert (rc != WAIT_FAILED); } // Post the semaphore. inline void post () { int rc = SetEvent (ev); win_assert (rc != 0); } private: HANDLE ev; semaphore_t (const semaphore_t&); const semaphore_t &operator = (const semaphore_t&); }; #elif defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENVMS // On platforms that allow for double locking of a mutex from the same // thread, simple semaphore is implemented using mutex, as it is more // efficient than full-blown semaphore. // Note that OS-level semaphore is not implemented on OSX, so the below // code is not only optimisation, it's necessary to make 0MQ work on OSX. class semaphore_t { public: // Initialise the semaphore. inline semaphore_t () { int rc = pthread_mutex_init (&mutex, NULL); posix_assert (rc); rc = pthread_mutex_lock (&mutex); posix_assert (rc); } // Destroy the semaphore. inline ~semaphore_t () { int rc = pthread_mutex_unlock (&mutex); posix_assert (rc); rc = pthread_mutex_destroy (&mutex); posix_assert (rc); } // Wait for the semaphore. inline void wait () { int rc = pthread_mutex_lock (&mutex); posix_assert (rc); } // Post the semaphore. inline void post () { int rc = pthread_mutex_unlock (&mutex); posix_assert (rc); } private: pthread_mutex_t mutex; semaphore_t (const semaphore_t&); const semaphore_t &operator = (const semaphore_t&); }; #else // Default implementation maps simple semaphore to POSIX semaphore. class semaphore_t { public: // Initialise the semaphore. inline semaphore_t () { int rc = sem_init (&sem, 0, 0); errno_assert (rc != -1); } // Destroy the semaphore. inline ~semaphore_t () { int rc = sem_destroy (&sem); errno_assert (rc != -1); } // Wait for the semaphore. inline void wait () { int rc = sem_wait (&sem); errno_assert (rc != -1); } // Post the semaphore. inline void post () { int rc = sem_post (&sem); errno_assert (rc != -1); } private: // Underlying system semaphore object. sem_t sem; semaphore_t (const semaphore_t&); const semaphore_t &operator = (const semaphore_t&); }; #endif } #endif zeromq-2.2.0.orig/src/transient_session.cpp0000664000000000000000000000244211732125604017537 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "transient_session.hpp" zmq::transient_session_t::transient_session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_) : session_t (io_thread_, socket_, options_) { } zmq::transient_session_t::~transient_session_t () { } void zmq::transient_session_t::attached (const blob_t &peer_identity_) { } void zmq::transient_session_t::detached () { // There's no way to reestablish a transient session. Tear it down. terminate (); } zeromq-2.2.0.orig/src/kqueue.cpp0000664000000000000000000001211311732125604015260 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_FREEBSD || defined ZMQ_HAVE_OPENBSD ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_NETBSD #include #include #include #include #include #include #include #include "kqueue.hpp" #include "err.hpp" #include "config.hpp" #include "i_poll_events.hpp" #include "likely.hpp" // NetBSD defines (struct kevent).udata as intptr_t, everyone else // as void *. #if defined ZMQ_HAVE_NETBSD #define kevent_udata_t intptr_t #else #define kevent_udata_t void * #endif zmq::kqueue_t::kqueue_t () : stopping (false) { // Create event queue kqueue_fd = kqueue (); errno_assert (kqueue_fd != -1); } zmq::kqueue_t::~kqueue_t () { worker.stop (); close (kqueue_fd); } void zmq::kqueue_t::kevent_add (fd_t fd_, short filter_, void *udata_) { struct kevent ev; EV_SET (&ev, fd_, filter_, EV_ADD, 0, 0, (kevent_udata_t)udata_); int rc = kevent (kqueue_fd, &ev, 1, NULL, 0, NULL); errno_assert (rc != -1); } void zmq::kqueue_t::kevent_delete (fd_t fd_, short filter_) { struct kevent ev; EV_SET (&ev, fd_, filter_, EV_DELETE, 0, 0, 0); int rc = kevent (kqueue_fd, &ev, 1, NULL, 0, NULL); errno_assert (rc != -1); } zmq::kqueue_t::handle_t zmq::kqueue_t::add_fd (fd_t fd_, i_poll_events *reactor_) { poll_entry_t *pe = new (std::nothrow) poll_entry_t; alloc_assert (pe); pe->fd = fd_; pe->flag_pollin = 0; pe->flag_pollout = 0; pe->reactor = reactor_; adjust_load (1); return pe; } void zmq::kqueue_t::rm_fd (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (pe->flag_pollin) kevent_delete (pe->fd, EVFILT_READ); if (pe->flag_pollout) kevent_delete (pe->fd, EVFILT_WRITE); pe->fd = retired_fd; retired.push_back (pe); adjust_load (-1); } void zmq::kqueue_t::set_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (!pe->flag_pollin)) { pe->flag_pollin = true; kevent_add (pe->fd, EVFILT_READ, pe); } } void zmq::kqueue_t::reset_pollin (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (pe->flag_pollin)) { pe->flag_pollin = false; kevent_delete (pe->fd, EVFILT_READ); } } void zmq::kqueue_t::set_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (!pe->flag_pollout)) { pe->flag_pollout = true; kevent_add (pe->fd, EVFILT_WRITE, pe); } } void zmq::kqueue_t::reset_pollout (handle_t handle_) { poll_entry_t *pe = (poll_entry_t*) handle_; if (likely (pe->flag_pollout)) { pe->flag_pollout = false; kevent_delete (pe->fd, EVFILT_WRITE); } } void zmq::kqueue_t::start () { worker.start (worker_routine, this); } void zmq::kqueue_t::stop () { stopping = true; } void zmq::kqueue_t::loop () { while (!stopping) { // Execute any due timers. int timeout = (int) execute_timers (); // Wait for events. struct kevent ev_buf [max_io_events]; timespec ts = {timeout / 1000, (timeout % 1000) * 1000000}; int n = kevent (kqueue_fd, NULL, 0, &ev_buf [0], max_io_events, timeout ? &ts: NULL); if (n == -1 && errno == EINTR) continue; errno_assert (n != -1); for (int i = 0; i < n; i ++) { poll_entry_t *pe = (poll_entry_t*) ev_buf [i].udata; if (pe->fd == retired_fd) continue; if (ev_buf [i].flags & EV_EOF) pe->reactor->in_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].filter == EVFILT_WRITE) pe->reactor->out_event (); if (pe->fd == retired_fd) continue; if (ev_buf [i].filter == EVFILT_READ) pe->reactor->in_event (); } // Destroy retired event sources. for (retired_t::iterator it = retired.begin (); it != retired.end (); ++it) delete *it; retired.clear (); } } void zmq::kqueue_t::worker_routine (void *arg_) { ((kqueue_t*) arg_)->loop (); } // Don't pollute namespace with defines local to this file #undef kevent_udata_t #endif zeromq-2.2.0.orig/src/device.hpp0000664000000000000000000000176011732125604015233 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DEVICE_HPP_INCLUDED__ #define __ZMQ_DEVICE_HPP_INCLUDED__ namespace zmq { int device (class socket_base_t *insocket_, class socket_base_t *outsocket_); } #endif zeromq-2.2.0.orig/src/xreq.hpp0000664000000000000000000000340111732125604014745 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XREQ_HPP_INCLUDED__ #define __ZMQ_XREQ_HPP_INCLUDED__ #include "socket_base.hpp" #include "fq.hpp" #include "lb.hpp" namespace zmq { class xreq_t : public socket_base_t { public: xreq_t (class ctx_t *parent_, uint32_t tid_); ~xreq_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int flags_); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); bool xhas_out (); private: // Hook into the termination process. void process_term (int linger_); // Messages are fair-queued from inbound pipes. And load-balanced to // the outbound pipes. fq_t fq; lb_t lb; xreq_t (const xreq_t&); const xreq_t &operator = (const xreq_t&); }; } #endif zeromq-2.2.0.orig/src/tcp_connecter.cpp0000664000000000000000000001662311732125604016621 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include #include "../include/zmq.h" #include "tcp_connecter.hpp" #include "platform.hpp" #include "ip.hpp" #include "err.hpp" #ifdef ZMQ_HAVE_WINDOWS zmq::tcp_connecter_t::tcp_connecter_t () : s (retired_fd) { memset (&addr, 0, sizeof (addr)); addr_len = 0; } zmq::tcp_connecter_t::~tcp_connecter_t () { if (s != retired_fd) close (); } int zmq::tcp_connecter_t::set_address (const char *protocol_, const char *addr_) { if (strcmp (protocol_, "tcp") == 0) return resolve_ip_hostname (&addr, &addr_len, addr_); errno = EPROTONOSUPPORT; return -1; } int zmq::tcp_connecter_t::open () { zmq_assert (s == retired_fd); // Create the socket. s = open_socket (addr.ss_family, SOCK_STREAM, IPPROTO_TCP); if (s == INVALID_SOCKET) { wsa_error_to_errno (); return -1; } // Set to non-blocking mode. unsigned long argp = 1; int rc = ioctlsocket (s, FIONBIO, &argp); wsa_assert (rc != SOCKET_ERROR); // Disable Nagle's algorithm. int flag = 1; rc = setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof (int)); wsa_assert (rc != SOCKET_ERROR); // Connect to the remote peer. rc = ::connect (s, (sockaddr*) &addr, addr_len); // Connect was successfull immediately. if (rc == 0) return 0; // Asynchronous connect was launched. if (rc == SOCKET_ERROR && (WSAGetLastError () == WSAEINPROGRESS || WSAGetLastError () == WSAEWOULDBLOCK)) { errno = EAGAIN; return -1; } wsa_error_to_errno (); return -1; } int zmq::tcp_connecter_t::close () { zmq_assert (s != retired_fd); int rc = closesocket (s); wsa_assert (rc != SOCKET_ERROR); s = retired_fd; return 0; } zmq::fd_t zmq::tcp_connecter_t::get_fd () { return s; } zmq::fd_t zmq::tcp_connecter_t::connect () { // Nonblocking connect have finished. Check whether an error occured. int err = 0; socklen_t len = sizeof err; int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len); zmq_assert (rc == 0); if (err != 0) { // Assert that the error was caused by the networking problems // rather than 0MQ bug. if (err == WSAECONNREFUSED || err == WSAETIMEDOUT || err == WSAECONNABORTED || err == WSAEHOSTUNREACH || err == WSAENETUNREACH || err == WSAENETDOWN) return retired_fd; wsa_assert_no (err); } // Return the newly connected socket. fd_t result = s; s = retired_fd; return result; } #else #include #include #include #include #include #include #include #ifdef ZMQ_HAVE_OPENVMS #include #endif zmq::tcp_connecter_t::tcp_connecter_t () : s (retired_fd) { memset (&addr, 0, sizeof (addr)); } zmq::tcp_connecter_t::~tcp_connecter_t () { if (s != retired_fd) close (); } int zmq::tcp_connecter_t::set_address (const char *protocol_, const char *addr_) { if (strcmp (protocol_, "tcp") == 0) return resolve_ip_hostname (&addr, &addr_len, addr_); else if (strcmp (protocol_, "ipc") == 0) return resolve_local_path (&addr, &addr_len, addr_); errno = EPROTONOSUPPORT; return -1; } int zmq::tcp_connecter_t::open () { zmq_assert (s == retired_fd); struct sockaddr *sa = (struct sockaddr*) &addr; if (AF_UNIX != sa->sa_family) { // Create the socket. s = open_socket (sa->sa_family, SOCK_STREAM, IPPROTO_TCP); if (s == -1) return -1; // Set to non-blocking mode. #ifdef ZMQ_HAVE_OPENVMS int flags = 1; int rc = ioctl (s, FIONBIO, &flags); errno_assert (rc != -1); #else int flags = fcntl (s, F_GETFL, 0); if (flags == -1) flags = 0; int rc = fcntl (s, F_SETFL, flags | O_NONBLOCK); errno_assert (rc != -1); #endif // Disable Nagle's algorithm. int flag = 1; rc = setsockopt (s, IPPROTO_TCP, TCP_NODELAY, (char*) &flag, sizeof (int)); errno_assert (rc == 0); #ifdef ZMQ_HAVE_OPENVMS // Disable delayed acknowledgements. flag = 1; rc = setsockopt (s, IPPROTO_TCP, TCP_NODELACK, (char*) &flag, sizeof (int)); errno_assert (rc != SOCKET_ERROR); #endif // Connect to the remote peer. rc = ::connect (s, (struct sockaddr*) &addr, addr_len); // Connect was successfull immediately. if (rc == 0) return 0; // Asynchronous connect was launched. if (rc == -1 && errno == EINPROGRESS) { errno = EAGAIN; return -1; } // Error occured. int err = errno; close (); errno = err; return -1; } #ifndef ZMQ_HAVE_OPENVMS else { // Create the socket. zmq_assert (AF_UNIX == sa->sa_family); s = open_socket (AF_UNIX, SOCK_STREAM, 0); if (s == -1) return -1; // Set the non-blocking flag. int flag = fcntl (s, F_GETFL, 0); if (flag == -1) flag = 0; int rc = fcntl (s, F_SETFL, flag | O_NONBLOCK); errno_assert (rc != -1); // Connect to the remote peer. rc = ::connect (s, (struct sockaddr*) &addr, sizeof (sockaddr_un)); // Connect was successfull immediately. if (rc == 0) return 0; // Error occured. int err = errno; close (); errno = err; return -1; } #endif zmq_assert (false); return -1; } int zmq::tcp_connecter_t::close () { zmq_assert (s != retired_fd); int rc = ::close (s); if (rc != 0) return -1; s = retired_fd; return 0; } zmq::fd_t zmq::tcp_connecter_t::get_fd () { return s; } zmq::fd_t zmq::tcp_connecter_t::connect () { // Following code should handle both Berkeley-derived socket // implementations and Solaris. int err = 0; #if defined ZMQ_HAVE_HPUX int len = sizeof (err); #else socklen_t len = sizeof (err); #endif int rc = getsockopt (s, SOL_SOCKET, SO_ERROR, (char*) &err, &len); if (rc == -1) err = errno; if (err != 0) { // Assert if the error was caused by 0MQ bug. // Networking problems are OK. No need to assert. errno = err; errno_assert (errno == ECONNREFUSED || errno == ECONNRESET || errno == ETIMEDOUT || errno == EHOSTUNREACH || errno == ENETUNREACH); return retired_fd; } fd_t result = s; s = retired_fd; return result; } #endif zeromq-2.2.0.orig/src/mailbox.hpp0000664000000000000000000000413111732125604015422 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_MAILBOX_HPP_INCLUDED__ #define __ZMQ_MAILBOX_HPP_INCLUDED__ #include #include "platform.hpp" #include "signaler.hpp" #include "fd.hpp" #include "config.hpp" #include "command.hpp" #include "ypipe.hpp" #include "mutex.hpp" namespace zmq { class mailbox_t { public: mailbox_t (); ~mailbox_t (); fd_t get_fd (); void send (const command_t &cmd_); int recv (command_t *cmd_, int timeout_); private: // The pipe to store actual commands. typedef ypipe_t cpipe_t; cpipe_t cpipe; // Signaler to pass signals from writer thread to reader thread. signaler_t signaler; // There's only one thread receiving from the mailbox, but there // is arbitrary number of threads sending. Given that ypipe requires // synchronised access on both of its endpoints, we have to synchronise // the sending side. mutex_t sync; // True if the underlying pipe is active, ie. when we are allowed to // read commands from it. bool active; // Disable copying of mailbox_t object. mailbox_t (const mailbox_t&); const mailbox_t &operator = (const mailbox_t&); }; } #endif zeromq-2.2.0.orig/src/command.cpp0000664000000000000000000000234611732125604015406 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "command.hpp" void zmq::deallocate_command (command_t *cmd_) { switch (cmd_->type) { case command_t::attach: if (cmd_->args.attach.peer_identity) free (cmd_->args.attach.peer_identity); break; case command_t::bind: if (cmd_->args.bind.peer_identity) free (cmd_->args.bind.peer_identity); break; default: /* noop */; } } zeromq-2.2.0.orig/src/ctx.cpp0000664000000000000000000002156411732125604014571 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #endif #include #include #include "ctx.hpp" #include "socket_base.hpp" #include "io_thread.hpp" #include "reaper.hpp" #include "err.hpp" #include "pipe.hpp" #if !defined ZMQ_HAVE_WINDOWS #include #endif zmq::ctx_t::ctx_t (uint32_t io_threads_) : tag (0xbadcafe0), terminating (false) { int rc; // Initialise the array of mailboxes. Additional three slots are for // internal log socket and the zmq_term thread the reaper thread. slot_count = max_sockets + io_threads_ + 3; slots = (mailbox_t**) malloc (sizeof (mailbox_t*) * slot_count); alloc_assert (slots); // Initialise the infrastructure for zmq_term thread. slots [term_tid] = &term_mailbox; // Create the reaper thread. reaper = new (std::nothrow) reaper_t (this, reaper_tid); alloc_assert (reaper); slots [reaper_tid] = reaper->get_mailbox (); reaper->start (); // Create I/O thread objects and launch them. for (uint32_t i = 2; i != io_threads_ + 2; i++) { io_thread_t *io_thread = new (std::nothrow) io_thread_t (this, i); alloc_assert (io_thread); io_threads.push_back (io_thread); slots [i] = io_thread->get_mailbox (); io_thread->start (); } // In the unused part of the slot array, create a list of empty slots. for (int32_t i = (int32_t) slot_count - 1; i >= (int32_t) io_threads_ + 2; i--) { empty_slots.push_back (i); slots [i] = NULL; } // Create the logging infrastructure. log_socket = create_socket (ZMQ_PUB); zmq_assert (log_socket); rc = log_socket->bind ("sys://log"); zmq_assert (rc == 0); } bool zmq::ctx_t::check_tag () { return tag == 0xbadcafe0; } zmq::ctx_t::~ctx_t () { // Check that there are no remaining sockets. zmq_assert (sockets.empty ()); // Ask I/O threads to terminate. If stop signal wasn't sent to I/O // thread subsequent invocation of destructor would hang-up. for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) io_threads [i]->stop (); // Wait till I/O threads actually terminate. for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) delete io_threads [i]; // Deallocate the reaper thread object. delete reaper; // Deallocate the array of mailboxes. No special work is // needed as mailboxes themselves were deallocated with their // corresponding io_thread/socket objects. free (slots); // Remove the tag, so that the object is considered dead. tag = 0xdeadbeef; } int zmq::ctx_t::terminate () { // Check whether termination was already underway, but interrupted and now // restarted. slot_sync.lock (); bool restarted = terminating; slot_sync.unlock (); // First attempt to terminate the context. if (!restarted) { // Close the logging infrastructure. log_sync.lock (); int rc = log_socket->close (); zmq_assert (rc == 0); log_socket = NULL; log_sync.unlock (); // First send stop command to sockets so that any blocking calls can be // interrupted. If there are no sockets we can ask reaper thread to stop. slot_sync.lock (); terminating = true; for (sockets_t::size_type i = 0; i != sockets.size (); i++) sockets [i]->stop (); if (sockets.empty ()) reaper->stop (); slot_sync.unlock (); } // Wait till reaper thread closes all the sockets. command_t cmd; int rc = term_mailbox.recv (&cmd, -1); if (rc == -1 && errno == EINTR) return -1; zmq_assert (rc == 0); zmq_assert (cmd.type == command_t::done); slot_sync.lock (); zmq_assert (sockets.empty ()); slot_sync.unlock (); // Deallocate the resources. delete this; return 0; } zmq::socket_base_t *zmq::ctx_t::create_socket (int type_) { slot_sync.lock (); // Once zmq_term() was called, we can't create new sockets. if (terminating) { slot_sync.unlock (); errno = ETERM; return NULL; } // If max_sockets limit was reached, return error. if (empty_slots.empty ()) { slot_sync.unlock (); errno = EMFILE; return NULL; } // Choose a slot for the socket. uint32_t slot = empty_slots.back (); empty_slots.pop_back (); // Create the socket and register its mailbox. socket_base_t *s = socket_base_t::create (type_, this, slot); if (!s) { empty_slots.push_back (slot); slot_sync.unlock (); return NULL; } sockets.push_back (s); slots [slot] = s->get_mailbox (); slot_sync.unlock (); return s; } void zmq::ctx_t::destroy_socket (class socket_base_t *socket_) { slot_sync.lock (); // Free the associared thread slot. uint32_t tid = socket_->get_tid (); empty_slots.push_back (tid); slots [tid] = NULL; // Remove the socket from the list of sockets. sockets.erase (socket_); // If zmq_term() was already called and there are no more socket // we can ask reaper thread to terminate. if (terminating && sockets.empty ()) reaper->stop (); slot_sync.unlock (); } zmq::object_t *zmq::ctx_t::get_reaper () { return reaper; } void zmq::ctx_t::send_command (uint32_t tid_, const command_t &command_) { slots [tid_]->send (command_); } zmq::io_thread_t *zmq::ctx_t::choose_io_thread (uint64_t affinity_) { if (io_threads.empty ()) return NULL; // Find the I/O thread with minimum load. int min_load = -1; io_threads_t::size_type result = 0; for (io_threads_t::size_type i = 0; i != io_threads.size (); i++) { if (!affinity_ || (affinity_ & (uint64_t (1) << i))) { int load = io_threads [i]->get_load (); if (min_load == -1 || load < min_load) { min_load = load; result = i; } } } zmq_assert (min_load != -1); return io_threads [result]; } int zmq::ctx_t::register_endpoint (const char *addr_, endpoint_t &endpoint_) { endpoints_sync.lock (); bool inserted = endpoints.insert (endpoints_t::value_type ( std::string (addr_), endpoint_)).second; if (!inserted) { errno = EADDRINUSE; endpoints_sync.unlock (); return -1; } endpoints_sync.unlock (); return 0; } void zmq::ctx_t::unregister_endpoints (socket_base_t *socket_) { endpoints_sync.lock (); endpoints_t::iterator it = endpoints.begin (); while (it != endpoints.end ()) { if (it->second.socket == socket_) { endpoints_t::iterator to_erase = it; ++it; endpoints.erase (to_erase); continue; } ++it; } endpoints_sync.unlock (); } zmq::endpoint_t zmq::ctx_t::find_endpoint (const char *addr_) { endpoints_sync.lock (); endpoints_t::iterator it = endpoints.find (addr_); if (it == endpoints.end ()) { endpoints_sync.unlock (); errno = ECONNREFUSED; endpoint_t empty = {NULL, options_t()}; return empty; } endpoint_t *endpoint = &it->second; // Increment the command sequence number of the peer so that it won't // get deallocated until "bind" command is issued by the caller. // The subsequent 'bind' has to be called with inc_seqnum parameter // set to false, so that the seqnum isn't incremented twice. endpoint->socket->inc_seqnum (); endpoints_sync.unlock (); return *endpoint; } void zmq::ctx_t::log (const char *format_, va_list args_) { // Create the log message. zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, strlen (format_) + 1); zmq_assert (rc == 0); memcpy (zmq_msg_data (&msg), format_, zmq_msg_size (&msg)); // At this point we migrate the log socket to the current thread. // We rely on mutex for executing the memory barrier. log_sync.lock (); if (log_socket) log_socket->send (&msg, 0); log_sync.unlock (); zmq_msg_close (&msg); } zeromq-2.2.0.orig/src/yqueue.hpp0000664000000000000000000001464411732125604015316 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_YQUEUE_HPP_INCLUDED__ #define __ZMQ_YQUEUE_HPP_INCLUDED__ #include #include #include "err.hpp" #include "atomic_ptr.hpp" namespace zmq { // yqueue is an efficient queue implementation. The main goal is // to minimise number of allocations/deallocations needed. Thus yqueue // allocates/deallocates elements in batches of N. // // yqueue allows one thread to use push/back function and another one // to use pop/front functions. However, user must ensure that there's no // pop on the empty queue and that both threads don't access the same // element in unsynchronised manner. // // T is the type of the object in the queue. // N is granularity of the queue (how many pushes have to be done till // actual memory allocation is required). template class yqueue_t { public: // Create the queue. inline yqueue_t () { begin_chunk = (chunk_t*) malloc (sizeof (chunk_t)); alloc_assert (begin_chunk); begin_pos = 0; back_chunk = NULL; back_pos = 0; end_chunk = begin_chunk; end_pos = 0; } // Destroy the queue. inline ~yqueue_t () { while (true) { if (begin_chunk == end_chunk) { free (begin_chunk); break; } chunk_t *o = begin_chunk; begin_chunk = begin_chunk->next; free (o); } chunk_t *sc = spare_chunk.xchg (NULL); if (sc) free (sc); } // Returns reference to the front element of the queue. // If the queue is empty, behaviour is undefined. inline T &front () { return begin_chunk->values [begin_pos]; } // Returns reference to the back element of the queue. // If the queue is empty, behaviour is undefined. inline T &back () { return back_chunk->values [back_pos]; } // Adds an element to the back end of the queue. inline void push () { back_chunk = end_chunk; back_pos = end_pos; if (++end_pos != N) return; chunk_t *sc = spare_chunk.xchg (NULL); if (sc) { end_chunk->next = sc; sc->prev = end_chunk; } else { end_chunk->next = (chunk_t*) malloc (sizeof (chunk_t)); alloc_assert (end_chunk->next); end_chunk->next->prev = end_chunk; } end_chunk = end_chunk->next; end_pos = 0; } // Removes element from the back end of the queue. In other words // it rollbacks last push to the queue. Take care: Caller is // responsible for destroying the object being unpushed. // The caller must also guarantee that the queue isn't empty when // unpush is called. It cannot be done automatically as the read // side of the queue can be managed by different, completely // unsynchronised thread. inline void unpush () { // First, move 'back' one position backwards. if (back_pos) --back_pos; else { back_pos = N - 1; back_chunk = back_chunk->prev; } // Now, move 'end' position backwards. Note that obsolete end chunk // is not used as a spare chunk. The analysis shows that doing so // would require free and atomic operation per chunk deallocated // instead of a simple free. if (end_pos) --end_pos; else { end_pos = N - 1; end_chunk = end_chunk->prev; free (end_chunk->next); end_chunk->next = NULL; } } // Removes an element from the front end of the queue. inline void pop () { if (++ begin_pos == N) { chunk_t *o = begin_chunk; begin_chunk = begin_chunk->next; begin_chunk->prev = NULL; begin_pos = 0; // 'o' has been more recently used than spare_chunk, // so for cache reasons we'll get rid of the spare and // use 'o' as the spare. chunk_t *cs = spare_chunk.xchg (o); if (cs) free (cs); } } private: // Individual memory chunk to hold N elements. struct chunk_t { T values [N]; chunk_t *prev; chunk_t *next; }; // Back position may point to invalid memory if the queue is empty, // while begin & end positions are always valid. Begin position is // accessed exclusively be queue reader (front/pop), while back and // end positions are accessed exclusively by queue writer (back/push). chunk_t *begin_chunk; int begin_pos; chunk_t *back_chunk; int back_pos; chunk_t *end_chunk; int end_pos; // People are likely to produce and consume at similar rates. In // this scenario holding onto the most recently freed chunk saves // us from having to call malloc/free. atomic_ptr_t spare_chunk; // Disable copying of yqueue. yqueue_t (const yqueue_t&); const yqueue_t &operator = (const yqueue_t&); }; } #endif zeromq-2.2.0.orig/src/dist.hpp0000664000000000000000000000543311732125604014740 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_DIST_HPP_INCLUDED__ #define __ZMQ_DIST_HPP_INCLUDED__ #include #include "array.hpp" #include "pipe.hpp" namespace zmq { // Class manages a set of outbound pipes. It sends each messages to // each of them. class dist_t : public i_writer_events { public: dist_t (class own_t *sink_); ~dist_t (); void attach (writer_t *pipe_); void terminate (); int send (zmq_msg_t *msg_, int flags_); bool has_out (); // i_writer_events interface implementation. void activated (writer_t *pipe_); void terminated (writer_t *pipe_); private: // Write the message to the pipe. Make the pipe inactive if writing // fails. In such a case false is returned. bool write (class writer_t *pipe_, zmq_msg_t *msg_); // Put the message to all active pipes. void distribute (zmq_msg_t *msg_, int flags_); // List of outbound pipes. typedef array_t pipes_t; pipes_t pipes; // Number of active pipes. All the active pipes are located at the // beginning of the pipes array. These are the pipes the messages // can be sent to at the moment. pipes_t::size_type active; // Number of pipes eligible for sending messages to. This includes all // the active pipes plus all the pipes that we can in theory send // messages to (the HWM is not yet reached), but sending a message // to them would result in partial message being delivered, ie. message // with initial parts missing. pipes_t::size_type eligible; // True if last we are in the middle of a multipart message. bool more; // Object to send events to. class own_t *sink; // If true, termination process is already underway. bool terminating; dist_t (const dist_t&); const dist_t &operator = (const dist_t&); }; } #endif zeromq-2.2.0.orig/src/connect_session.cpp0000664000000000000000000000722111732125604017161 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "connect_session.hpp" #include "zmq_connecter.hpp" #include "pgm_sender.hpp" #include "pgm_receiver.hpp" zmq::connect_session_t::connect_session_t (class io_thread_t *io_thread_, class socket_base_t *socket_, const options_t &options_, const char *protocol_, const char *address_) : session_t (io_thread_, socket_, options_), protocol (protocol_), address (address_) { } zmq::connect_session_t::~connect_session_t () { } void zmq::connect_session_t::process_plug () { // Start connection process immediately. start_connecting (false); } void zmq::connect_session_t::start_connecting (bool wait_) { // Choose I/O thread to run connecter in. Given that we are already // running in an I/O thread, there must be at least one available. io_thread_t *io_thread = choose_io_thread (options.affinity); zmq_assert (io_thread); // Create the connecter object. // Both TCP and IPC transports are using the same infrastructure. if (protocol == "tcp" || protocol == "ipc") { zmq_connecter_t *connecter = new (std::nothrow) zmq_connecter_t ( io_thread, this, options, protocol.c_str (), address.c_str (), wait_); alloc_assert (connecter); launch_child (connecter); return; } #if defined ZMQ_HAVE_OPENPGM // Both PGM and EPGM transports are using the same infrastructure. if (protocol == "pgm" || protocol == "epgm") { // For EPGM transport with UDP encapsulation of PGM is used. bool udp_encapsulation = (protocol == "epgm"); // At this point we'll create message pipes to the session straight // away. There's no point in delaying it as no concept of 'connect' // exists with PGM anyway. if (options.type == ZMQ_PUB || options.type == ZMQ_XPUB) { // PGM sender. pgm_sender_t *pgm_sender = new (std::nothrow) pgm_sender_t ( io_thread, options); alloc_assert (pgm_sender); int rc = pgm_sender->init (udp_encapsulation, address.c_str ()); zmq_assert (rc == 0); send_attach (this, pgm_sender, blob_t ()); } else if (options.type == ZMQ_SUB || options.type == ZMQ_XSUB) { // PGM receiver. pgm_receiver_t *pgm_receiver = new (std::nothrow) pgm_receiver_t ( io_thread, options); alloc_assert (pgm_receiver); int rc = pgm_receiver->init (udp_encapsulation, address.c_str ()); zmq_assert (rc == 0); send_attach (this, pgm_receiver, blob_t ()); } else zmq_assert (false); return; } #endif zmq_assert (false); } void zmq::connect_session_t::attached (const blob_t &peer_identity_) { } void zmq::connect_session_t::detached () { // Reconnect. start_connecting (true); } zeromq-2.2.0.orig/src/xsub.cpp0000664000000000000000000001136711732125604014754 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include #include "../include/zmq.h" #include "xsub.hpp" #include "err.hpp" zmq::xsub_t::xsub_t (class ctx_t *parent_, uint32_t tid_) : socket_base_t (parent_, tid_), fq (this), has_message (false), more (false) { options.type = ZMQ_XSUB; options.requires_in = true; options.requires_out = false; zmq_msg_init (&message); } zmq::xsub_t::~xsub_t () { zmq_msg_close (&message); } void zmq::xsub_t::xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_) { zmq_assert (inpipe_ && !outpipe_); fq.attach (inpipe_); } void zmq::xsub_t::process_term (int linger_) { fq.terminate (); socket_base_t::process_term (linger_); } int zmq::xsub_t::xsend (zmq_msg_t *msg_, int options_) { size_t size = zmq_msg_size (msg_); unsigned char *data = (unsigned char*) zmq_msg_data (msg_); // Malformed subscriptions are dropped silently. if (size >= 1) { // Process a subscription. if (*data == 1) subscriptions.add (data + 1, size - 1); // Process an unsubscription. Invalid unsubscription is ignored. if (*data == 0) subscriptions.rm (data + 1, size - 1); } int rc = zmq_msg_close (msg_); zmq_assert (rc == 0); rc = zmq_msg_init (msg_); zmq_assert (rc == 0); return 0; } bool zmq::xsub_t::xhas_out () { // Subscription can be added/removed anytime. return true; } int zmq::xsub_t::xrecv (zmq_msg_t *msg_, int flags_) { // If there's already a message prepared by a previous call to zmq_poll, // return it straight ahead. if (has_message) { zmq_msg_move (msg_, &message); has_message = false; more = msg_->flags & ZMQ_MSG_MORE; return 0; } // TODO: This can result in infinite loop in the case of continuous // stream of non-matching messages which breaks the non-blocking recv // semantics. while (true) { // Get a message using fair queueing algorithm. int rc = fq.recv (msg_, flags_); // If there's no message available, return immediately. // The same when error occurs. if (rc != 0) return -1; // Check whether the message matches at least one subscription. // Non-initial parts of the message are passed if (more || match (msg_)) { more = msg_->flags & ZMQ_MSG_MORE; return 0; } // Message doesn't match. Pop any remaining parts of the message // from the pipe. while (msg_->flags & ZMQ_MSG_MORE) { rc = fq.recv (msg_, ZMQ_NOBLOCK); zmq_assert (rc == 0); } } } bool zmq::xsub_t::xhas_in () { // There are subsequent parts of the partly-read message available. if (more) return true; // If there's already a message prepared by a previous call to zmq_poll, // return straight ahead. if (has_message) return true; // TODO: This can result in infinite loop in the case of continuous // stream of non-matching messages. while (true) { // Get a message using fair queueing algorithm. int rc = fq.recv (&message, ZMQ_NOBLOCK); // If there's no message available, return immediately. // The same when error occurs. if (rc != 0) { zmq_assert (errno == EAGAIN); return false; } // Check whether the message matches at least one subscription. if (match (&message)) { has_message = true; return true; } // Message doesn't match. Pop any remaining parts of the message // from the pipe. while (message.flags & ZMQ_MSG_MORE) { rc = fq.recv (&message, ZMQ_NOBLOCK); zmq_assert (rc == 0); } } } bool zmq::xsub_t::match (zmq_msg_t *msg_) { return subscriptions.check ((unsigned char*) zmq_msg_data (msg_), zmq_msg_size (msg_)); } zeromq-2.2.0.orig/src/own.cpp0000664000000000000000000001314011732125604014565 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "own.hpp" #include "err.hpp" #include "io_thread.hpp" zmq::own_t::own_t (class ctx_t *parent_, uint32_t tid_) : object_t (parent_, tid_), terminating (false), sent_seqnum (0), processed_seqnum (0), owner (NULL), term_acks (0) { } zmq::own_t::own_t (io_thread_t *io_thread_, const options_t &options_) : object_t (io_thread_), options (options_), terminating (false), sent_seqnum (0), processed_seqnum (0), owner (NULL), term_acks (0) { } zmq::own_t::~own_t () { } void zmq::own_t::set_owner (own_t *owner_) { zmq_assert (!owner); owner = owner_; } void zmq::own_t::inc_seqnum () { // This function may be called from a different thread! sent_seqnum.add (1); } void zmq::own_t::process_seqnum () { // Catch up with counter of processed commands. processed_seqnum++; // We may have catched up and still have pending terms acks. check_term_acks (); } void zmq::own_t::launch_child (own_t *object_) { // Specify the owner of the object. object_->set_owner (this); // Plug the object into the I/O thread. send_plug (object_); // Take ownership of the object. send_own (this, object_); } void zmq::own_t::launch_sibling (own_t *object_) { // At this point it is important that object is plugged in before its // owner has a chance to terminate it. Thus, 'plug' command is sent before // the 'own' command. Given that the mailbox preserves ordering of // commands, 'term' command from the owner cannot make it to the object // before the already written 'plug' command. // Specify the owner of the object. object_->set_owner (owner); // Plug the object into its I/O thread. send_plug (object_); // Make parent own the object. send_own (owner, object_); } void zmq::own_t::process_term_req (own_t *object_) { // When shutting down we can ignore termination requests from owned // objects. The termination request was already sent to the object. if (terminating) return; // If I/O object is well and alive let's ask it to terminate. owned_t::iterator it = std::find (owned.begin (), owned.end (), object_); // If not found, we assume that termination request was already sent to // the object so we can safely ignore the request. if (it == owned.end ()) return; owned.erase (it); register_term_acks (1); // Note that this object is the root of the (partial shutdown) thus, its // value of linger is used, rather than the value stored by the children. send_term (object_, options.linger); } void zmq::own_t::process_own (own_t *object_) { // If the object is already being shut down, new owned objects are // immediately asked to terminate. Note that linger is set to zero. if (terminating) { register_term_acks (1); send_term (object_, 0); return; } // Store the reference to the owned object. owned.insert (object_); } void zmq::own_t::terminate () { // If termination is already underway, there's no point // in starting it anew. if (terminating) return; // As for the root of the ownership tree, there's noone to terminate it, // so it has to terminate itself. if (!owner) { process_term (options.linger); return; } // If I am an owned object, I'll ask my owner to terminate me. send_term_req (owner, this); } void zmq::own_t::process_term (int linger_) { // Double termination should never happen. zmq_assert (!terminating); // Send termination request to all owned objects. for (owned_t::iterator it = owned.begin (); it != owned.end (); ++it) send_term (*it, linger_); register_term_acks (owned.size ()); owned.clear (); // Start termination process and check whether by chance we cannot // terminate immediately. terminating = true; check_term_acks (); } void zmq::own_t::register_term_acks (int count_) { term_acks += count_; } void zmq::own_t::unregister_term_ack () { zmq_assert (term_acks > 0); term_acks--; // This may be a last ack we are waiting for before termination... check_term_acks (); } void zmq::own_t::process_term_ack () { unregister_term_ack (); } void zmq::own_t::check_term_acks () { if (terminating && processed_seqnum == sent_seqnum.get () && term_acks == 0) { // Sanity check. There should be no active children at this point. zmq_assert (owned.empty ()); // The root object has nobody to confirm the termination to. // Other nodes will confirm the termination to the owner. if (owner) send_term_ack (owner); // Deallocate the resources. process_destroy (); } } void zmq::own_t::process_destroy () { delete this; } zeromq-2.2.0.orig/src/xsub.hpp0000664000000000000000000000430511732125604014753 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_XSUB_HPP_INCLUDED__ #define __ZMQ_XSUB_HPP_INCLUDED__ #include "../include/zmq.h" #include "trie.hpp" #include "socket_base.hpp" #include "fq.hpp" namespace zmq { class xsub_t : public socket_base_t { public: xsub_t (class ctx_t *parent_, uint32_t tid_); ~xsub_t (); protected: // Overloads of functions from socket_base_t. void xattach_pipes (class reader_t *inpipe_, class writer_t *outpipe_, const blob_t &peer_identity_); int xsend (zmq_msg_t *msg_, int options_); bool xhas_out (); int xrecv (zmq_msg_t *msg_, int flags_); bool xhas_in (); private: // Hook into the termination process. void process_term (int linger_); // Check whether the message matches at least one subscription. bool match (zmq_msg_t *msg_); // Fair queueing object for inbound pipes. fq_t fq; // The repository of subscriptions. trie_t subscriptions; // If true, 'message' contains a matching message to return on the // next recv call. bool has_message; zmq_msg_t message; // If true, part of a multipart message was already received, but // there are following parts still waiting. bool more; xsub_t (const xsub_t&); const xsub_t &operator = (const xsub_t&); }; } #endif zeromq-2.2.0.orig/src/fq.cpp0000664000000000000000000001070411732125604014373 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "fq.hpp" #include "pipe.hpp" #include "err.hpp" #include "own.hpp" zmq::fq_t::fq_t (own_t *sink_) : active (0), current (0), more (false), sink (sink_), terminating (false) { } zmq::fq_t::~fq_t () { zmq_assert (pipes.empty ()); } void zmq::fq_t::attach (reader_t *pipe_) { pipe_->set_event_sink (this); pipes.push_back (pipe_); pipes.swap (active, pipes.size () - 1); active++; // If we are already terminating, ask the pipe to terminate straight away. if (terminating) { sink->register_term_acks (1); pipe_->terminate (); } } void zmq::fq_t::terminated (reader_t *pipe_) { // Make sure that we are not closing current pipe while // message is half-read. zmq_assert (terminating || (!more || pipes [current] != pipe_)); // Remove the pipe from the list; adjust number of active pipes // accordingly. if (pipes.index (pipe_) < active) { active--; if (current == active) current = 0; } pipes.erase (pipe_); if (terminating) sink->unregister_term_ack (); } void zmq::fq_t::delimited (reader_t *pipe_) { } void zmq::fq_t::terminate () { zmq_assert (!terminating); terminating = true; sink->register_term_acks (pipes.size ()); for (pipes_t::size_type i = 0; i != pipes.size (); i++) pipes [i]->terminate (); } void zmq::fq_t::activated (reader_t *pipe_) { // Move the pipe to the list of active pipes. pipes.swap (pipes.index (pipe_), active); active++; } int zmq::fq_t::recv (zmq_msg_t *msg_, int flags_) { // Deallocate old content of the message. zmq_msg_close (msg_); // Round-robin over the pipes to get the next message. for (int count = active; count != 0; count--) { // Try to fetch new message. If we've already read part of the message // subsequent part should be immediately available. bool fetched = pipes [current]->read (msg_); // Check the atomicity of the message. If we've already received the // first part of the message we should get the remaining parts // without blocking. zmq_assert (!(more && !fetched)); // Note that when message is not fetched, current pipe is deactivated // and replaced by another active pipe. Thus we don't have to increase // the 'current' pointer. if (fetched) { more = msg_->flags & ZMQ_MSG_MORE; if (!more) { current++; if (current >= active) current = 0; } return 0; } else { active--; pipes.swap (current, active); if (current == active) current = 0; } } // No message is available. Initialise the output parameter // to be a 0-byte message. zmq_msg_init (msg_); errno = EAGAIN; return -1; } bool zmq::fq_t::has_in () { // There are subsequent parts of the partly-read message available. if (more) return true; // Note that messing with current doesn't break the fairness of fair // queueing algorithm. If there are no messages available current will // get back to its original value. Otherwise it'll point to the first // pipe holding messages, skipping only pipes with no messages available. for (int count = active; count != 0; count--) { if (pipes [current]->check_read ()) return true; // Deactivate the pipe. active--; pipes.swap (current, active); if (current == active) current = 0; } return false; } zeromq-2.2.0.orig/src/ip.cpp0000664000000000000000000002430011732125604014372 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "ip.hpp" #include "err.hpp" #include "platform.hpp" #include "stdint.hpp" #include #include #include #include #if defined ZMQ_HAVE_WINDOWS #include "windows.hpp" #else #include #include #include #include #include #include #endif #if defined ZMQ_HAVE_OPENVMS #include #endif #if defined ZMQ_HAVE_SOLARIS #include #include // On Solaris platform, network interface name can be queried by ioctl. static int resolve_nic_name (in_addr* addr_, char const *interface_) { // Create a socket. int fd = socket (AF_INET, SOCK_DGRAM, 0); zmq_assert (fd != -1); // Retrieve number of interfaces. lifnum ifn; ifn.lifn_family = AF_UNSPEC; ifn.lifn_flags = 0; int rc = ioctl (fd, SIOCGLIFNUM, (char*) &ifn); zmq_assert (rc != -1); // Allocate memory to get interface names. size_t ifr_size = sizeof (struct lifreq) * ifn.lifn_count; char *ifr = (char*) malloc (ifr_size); alloc_assert (ifr); // Retrieve interface names. lifconf ifc; ifc.lifc_family = AF_UNSPEC; ifc.lifc_flags = 0; ifc.lifc_len = ifr_size; ifc.lifc_buf = ifr; rc = ioctl (fd, SIOCGLIFCONF, (char*) &ifc); zmq_assert (rc != -1); // Find the interface with the specified name and AF_INET family. bool found = false; lifreq *ifrp = ifc.lifc_req; for (int n = 0; n < (int) (ifc.lifc_len / sizeof (lifreq)); n ++, ifrp ++) { if (!strcmp (interface_, ifrp->lifr_name)) { rc = ioctl (fd, SIOCGLIFADDR, (char*) ifrp); zmq_assert (rc != -1); if (ifrp->lifr_addr.ss_family == AF_INET) { *addr_ = ((sockaddr_in*) &ifrp->lifr_addr)->sin_addr; found = true; break; } } } // Clean-up. free (ifr); close (fd); if (!found) { errno = ENODEV; return -1; } return 0; } #elif defined ZMQ_HAVE_AIX || defined ZMQ_HAVE_HPUX || defined ZMQ_HAVE_ANDROID #include #include static int resolve_nic_name (in_addr* addr_, char const *interface_) { // Create a socket. int sd = socket (AF_INET, SOCK_DGRAM, 0); zmq_assert (sd != -1); struct ifreq ifr; // Copy interface name for ioctl get. strncpy (ifr.ifr_name, interface_, sizeof (ifr.ifr_name)); // Fetch interface address. int rc = ioctl (sd, SIOCGIFADDR, (caddr_t) &ifr, sizeof (struct ifreq)); // Clean up. close (sd); if (rc == -1) { errno = ENODEV; return -1; } struct sockaddr *sa = (struct sockaddr *) &ifr.ifr_addr; *addr_ = ((sockaddr_in*)sa)->sin_addr; return 0; } #elif ((defined ZMQ_HAVE_LINUX || defined ZMQ_HAVE_FREEBSD ||\ defined ZMQ_HAVE_OSX || defined ZMQ_HAVE_OPENBSD ||\ defined ZMQ_HAVE_QNXNTO || defined ZMQ_HAVE_NETBSD)\ && defined ZMQ_HAVE_IFADDRS) #include // On these platforms, network interface name can be queried // using getifaddrs function. static int resolve_nic_name (in_addr* addr_, char const *interface_) { // Get the addresses. ifaddrs* ifa = NULL; int rc = getifaddrs (&ifa); zmq_assert (rc == 0); zmq_assert (ifa != NULL); // Find the corresponding network interface. bool found = false; for (ifaddrs *ifp = ifa; ifp != NULL ;ifp = ifp->ifa_next) if (ifp->ifa_addr && ifp->ifa_addr->sa_family == AF_INET && !strcmp (interface_, ifp->ifa_name)) { *addr_ = ((sockaddr_in*) ifp->ifa_addr)->sin_addr; found = true; break; } // Clean-up; freeifaddrs (ifa); if (!found) { errno = ENODEV; return -1; } return 0; } #else // On other platforms we assume there are no sane interface names. // This is true especially of Windows. static int resolve_nic_name (in_addr* addr_, char const *interface_) { errno = ENODEV; return -1; } #endif int zmq::open_socket (int domain_, int type_, int protocol_) { // Setting this option result in sane behaviour when exec() functions // are used. Old sockets are closed and don't block TCP ports etc. #if defined HAVE_SOCK_CLOEXEC type_ |= SOCK_CLOEXEC; #endif int s = socket (domain_, type_, protocol_); if (s == -1) return -1; // If there's no SOCK_CLOEXEC, let's try the second best option. Note that // race condition can cause socket not to be closed (if fork happens // between socket creation and this point). #if !defined HAVE_SOCK_CLOEXEC && defined FD_CLOEXEC int rc = fcntl (s, F_SETFD, FD_CLOEXEC); errno_assert (rc != -1); #endif return s; } int zmq::resolve_ip_interface (sockaddr_storage* addr_, socklen_t *addr_len_, char const *interface_) { // Find the ':' at end that separates NIC name from service. const char *delimiter = strrchr (interface_, ':'); if (!delimiter) { errno = EINVAL; return -1; } // Separate the name/port. std::string iface (interface_, delimiter - interface_); std::string service (delimiter + 1); // Initialize the output parameter. memset (addr_, 0, sizeof (*addr_)); // Initialise IPv4-format family/port. sockaddr_in ip4_addr; memset (&ip4_addr, 0, sizeof (ip4_addr)); ip4_addr.sin_family = AF_INET; ip4_addr.sin_port = htons ((uint16_t) atoi (service.c_str())); // Initialize temporary output pointers with ip4_addr sockaddr *out_addr = (sockaddr *) &ip4_addr; size_t out_addrlen = sizeof (ip4_addr); // 0 is not a valid port. if (!ip4_addr.sin_port) { errno = EINVAL; return -1; } // * resolves to INADDR_ANY. if (iface.compare("*") == 0) { ip4_addr.sin_addr.s_addr = htonl (INADDR_ANY); zmq_assert (out_addrlen <= sizeof (*addr_)); memcpy (addr_, out_addr, out_addrlen); *addr_len_ = out_addrlen; return 0; } // Try to resolve the string as a NIC name. int rc = resolve_nic_name (&ip4_addr.sin_addr, iface.c_str()); if (rc != 0 && errno != ENODEV) return rc; if (rc == 0) { zmq_assert (out_addrlen <= sizeof (*addr_)); memcpy (addr_, out_addr, out_addrlen); *addr_len_ = out_addrlen; return 0; } // There's no such interface name. Assume literal address. #if defined ZMQ_HAVE_OPENVMS && defined __ia64 __addrinfo64 *res = NULL; __addrinfo64 req; #else addrinfo *res = NULL; addrinfo req; #endif memset (&req, 0, sizeof (req)); // We only support IPv4 addresses for now. req.ai_family = AF_INET; // Arbitrary, not used in the output, but avoids duplicate results. req.ai_socktype = SOCK_STREAM; // Restrict hostname/service to literals to avoid any DNS lookups or // service-name irregularity due to indeterminate socktype. req.ai_flags = AI_PASSIVE | AI_NUMERICHOST | AI_NUMERICSERV; // Resolve the literal address. Some of the error info is lost in case // of error, however, there's no way to report EAI errors via errno. rc = getaddrinfo (iface.c_str(), service.c_str(), &req, &res); if (rc) { errno = ENODEV; return -1; } // Use the first result. zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (*addr_)); memcpy (addr_, res->ai_addr, res->ai_addrlen); *addr_len_ = res->ai_addrlen; // Cleanup getaddrinfo after copying the possibly referenced result. if (res) freeaddrinfo (res); return 0; } int zmq::resolve_ip_hostname (sockaddr_storage *addr_, socklen_t *addr_len_, const char *hostname_) { // Find the ':' that separates hostname name from service. const char *delimiter = strchr (hostname_, ':'); if (!delimiter) { errno = EINVAL; return -1; } // Separate the hostname and service. std::string hostname (hostname_, delimiter - hostname_); std::string service (delimiter + 1); // Set up the query. addrinfo req; memset (&req, 0, sizeof (req)); // We only support IPv4 addresses for now. req.ai_family = AF_INET; // Need to choose one to avoid duplicate results from getaddrinfo() - this // doesn't really matter, since it's not included in the addr-output. req.ai_socktype = SOCK_STREAM; // Avoid named services due to unclear socktype. req.ai_flags = AI_NUMERICSERV; // Resolve host name. Some of the error info is lost in case of error, // however, there's no way to report EAI errors via errno. addrinfo *res; int rc = getaddrinfo (hostname.c_str (), service.c_str (), &req, &res); if (rc) { errno = EINVAL; return -1; } // Copy first result to output addr with hostname and service. zmq_assert ((size_t) (res->ai_addrlen) <= sizeof (*addr_)); memcpy (addr_, res->ai_addr, res->ai_addrlen); *addr_len_ = res->ai_addrlen; freeaddrinfo (res); return 0; } int zmq::resolve_local_path (sockaddr_storage *addr_, socklen_t *addr_len_, const char *path_) { #if defined ZMQ_HAVE_WINDOWS || defined ZMQ_HAVE_OPENVMS errno = EPROTONOSUPPORT; return -1; #else sockaddr_un *un = (sockaddr_un*) addr_; if (strlen (path_) >= sizeof (un->sun_path)) { errno = ENAMETOOLONG; return -1; } strcpy (un->sun_path, path_); un->sun_family = AF_UNIX; *addr_len_ = sizeof (sockaddr_un); return 0; #endif } zeromq-2.2.0.orig/perf/0000775000000000000000000000000011741762443013434 5ustar rootrootzeromq-2.2.0.orig/perf/local_lat.cpp0000664000000000000000000000550311732125604016065 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include int main (int argc, char *argv []) { const char *bind_to; int roundtrip_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; if (argc != 4) { printf ("usage: local_lat " "\n"); return 1; } bind_to = argv [1]; message_size = atoi (argv [2]); roundtrip_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REP); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, bind_to); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } for (i = 0; i != roundtrip_count; i++) { rc = zmq_recv (s, &msg, 0); if (rc != 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } rc = zmq_send (s, &msg, 0); if (rc != 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); return -1; } } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } zmq_sleep (1); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq-2.2.0.orig/perf/Makefile.in0000664000000000000000000004415011737024114015474 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ noinst_PROGRAMS = local_lat$(EXEEXT) remote_lat$(EXEEXT) \ local_thr$(EXEEXT) remote_thr$(EXEEXT) inproc_lat$(EXEEXT) \ inproc_thr$(EXEEXT) subdir = perf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = PROGRAMS = $(noinst_PROGRAMS) am_inproc_lat_OBJECTS = inproc_lat.$(OBJEXT) inproc_lat_OBJECTS = $(am_inproc_lat_OBJECTS) inproc_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la AM_V_lt = $(am__v_lt_$(V)) am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) am__v_lt_0 = --silent am_inproc_thr_OBJECTS = inproc_thr.$(OBJEXT) inproc_thr_OBJECTS = $(am_inproc_thr_OBJECTS) inproc_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_local_lat_OBJECTS = local_lat.$(OBJEXT) local_lat_OBJECTS = $(am_local_lat_OBJECTS) local_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_local_thr_OBJECTS = local_thr.$(OBJEXT) local_thr_OBJECTS = $(am_local_thr_OBJECTS) local_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_remote_lat_OBJECTS = remote_lat.$(OBJEXT) remote_lat_OBJECTS = $(am_remote_lat_OBJECTS) remote_lat_DEPENDENCIES = $(top_builddir)/src/libzmq.la am_remote_thr_OBJECTS = remote_thr.$(OBJEXT) remote_thr_OBJECTS = $(am_remote_thr_OBJECTS) remote_thr_DEPENDENCIES = $(top_builddir)/src/libzmq.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_$(V)) am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) am__v_CXX_0 = @echo " CXX " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_$(V)) am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) am__v_CXXLD_0 = @echo " CXXLD " $@; AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) DIST_SOURCES = $(inproc_lat_SOURCES) $(inproc_thr_SOURCES) \ $(local_lat_SOURCES) $(local_thr_SOURCES) \ $(remote_lat_SOURCES) $(remote_thr_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_builddir)/include local_lat_LDADD = $(top_builddir)/src/libzmq.la local_lat_SOURCES = local_lat.cpp remote_lat_LDADD = $(top_builddir)/src/libzmq.la remote_lat_SOURCES = remote_lat.cpp local_thr_LDADD = $(top_builddir)/src/libzmq.la local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp inproc_lat_LDADD = $(top_builddir)/src/libzmq.la inproc_lat_SOURCES = inproc_lat.cpp inproc_thr_LDADD = $(top_builddir)/src/libzmq.la inproc_thr_SOURCES = inproc_thr.cpp all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign perf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign perf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list inproc_lat$(EXEEXT): $(inproc_lat_OBJECTS) $(inproc_lat_DEPENDENCIES) @rm -f inproc_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(inproc_lat_OBJECTS) $(inproc_lat_LDADD) $(LIBS) inproc_thr$(EXEEXT): $(inproc_thr_OBJECTS) $(inproc_thr_DEPENDENCIES) @rm -f inproc_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(inproc_thr_OBJECTS) $(inproc_thr_LDADD) $(LIBS) local_lat$(EXEEXT): $(local_lat_OBJECTS) $(local_lat_DEPENDENCIES) @rm -f local_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(local_lat_OBJECTS) $(local_lat_LDADD) $(LIBS) local_thr$(EXEEXT): $(local_thr_OBJECTS) $(local_thr_DEPENDENCIES) @rm -f local_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(local_thr_OBJECTS) $(local_thr_LDADD) $(LIBS) remote_lat$(EXEEXT): $(remote_lat_OBJECTS) $(remote_lat_DEPENDENCIES) @rm -f remote_lat$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(remote_lat_OBJECTS) $(remote_lat_LDADD) $(LIBS) remote_thr$(EXEEXT): $(remote_thr_OBJECTS) $(remote_thr_DEPENDENCIES) @rm -f remote_thr$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(remote_thr_OBJECTS) $(remote_thr_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inproc_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/local_thr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_lat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_thr.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstPROGRAMS ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/perf/inproc_thr.cpp0000664000000000000000000001412111732125604016276 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include "../src/platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include #include #else #include #endif static int message_count; static size_t message_size; #if defined ZMQ_HAVE_WINDOWS static unsigned int __stdcall worker (void *ctx_) #else static void *worker (void *ctx_) #endif { void *s; int rc; int i; zmq_msg_t msg; s = zmq_socket (ctx_, ZMQ_PUB); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_connect (s, "inproc://thr_test"); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); exit (1); } for (i = 0; i != message_count; i++) { rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (zmq_msg_data (&msg), 0, message_size); #endif rc = zmq_send (s, &msg, 0); if (rc < 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); exit (1); } } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_HAVE_WINDOWS return 0; #else return NULL; #endif } int main (int argc, char *argv []) { #if defined ZMQ_HAVE_WINDOWS HANDLE local_thread; #else pthread_t local_thread; #endif void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; unsigned long throughput; double megabits; if (argc != 3) { printf ("usage: thread_thr \n"); return 1; } message_size = atoi (argv [1]); message_count = atoi (argv [2]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_SUB); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "", 0); if (rc != 0) { printf ("error in zmq_setsockopt: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, "inproc://thr_test"); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS local_thread = (HANDLE) _beginthreadex (NULL, 0, worker, ctx, 0 , NULL); if (local_thread == 0) { printf ("error in _beginthreadex\n"); return -1; } #else rc = pthread_create (&local_thread, NULL, worker, ctx); if (rc != 0) { printf ("error in pthread_create: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } printf ("message size: %d [B]\n", (int) message_size); printf ("message count: %d\n", (int) message_count); rc = zmq_recv (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } watch = zmq_stopwatch_start (); for (i = 0; i != message_count - 1; i++) { rc = zmq_recv (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); if (elapsed == 0) elapsed = 1; rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); if (rc2 == WAIT_FAILED) { printf ("error in WaitForSingleObject\n"); return -1; } BOOL rc3 = CloseHandle (local_thread); if (rc3 == 0) { printf ("error in CloseHandle\n"); return -1; } #else rc = pthread_join (local_thread, NULL); if (rc != 0) { printf ("error in pthread_join: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } throughput = (unsigned long) ((double) message_count / (double) elapsed * 1000000); megabits = (double) (throughput * message_size * 8) / 1000000; printf ("mean throughput: %d [msg/s]\n", (int) throughput); printf ("mean throughput: %.3f [Mb/s]\n", (double) megabits); return 0; } zeromq-2.2.0.orig/perf/inproc_lat.cpp0000664000000000000000000001322511732125604016265 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include #include "../src/platform.hpp" #if defined ZMQ_HAVE_WINDOWS #include #include #else #include #endif static size_t message_size; static int roundtrip_count; #if defined ZMQ_HAVE_WINDOWS static unsigned int __stdcall worker (void *ctx_) #else static void *worker (void *ctx_) #endif { void *s; int rc; int i; zmq_msg_t msg; s = zmq_socket (ctx_, ZMQ_REP); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_connect (s, "inproc://lat_test"); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); exit (1); } for (i = 0; i != roundtrip_count; i++) { rc = zmq_recv (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_send (s, &msg, 0); if (rc < 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); exit (1); } } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); exit (1); } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); exit (1); } #if defined ZMQ_HAVE_WINDOWS return 0; #else return NULL; #endif } int main (int argc, char *argv []) { #if defined ZMQ_HAVE_WINDOWS HANDLE local_thread; #else pthread_t local_thread; #endif void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; double latency; if (argc != 3) { printf ("usage: inproc_lat \n"); return 1; } message_size = atoi (argv [1]); roundtrip_count = atoi (argv [2]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REQ); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_bind (s, "inproc://lat_test"); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_HAVE_WINDOWS local_thread = (HANDLE) _beginthreadex (NULL, 0, worker, ctx, 0 , NULL); if (local_thread == 0) { printf ("error in _beginthreadex\n"); return -1; } #else rc = pthread_create (&local_thread, NULL, worker, ctx); if (rc != 0) { printf ("error in pthread_create: %s\n", zmq_strerror (rc)); return -1; } #endif rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } memset (zmq_msg_data (&msg), 0, message_size); printf ("message size: %d [B]\n", (int) message_size); printf ("roundtrip count: %d\n", (int) roundtrip_count); watch = zmq_stopwatch_start (); for (i = 0; i != roundtrip_count; i++) { rc = zmq_send (s, &msg, 0); if (rc < 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recv (s, &msg, 0); if (rc < 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } latency = (double) elapsed / (roundtrip_count * 2); #if defined ZMQ_HAVE_WINDOWS DWORD rc2 = WaitForSingleObject (local_thread, INFINITE); if (rc2 == WAIT_FAILED) { printf ("error in WaitForSingleObject\n"); return -1; } BOOL rc3 = CloseHandle (local_thread); if (rc3 == 0) { printf ("error in CloseHandle\n"); return -1; } #else rc = pthread_join (local_thread, NULL); if (rc != 0) { printf ("error in pthread_join: %s\n", zmq_strerror (rc)); return -1; } #endif printf ("average latency: %.3f [us]\n", (double) latency); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq-2.2.0.orig/perf/local_thr.cpp0000664000000000000000000000744311732125604016107 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include int main (int argc, char *argv []) { const char *bind_to; int message_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; unsigned long throughput; double megabits; if (argc != 4) { printf ("usage: local_thr \n"); return 1; } bind_to = argv [1]; message_size = atoi (argv [2]); message_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_SUB); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_setsockopt (s, ZMQ_SUBSCRIBE , "", 0); if (rc != 0) { printf ("error in zmq_setsockopt: %s\n", zmq_strerror (errno)); return -1; } // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. rc = zmq_bind (s, bind_to); if (rc != 0) { printf ("error in zmq_bind: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init (&msg); if (rc != 0) { printf ("error in zmq_msg_init: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recv (s, &msg, 0); if (rc != 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } watch = zmq_stopwatch_start (); for (i = 0; i != message_count - 1; i++) { rc = zmq_recv (s, &msg, 0); if (rc != 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); if (elapsed == 0) elapsed = 1; rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } throughput = (unsigned long) ((double) message_count / (double) elapsed * 1000000); megabits = (double) ((double) throughput * message_size * 8) / 1000000; printf ("message size: %d [B]\n", (int) message_size); printf ("message count: %d\n", (int) message_count); printf ("mean throughput: %d [msg/s]\n", (int) throughput); printf ("mean throughput: %.3f [Mb/s]\n", (double) megabits); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq-2.2.0.orig/perf/Makefile.am0000664000000000000000000000116611732125604015464 0ustar rootrootINCLUDES = -I$(top_builddir)/include noinst_PROGRAMS = local_lat remote_lat local_thr remote_thr inproc_lat inproc_thr local_lat_LDADD = $(top_builddir)/src/libzmq.la local_lat_SOURCES = local_lat.cpp remote_lat_LDADD = $(top_builddir)/src/libzmq.la remote_lat_SOURCES = remote_lat.cpp local_thr_LDADD = $(top_builddir)/src/libzmq.la local_thr_SOURCES = local_thr.cpp remote_thr_LDADD = $(top_builddir)/src/libzmq.la remote_thr_SOURCES = remote_thr.cpp inproc_lat_LDADD = $(top_builddir)/src/libzmq.la inproc_lat_SOURCES = inproc_lat.cpp inproc_thr_LDADD = $(top_builddir)/src/libzmq.la inproc_thr_SOURCES = inproc_thr.cpp zeromq-2.2.0.orig/perf/remote_thr.cpp0000664000000000000000000000545411732125604016310 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include int main (int argc, char *argv []) { const char *connect_to; int message_count; int message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; if (argc != 4) { printf ("usage: remote_thr " "\n"); return 1; } connect_to = argv [1]; message_size = atoi (argv [2]); message_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_PUB); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } // Add your socket options here. // For example ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP for PGM. rc = zmq_connect (s, connect_to); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); return -1; } for (i = 0; i != message_count; i++) { rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } #if defined ZMQ_MAKE_VALGRIND_HAPPY memset (zmq_msg_data (&msg), 0, message_size); #endif rc = zmq_send (s, &msg, 0); if (rc != 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } } rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq-2.2.0.orig/perf/remote_lat.cpp0000664000000000000000000000644211732125604016271 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #include "../include/zmq.h" #include "../include/zmq_utils.h" #include #include #include int main (int argc, char *argv []) { const char *connect_to; int roundtrip_count; size_t message_size; void *ctx; void *s; int rc; int i; zmq_msg_t msg; void *watch; unsigned long elapsed; double latency; if (argc != 4) { printf ("usage: remote_lat " "\n"); return 1; } connect_to = argv [1]; message_size = atoi (argv [2]); roundtrip_count = atoi (argv [3]); ctx = zmq_init (1); if (!ctx) { printf ("error in zmq_init: %s\n", zmq_strerror (errno)); return -1; } s = zmq_socket (ctx, ZMQ_REQ); if (!s) { printf ("error in zmq_socket: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_connect (s, connect_to); if (rc != 0) { printf ("error in zmq_connect: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_msg_init_size (&msg, message_size); if (rc != 0) { printf ("error in zmq_msg_init_size: %s\n", zmq_strerror (errno)); return -1; } memset (zmq_msg_data (&msg), 0, message_size); watch = zmq_stopwatch_start (); for (i = 0; i != roundtrip_count; i++) { rc = zmq_send (s, &msg, 0); if (rc != 0) { printf ("error in zmq_send: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_recv (s, &msg, 0); if (rc != 0) { printf ("error in zmq_recv: %s\n", zmq_strerror (errno)); return -1; } if (zmq_msg_size (&msg) != message_size) { printf ("message of incorrect size received\n"); return -1; } } elapsed = zmq_stopwatch_stop (watch); rc = zmq_msg_close (&msg); if (rc != 0) { printf ("error in zmq_msg_close: %s\n", zmq_strerror (errno)); return -1; } latency = (double) elapsed / (roundtrip_count * 2); printf ("message size: %d [B]\n", (int) message_size); printf ("roundtrip count: %d\n", (int) roundtrip_count); printf ("average latency: %.3f [us]\n", (double) latency); rc = zmq_close (s); if (rc != 0) { printf ("error in zmq_close: %s\n", zmq_strerror (errno)); return -1; } rc = zmq_term (ctx); if (rc != 0) { printf ("error in zmq_term: %s\n", zmq_strerror (errno)); return -1; } return 0; } zeromq-2.2.0.orig/config/0000775000000000000000000000000011741762441013743 5ustar rootrootzeromq-2.2.0.orig/config/ltsugar.m40000644000000000000000000001042411737023643015664 0ustar rootroot# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) zeromq-2.2.0.orig/config/depcomp0000755000000000000000000004426711737023651015331 0ustar rootroot#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq-2.2.0.orig/config/missing0000755000000000000000000002623311737023651015344 0ustar rootroot#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq-2.2.0.orig/config/config.sub0000755000000000000000000010460611737023651015731 0ustar rootroot#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zeromq-2.2.0.orig/config/compile0000755000000000000000000000727111737023651015324 0ustar rootroot#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software # Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use `[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq-2.2.0.orig/config/config.guess0000755000000000000000000012673011737023651016270 0ustar rootroot#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011 Free Software Foundation, Inc. timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-tilera-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: zeromq-2.2.0.orig/config/lt~obsolete.m40000644000000000000000000001375611737023643016570 0ustar rootroot# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) zeromq-2.2.0.orig/config/ltmain.sh0000755000000000000000000105052711737023643015575 0ustar rootroot # libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4 Debian-2.4-2ubuntu1" TIMESTAMP="" package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_apped perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 zeromq-2.2.0.orig/config/ltversion.m40000644000000000000000000000125611737023643016233 0ustar rootroot# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3293 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4]) m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) zeromq-2.2.0.orig/config/libtool.m40000644000000000000000000104622011737023643015653 0ustar rootroot# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010 Free Software Foundation, # Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ F* | *Sun*Fortran*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS zeromq-2.2.0.orig/config/ltoptions.m40000644000000000000000000002725611737023643016251 0ustar rootroot# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) zeromq-2.2.0.orig/config/install-sh0000755000000000000000000003253711737023651015755 0ustar rootroot#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: zeromq-2.2.0.orig/doc/0000775000000000000000000000000011741762443013245 5ustar rootrootzeromq-2.2.0.orig/doc/zmq_recv.html0000664000000000000000000004475211741075727015777 0ustar rootroot zmq_recv(3)

SYNOPSIS

int zmq_recv (void *socket, zmq_msg_t *msg, int flags);

DESCRIPTION

The zmq_recv() function shall receive a message from the socket referenced by the socket argument and store it in the message referenced by the msg argument. Any content previously stored in msg shall be properly deallocated. If there are no messages available on the specified socket the zmq_recv() function shall block until the request can be satisfied. The flags argument is a combination of the flags defined below:

ZMQ_NOBLOCK

Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified socket, the zmq_recv() function shall fail with errno set to EAGAIN.

Multi-part messages

A ØMQ message is composed of 1 or more message parts; each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages; peers shall receive either all message parts of a message or none at all.

The total number of message parts is unlimited.

An application wishing to determine if a message is composed of multiple parts does so by retrieving the value of the ZMQ_RCVMORE socket option on the socket it is receiving the message from. If there are no message parts to follow, or if the message is not composed of multiple parts, ZMQ_RCVMORE shall report a value of zero. Otherwise, ZMQ_RCVMORE shall report a value of 1, indicating that more message parts are to follow.

RETURN VALUE

The zmq_recv() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and no messages are available at the moment.

ENOTSUP

The zmq_recv() operation is not supported by this socket type.

EFSM

The zmq_recv() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before a message was available.

EFAULT

The message passed to the function was invalid.

EXAMPLE

Receiving a message from a socket
/* Create an empty 0MQ message */
zmq_msg_t msg;
int rc = zmq_msg_init (&msg);
assert (rc == 0);
/* Block until a message is available to be received from socket */
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);
/* Release message */
zmq_msg_close (&msg);
Receiving a multi-part message
int64_t more;
size_t more_size = sizeof more;
do {
    /* Create an empty 0MQ message to hold the message part */
    zmq_msg_t part;
    int rc = zmq_msg_init (&part);
    assert (rc == 0);
    /* Block until a message is available to be received from socket */
    rc = zmq_recv (socket, &part, 0);
    assert (rc == 0);
    /* Determine if more message parts are to follow */
    rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size);
    assert (rc == 0);
    zmq_msg_close (&part);
} while (more);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_recv.30000664000000000000000000001207111737025337015157 0ustar rootroot'\" t .\" Title: zmq_recv .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_RECV" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_recv \- receive a message from a socket .SH "SYNOPSIS" .sp \fBint zmq_recv (void \fR\fB\fI*socket\fR\fR\fB, zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_recv()\fR function shall receive a message from the socket referenced by the \fIsocket\fR argument and store it in the message referenced by the \fImsg\fR argument\&. Any content previously stored in \fImsg\fR shall be properly deallocated\&. If there are no messages available on the specified \fIsocket\fR the \fIzmq_recv()\fR function shall block until the request can be satisfied\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_NOBLOCK\fR .RS 4 Specifies that the operation should be performed in non\-blocking mode\&. If there are no messages available on the specified \fIsocket\fR, the \fIzmq_recv()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts; each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages; peers shall receive either all \fImessage parts\fR of a message or none at all\&. .sp The total number of message parts is unlimited\&. .sp An application wishing to determine if a message is composed of multiple parts does so by retrieving the value of the \fIZMQ_RCVMORE\fR socket option on the \fIsocket\fR it is receiving the message from\&. If there are no message parts to follow, or if the message is not composed of multiple parts, \fIZMQ_RCVMORE\fR shall report a value of zero\&. Otherwise, \fIZMQ_RCVMORE\fR shall report a value of 1, indicating that more message parts are to follow\&. .SH "RETURN VALUE" .sp The \fIzmq_recv()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and no messages are available at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_recv()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_recv()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before a message was available\&. .RE .PP \fBEFAULT\fR .RS 4 The message passed to the function was invalid\&. .RE .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recv (socket, &msg, 0); assert (rc == 0); /* Release message */ zmq_msg_close (&msg); .fi .if n \{\ .RE .\} .PP \fBReceiving a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf int64_t more; size_t more_size = sizeof more; do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recv (socket, &part, 0); assert (rc == 0); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_send\fR(3) \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_connect.html0000664000000000000000000004332411741075664016463 0ustar rootroot zmq_connect(3)

SYNOPSIS

int zmq_connect (void *socket, const char *endpoint);

DESCRIPTION

The zmq_connect() function shall connect the socket referenced by the socket argument to the endpoint specified by the endpoint argument.

The endpoint argument is a string consisting of two parts as follows: transport://address. The transport part specifies the underlying transport protocol to use. The meaning of the address part is specific to the underlying transport protocol selected.

The following transports are defined:

inproc

local in-process (inter-thread) communication transport, see zmq_inproc(7)

ipc

local inter-process communication transport, see zmq_ipc(7)

tcp

unicast transport using TCP, see zmq_tcp(7)

pgm, epgm

reliable multicast transport using PGM, see zmq_pgm(7)

With the exception of ZMQ_PAIR sockets, a single socket may be connected to multiple endpoints using zmq_connect(), while simultaneously accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(). Refer to zmq_socket(3) for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints.

Note
The connection will not be performed immediately but as needed by ØMQ. Thus a successful invocation of zmq_connect() does not indicate that a physical connection was or can actually be established.

RETURN VALUE

The zmq_connect() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

EPROTONOSUPPORT

The requested transport protocol is not supported.

ENOCOMPATPROTO

The requested transport protocol is not compatible with the socket type.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EMTHREAD

No I/O thread is available to accomplish the task.

EXAMPLE

Connecting a subscriber socket to an in-process and a TCP transport
/* Create a ZMQ_SUB socket */
void *socket = zmq_socket (context, ZMQ_SUB);
assert (socket);
/* Connect it to an in-process transport with the address 'my_publisher' */
int rc = zmq_connect (socket, "inproc://my_publisher");
assert (rc == 0);
/* Connect it to the host server001, port 5555 using a TCP transport */
rc = zmq_connect (socket, "tcp://server001:5555");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_cpp.70000664000000000000000000002011611737025373015005 0ustar rootroot'\" t .\" Title: zmq_cpp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_CPP" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_cpp \- interface between 0MQ and C++ applications .SH "SYNOPSIS" .sp \fB#include \fR .sp \fBc++\fR [\fIflags\fR] \fIfiles\fR \fB\-lzmq\fR [\fIlibraries\fR] .SH "DESCRIPTION" .sp This manual page describes how the 0MQ C++ language binding maps to the underlying 0MQ C library functions\&. .sp All 0MQ constants defined by \fIzmq\&.h\fR are also available to the C++ language binding\&. .sp The following classes are provided in the \fIzmq\fR namespace: .SS "Context" .sp The \fIcontext_t\fR class encapsulates functionality dealing with the initialisation and termination of a 0MQ \fIcontext\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBConstructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBcontext_t::context_t(int \fR\fB\fIio_threads\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_init()\fR function, as described in \fBzmq_init\fR(3)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBDestructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBcontext_t::~context_t(void)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_term()\fR function, as described in \fBzmq_term\fR(3)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMethods\fR .RS 4 .sp None\&. .RE .SS "Socket" .sp The \fIsocket_t\fR class encapsulates a 0MQ socket\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBConstructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBsocket_t::socket_t(context_t \fR\fB\fI&context\fR\fR\fB, int \fR\fB\fItype\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_socket()\fR function, as described in \fBzmq_socket\fR(3)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBDestructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBsocket_t::~socket_t(void)\fR .fi .if n \{\ .RE .\} .sp Calls the \fIzmq_close()\fR function, as described in \fBzmq_close\fR(3)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMethods\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBvoid socket_t::getsockopt(int \fR\fB\fIoption_name\fR\fR\fB, void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fI*option_len\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_getsockopt()\fR function, as described in \fBzmq_getsockopt\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBvoid socket_t::setsockopt(int \fR\fB\fIoption_name\fR\fR\fB, const void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fIoption_len\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_setsockopt()\fR function, as described in \fBzmq_setsockopt\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBvoid socket_t::bind(const char \fR\fB\fI*endpoint\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_bind()\fR function, as described in \fBzmq_bind\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBvoid socket_t::connect(const char \fR\fB\fI*endpoint\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_connect()\fR function, as described in \fBzmq_connect\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBbool socket_t::send(message_t \fR\fB\fI&msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB = 0)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_send()\fR function, as described in \fBzmq_send\fR(3)\&. Returns true if message is successfully sent, false if it is not\&. .sp .if n \{\ .RS 4 .\} .nf \fBbool socket_t::recv(message_t \fR\fB\fI*msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB = 0)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_recv()\fR function, as described in \fBzmq_recv\fR(3)\&. Returns true if message is successfully received, false if it is not\&. .RE .SS "Message" .sp The \fIzmq::message_t\fR class encapsulates the \fIzmq_msg_t\fR structure and functions to construct, destruct and manipulate 0MQ messages\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBConstructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBmessage_t::message_t(void)\fR \fBmessage_t::message_t(size_t \fR\fB\fIsize\fR\fR\fB)\fR \fBmessage_t::message_t(void \fR\fB\fI*data\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB, free_fn \fR\fB\fI*ffn\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp These map to the \fIzmq_msg_init()\fR, \fIzmq_msg_init_size()\fR and \fIzmq_msg_init_data()\fR functions, described in \fBzmq_msg_init\fR(3), \fBzmq_msg_init_size\fR(3) and \fBzmq_msg_init_data\fR(3) respectively\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBDestructor\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBmessage_t::~message_t(void)\fR .fi .if n \{\ .RE .\} .sp Calls the \fIzmq_msg_close()\fR function, as described in \fBzmq_msg_close\fR(3)\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMethods\fR .RS 4 .sp .if n \{\ .RS 4 .\} .nf \fBvoid *message_t::data (void)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_msg_data()\fR function, as described in \fBzmq_msg_data\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBsize_t message_t::size (void)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_msg_size()\fR function, as described in \fBzmq_msg_size\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBvoid message_t::copy (message_t \fR\fB\fI*src\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_msg_copy()\fR function, as described in \fBzmq_msg_copy\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBvoid message_t::move (message_t \fR\fB\fI*src\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Maps to the \fIzmq_msg_move()\fR function, as described in \fBzmq_msg_move\fR(3)\&. .sp .if n \{\ .RS 4 .\} .nf \fBmessage_t::rebuild(void)\fR \fBmessage_t::rebuild(size_t \fR\fB\fIsize\fR\fR\fB)\fR \fBmessage_t::rebuild(void \fR\fB\fI*data\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB, free_fn \fR\fB\fI*ffn\fR\fR\fB)\fR .fi .if n \{\ .RE .\} .sp Equivalent to calling the \fIzmq_msg_close()\fR function followed by the corresponding \fIzmq_msg_init()\fR function\&. .RE .SS "Input/output multiplexing" .sp .if n \{\ .RS 4 .\} .nf \fBint poll (zmq_pollitem_t *items, int nitems, long timeout = \-1)\fR .fi .if n \{\ .RE .\} .sp The \fIpoll()\fR function is a namespaced equivalent of the \fIzmq_poll()\fR function, as described in \fBzmq_poll\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp To obtain a 0MQ \fIsocket\fR for use in a \fIzmq_pollitem_t\fR structure, you should cast an instance of the \fIsocket_t\fR class to (void *)\&. .sp .5v .RE .SH "ERROR HANDLING" .sp All errors reported by the underlying 0MQ C library functions are automatically converted to exceptions by the C++ language binding\&. The \fIzmq::error_t\fR class is derived from the \fIstd::exception\fR class and uses the \fIzmq_strerror()\fR function to convert the error code to human\-readable string\&. .SH "EXAMPLE" .sp .if n \{\ .RS 4 .\} .nf zmq::context_t ctx (1); zmq::socket_t s (ctx, ZMQ_PUB); s\&.connect ("tcp://192\&.168\&.0\&.115:5555"); zmq::message_t msg (100); memset (msg\&.data (), 0, 100); s\&.send (msg); .fi .if n \{\ .RE .\} .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_tcp.70000664000000000000000000001673011737025363015017 0ustar rootroot'\" t .\" Title: zmq_tcp .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_TCP" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_tcp \- 0MQ unicast transport using TCP .SH "SYNOPSIS" .sp TCP is an ubiquitous, reliable, unicast transport\&. When connecting distributed applications over a network with 0MQ, using the TCP transport will likely be your first choice\&. .SH "ADDRESSING" .sp A 0MQ address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use, and for the TCP transport shall be set to tcp\&. The meaning of the \fIendpoint\fR part for the TCP transport is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a socket using \fIzmq_bind()\fR with the \fItcp\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a colon and the TCP port number to use\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The wild\-card *, meaning all available interfaces\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 address assigned to the interface, in its numeric representation\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The interface name as defined by the operating system\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent\&. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an \fIinterface\fR\&. .sp .5v .RE .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fItcp\fR transport, the \fIendpoint\fR shall be interpreted as a \fIpeer address\fR followed by a colon and the TCP port number to use\&. .sp A \fIpeer address\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The DNS name of the peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The IPv4 address of the peer, in its numeric representation\&. .RE .SH "WIRE FORMAT" .sp 0MQ messages are transmitted over TCP in frames consisting of an encoded \fIpayload length\fR, followed by a \fIflags\fR field and the message body\&. The \fIpayload length\fR is defined as the combined length in octets of the message body and the \fIflags\fR field\&. .sp For frames with a \fIpayload length\fR not exceeding 254 octets, the \fIpayload length\fR shall be encoded as a single octet\&. The minimum valid \fIpayload length\fR of a frame is 1 octet, thus a \fIpayload length\fR of 0 octets is invalid and such frames SHOULD be ignored\&. .sp For frames with a \fIpayload length\fR exceeding 254 octets, the \fIpayload length\fR shall be encoded as a single octet with the value 255 followed by the \fIpayload length\fR represented as a 64\-bit unsigned integer in network byte order\&. .sp The \fIflags\fR field consists of a single octet containing various control flags: .sp Bit 0 (MORE): \fIMore message parts to follow\fR\&. A value of 0 indicates that there are no more message parts to follow; or that the message being sent is not a multi\-part message\&. A value of 1 indicates that the message being sent is a multi\-part message and more message parts are to follow\&. .sp Bits 1\-7: \fIReserved\fR\&. Bits 1\-7 are reserved for future expansion and MUST be set to zero\&. .sp The following ABNF grammar represents a single \fIframe\fR: .sp .if n \{\ .RS 4 .\} .nf frame = (length flags data) length = OCTET / (escape 8OCTET) flags = OCTET escape = %xFF data = *OCTET .fi .if n \{\ .RE .\} .sp The following diagram illustrates the layout of a frame with a \fIpayload length\fR not exceeding 254 octets: .sp .if n \{\ .RS 4 .\} .nf 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | Payload length| Flags | Message body \&.\&.\&. | +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | Message body \&.\&.\&. +\-+\-+\-+\-+\-+\-+\- \&.\&.\&. .fi .if n \{\ .RE .\} .sp The following diagram illustrates the layout of a frame with a \fIpayload length\fR exceeding 254 octets: .sp .if n \{\ .RS 4 .\} .nf 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | 0xff | Payload length \&.\&.\&. | +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | Payload length \&.\&.\&. | +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | Payload length| Flags | Message body \&.\&.\&. | +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+ | Message body \&.\&.\&. +\-+\-+\-+\-+\-+\-+\-+ \&.\&.\&. .fi .if n \{\ .RE .\} .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* TCP port 5555 on all available interfaces */ rc = zmq_bind(socket, "tcp://*:5555"); assert (rc == 0); /* TCP port 5555 on the local loop\-back interface on all platforms */ rc = zmq_bind(socket, "tcp://127\&.0\&.0\&.1:5555"); assert (rc == 0); /* TCP port 5555 on the first Ethernet network interface on Linux */ rc = zmq_bind(socket, "tcp://eth0:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connecting using an IP address */ rc = zmq_connect(socket, "tcp://192\&.168\&.1\&.1:5555"); assert (rc == 0); /* Connecting using a DNS name */ rc = zmq_connect(socket, "tcp://server1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_pgm\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_ipc.txt0000664000000000000000000000403311737025246015446 0ustar rootrootzmq_ipc(7) ========== NAME ---- zmq_ipc - 0MQ local inter-process communication transport SYNOPSIS -------- The inter-process transport passes messages between local processes using a system-dependent IPC mechanism. NOTE: The inter-process transport is currently only implemented on operating systems that provide UNIX domain sockets. ADDRESSING ---------- A 0MQ address string consists of two parts as follows: 'transport'`://`'endpoint'. The 'transport' part specifies the underlying transport protocol to use, and for the inter-process transport shall be set to `ipc`. The meaning of the 'endpoint' part for the inter-process transport is defined below. Assigning a local address to a socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When assigning a local address to a 'socket' using _zmq_bind()_ with the 'ipc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'pathname' to create. The 'pathname' must be unique within the operating system namespace used by the 'ipc' implementation, and must fulfill any restrictions placed by the operating system on the format and length of a 'pathname'. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a 'socket' to a peer address using _zmq_connect()_ with the 'ipc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'pathname' to connect to. The 'pathname' must have been previously created within the operating system namespace by assigning it to a 'socket' with _zmq_bind()_. WIRE FORMAT ----------- Not applicable. EXAMPLES -------- .Assigning a local address to a socket ---- /* Assign the pathname "/tmp/feeds/0" */ rc = zmq_bind(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); ---- .Connecting a socket ---- /* Connect to the pathname "/tmp/feeds/0" */ rc = zmq_connect(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_inproc[7] linkzmq:zmq_tcp[7] linkzmq:zmq_pgm[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_version.txt0000664000000000000000000000172111737025242016355 0ustar rootrootzmq_version(3) ============== NAME ---- zmq_version - report 0MQ library version SYNOPSIS -------- *void zmq_version (int '*major', int '*minor', int '*patch');* DESCRIPTION ----------- The _zmq_version()_ function shall fill in the integer variables pointed to by the 'major', 'minor' and 'patch' arguments with the major, minor and patch level components of the 0MQ library version. This functionality is intended for applications or language bindings dynamically linking to the 0MQ library that wish to determine the actual version of the 0MQ library they are using. RETURN VALUE ------------ There is no return value. ERRORS ------ No errors are defined. EXAMPLE ------- .Printing out the version of the 0MQ library ---- int major, minor, patch; zmq_version (&major, &minor, &patch); printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch); ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_data.30000664000000000000000000000412411737025323015772 0ustar rootroot'\" t .\" Title: zmq_msg_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_DATA" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_data \- retrieve pointer to message content .SH "SYNOPSIS" .sp \fBvoid *zmq_msg_data (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_data()\fR function shall return a pointer to the message content of the message object referenced by \fImsg\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, \fIzmq_msg_data()\fR shall return a pointer to the message content\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq_msg_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_poll.30000664000000000000000000001447611737025335015177 0ustar rootroot'\" t .\" Title: zmq_poll .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_POLL" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_poll \- input/output multiplexing .SH "SYNOPSIS" .sp \fBint zmq_poll (zmq_pollitem_t \fR\fB\fI*items\fR\fR\fB, int \fR\fB\fInitems\fR\fR\fB, long \fR\fB\fItimeout\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_poll()\fR function provides a mechanism for applications to multiplex input/output events in a level\-triggered fashion over a set of sockets\&. Each member of the array pointed to by the \fIitems\fR argument is a \fBzmq_pollitem_t\fR structure\&. The \fInitems\fR argument specifies the number of items in the \fIitems\fR array\&. The \fBzmq_pollitem_t\fR structure is defined as follows: .sp .if n \{\ .RS 4 .\} .nf typedef struct { void \fI*socket\fR; int \fIfd\fR; short \fIevents\fR; short \fIrevents\fR; } zmq_pollitem_t; .fi .if n \{\ .RE .\} .sp For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall examine either the 0MQ socket referenced by \fIsocket\fR \fBor\fR the standard socket specified by the file descriptor \fIfd\fR, for the event(s) specified in \fIevents\fR\&. If both \fIsocket\fR and \fIfd\fR are set in a single \fBzmq_pollitem_t\fR, the 0MQ socket referenced by \fIsocket\fR shall take precedence and the value of \fIfd\fR shall be ignored\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp All 0MQ sockets passed to the \fIzmq_poll()\fR function must share the same 0MQ \fIcontext\fR and must belong to the thread calling \fIzmq_poll()\fR\&. .sp .5v .RE .sp For each \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall first clear the \fIrevents\fR member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the \fIrevents\fR member\&. .sp If none of the requested events have occurred on any \fBzmq_pollitem_t\fR item, \fIzmq_poll()\fR shall wait \fItimeout\fR microseconds for an event to occur on any of the requested items\&. If the value of \fItimeout\fR is 0, \fIzmq_poll()\fR shall return immediately\&. If the value of \fItimeout\fR is \-1, \fIzmq_poll()\fR shall block indefinitely until a requested event has occurred on at least one \fBzmq_pollitem_t\fR\&. The resolution of \fItimeout\fR is 1 millisecond\&. .sp The \fIevents\fR and \fIrevents\fR members of \fBzmq_pollitem_t\fR are bit masks constructed by OR\(cqing a combination of the following event flags: .PP \fBZMQ_POLLIN\fR .RS 4 For 0MQ sockets, at least one message may be received from the \fIsocket\fR without blocking\&. For standard sockets this is equivalent to the \fIPOLLIN\fR flag of the \fIpoll()\fR system call and generally means that at least one byte of data may be read from \fIfd\fR without blocking\&. .RE .PP \fBZMQ_POLLOUT\fR .RS 4 For 0MQ sockets, at least one message may be sent to the \fIsocket\fR without blocking\&. For standard sockets this is equivalent to the \fIPOLLOUT\fR flag of the \fIpoll()\fR system call and generally means that at least one byte of data may be written to \fIfd\fR without blocking\&. .RE .PP \fBZMQ_POLLERR\fR .RS 4 For standard sockets, this flag is passed through \fIzmq_poll()\fR to the underlying \fIpoll()\fR system call and generally means that some sort of error condition is present on the socket specified by \fIfd\fR\&. For 0MQ sockets this flag has no effect if set in \fIevents\fR, and shall never be returned in \fIrevents\fR by \fIzmq_poll()\fR\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The \fIzmq_poll()\fR function may be implemented or emulated using operating system interfaces other than \fIpoll()\fR, and as such may be subject to the limits of those interfaces in ways not defined in this documentation\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, the \fIzmq_poll()\fR function shall return the number of \fBzmq_pollitem_t\fR structures with events signaled in \fIrevents\fR or 0 if no events have been signaled\&. Upon failure, \fIzmq_poll()\fR shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBETERM\fR .RS 4 At least one of the members of the \fIitems\fR array refers to a \fIsocket\fR whose associated 0MQ \fIcontext\fR was terminated\&. .RE .PP \fBEFAULT\fR .RS 4 The provided \fIitems\fR was not valid (NULL)\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before any events were available\&. .RE .SH "EXAMPLE" .PP \fBPolling indefinitely for input events on both a 0MQ socket and a standard socket.\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_pollitem_t items [2]; /* First item refers to 0MQ socket \*(Aqsocket\*(Aq */ items[0]\&.socket = socket; items[0]\&.events = ZMQ_POLLIN; /* Second item refers to standard socket \*(Aqfd\*(Aq */ items[1]\&.socket = NULL; items[1]\&.fd = fd; items[1]\&.events = ZMQ_POLLIN; /* Poll for events indefinitely */ int rc = zmq_poll (items, 2, \-1); assert (rc >= 0); /* Returned events will be stored in items[]\&.revents */ .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_socket\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq\fR(7) .sp Your operating system documentation for the \fIpoll()\fR system call\&. .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/Makefile.in0000664000000000000000000004175511737024114015315 0ustar rootroot# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @BUILD_DOC_TRUE@am__append_1 = $(MAN_HTML) subdir = doc DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/platform.hpp CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_$(V)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_$(V)) am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)" man7dir = $(mandir)/man7 NROFF = nroff MANS = $(dist_man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ ASCIIDOC = @ASCIIDOC@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBZMQ_EXTRA_CFLAGS = @LIBZMQ_EXTRA_CFLAGS@ LIBZMQ_EXTRA_CXXFLAGS = @LIBZMQ_EXTRA_CXXFLAGS@ LIBZMQ_EXTRA_LDFLAGS = @LIBZMQ_EXTRA_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LTVER = @LTVER@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ OpenPGM_CFLAGS = @OpenPGM_CFLAGS@ OpenPGM_LIBS = @OpenPGM_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XMLTO = @XMLTO@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ libzmq_have_asciidoc = @libzmq_have_asciidoc@ libzmq_have_xmlto = @libzmq_have_xmlto@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pgm_basename = @pgm_basename@ pgm_srcdir = @pgm_srcdir@ pgm_subdir = @pgm_subdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MAN1 = MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_device.3 zmq_init.3 \ zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \ zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \ zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \ zmq_strerror.3 zmq_term.3 zmq_version.3 zmq_getsockopt.3 zmq_errno.3 MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \ zmq_cpp.7 MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN1:%.1=%.txt) $(MAN3:%.3=%.txt) $(MAN7:%.7=%.txt) MAN_HTML = $(MAN_TXT:%.txt=%.html) @INSTALL_MAN_TRUE@dist_man_MANS = $(MAN_DOC) EXTRA_DIST = asciidoc.conf $(MAN_TXT) $(am__append_1) MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) @BUILD_DOC_TRUE@SUFFIXES = .html .txt .xml .1 .3 .7 all: all-am .SUFFIXES: .SUFFIXES: .html .txt .xml .1 .3 .7 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)" @list=''; test -n "$(man3dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.3[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } install-man7: $(dist_man_MANS) @$(NORMAL_INSTALL) test -z "$(man7dir)" || $(MKDIR_P) "$(DESTDIR)$(man7dir)" @list=''; test -n "$(man7dir)" || exit 0; \ { for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.7[a-z]*$$/p'; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man7dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man7dir)" || exit $$?; }; \ done; } uninstall-man7: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man7dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.7[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ test -z "$$files" || { \ echo " ( cd '$(DESTDIR)$(man7dir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(man7dir)" && rm -f $$files; } tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man7dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-man7 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man3 uninstall-man7 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ dist-hook distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man3 install-man7 install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-man uninstall-man3 uninstall-man7 dist-hook : $(MAN_DOC) $(MAN_HTML) @BUILD_DOC_TRUE@.txt.html: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b xhtml11 -f asciidoc.conf \ @BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $< @BUILD_DOC_TRUE@.txt.xml: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \ @BUILD_DOC_TRUE@ -azmq_version=@PACKAGE_VERSION@ $< @BUILD_DOC_TRUE@.xml.1: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $< @BUILD_DOC_TRUE@.xml.3: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $< @BUILD_DOC_TRUE@.xml.7: @BUILD_DOC_TRUE@ $(AM_V_GEN)$(XMLTO) man $< @BUILD_DOC_TRUE@zmq_epgm.7: zmq_pgm.7 @BUILD_DOC_TRUE@ $(AM_V_GEN)cp zmq_pgm.7 $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: zeromq-2.2.0.orig/doc/zmq_socket.30000664000000000000000000004231511737025346015514 0ustar rootroot'\" t .\" Title: zmq_socket .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_SOCKET" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_socket \- create 0MQ socket .SH "SYNOPSIS" .sp \fBvoid *zmq_socket (void \fR\fB\fI*context\fR\fR\fB, int \fR\fB\fItype\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_socket()\fR function shall create a 0MQ socket within the specified \fIcontext\fR and return an opaque handle to the newly created socket\&. The \fItype\fR argument specifies the socket type, which determines the semantics of communication over the socket\&. .sp The newly created socket is initially unbound, and not associated with any endpoints\&. In order to establish a message flow a socket must first be connected to at least one endpoint with \fBzmq_connect\fR(3), or at least one endpoint must be created for accepting incoming connections with \fBzmq_bind\fR(3)\&. .PP \fBKey differences to conventional sockets\fR. Generally speaking, conventional sockets present a \fIsynchronous\fR interface to either connection\-oriented reliable byte streams (SOCK_STREAM), or connection\-less unreliable datagrams (SOCK_DGRAM)\&. In comparison, 0MQ sockets present an abstraction of an asynchronous \fImessage queue\fR, with the exact queueing semantics depending on the socket type in use\&. Where conventional sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer discrete \fImessages\fR\&. .sp 0MQ sockets being \fIasynchronous\fR means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by 0MQ itself\&. Further, messages may be \fIqueued\fR in the event that a peer is unavailable to receive them\&. .sp Conventional sockets allow only strict one\-to\-one (two peers), many\-to\-one (many clients, one server), or in some cases one\-to\-many (multicast) relationships\&. With the exception of \fIZMQ_PAIR\fR, 0MQ sockets may be connected \fBto multiple endpoints\fR using \fIzmq_connect()\fR, while simultaneously accepting incoming connections \fBfrom multiple endpoints\fR bound to the socket using \fIzmq_bind()\fR, thus allowing many\-to\-many relationships\&. .PP \fBThread safety\fR. 0MQ \fIsockets\fR are \fInot\fR thread safe\&. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier\&. .PP \fBSocket types\fR. The following sections present the socket types defined by 0MQ, grouped by the general \fImessaging pattern\fR which is built from related socket types\&. .SS "Request\-reply pattern" .sp The request\-reply pattern is used for sending requests from a \fIclient\fR to one or more instances of a \fIservice\fR, and receiving subsequent replies to each request sent\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_REQ\fR .RS 4 .sp A socket of type \fIZMQ_REQ\fR is used by a \fIclient\fR to send requests to and receive replies from a \fIservice\fR\&. This socket type allows only an alternating sequence of \fIzmq_send(request)\fR and subsequent \fIzmq_recv(reply)\fR calls\&. Each request sent is round\-robined among all \fIservices\fR, and each reply received is matched with the last issued request\&. .sp When a \fIZMQ_REQ\fR socket enters an exceptional state due to having reached the high water mark for all \fIservices\fR, or if there are no \fIservices\fR at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one \fIservice\fR becomes available for sending; messages are not discarded\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&1.\ \&Summary of ZMQ_REQ characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_REP\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send, Receive, Send, Receive, \&... T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp Incoming routing strategy T}:T{ .sp Last peer T} T{ .sp ZMQ_HWM option action T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_REP\fR .RS 4 .sp A socket of type \fIZMQ_REP\fR is used by a \fIservice\fR to receive requests from and send replies to a \fIclient\fR\&. This socket type allows only an alternating sequence of \fIzmq_recv(request)\fR and subsequent \fIzmq_send(reply)\fR calls\&. Each request received is fair\-queued from among all \fIclients\fR, and each reply sent is routed to the \fIclient\fR that issued the last request\&. If the original requester doesn\(cqt exist any more the reply is silently discarded\&. .sp When a \fIZMQ_REP\fR socket enters an exceptional state due to having reached the high water mark for a \fIclient\fR, then any replies sent to the \fIclient\fR in question shall be dropped until the exceptional state ends\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&2.\ \&Summary of ZMQ_REP characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_REQ\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive, Send, Receive, Send, \&... T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp Last peer T} T{ .sp ZMQ_HWM option action T}:T{ .sp Drop T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_DEALER\fR .RS 4 .sp A socket of type \fIZMQ_DEALER\fR is an advanced pattern used for extending request/reply sockets\&. Each message sent is round\-robined among all connected peers, and each message received is fair\-queued from all connected peers\&. .sp Previously this socket was called \fIZMQ_XREQ\fR and that name remains available for backwards compatibility\&. .sp When a \fIZMQ_DEALER\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded\&. .sp When a \fIZMQ_DEALER\fR socket is connected to a \fIZMQ_REP\fR socket each message sent must consist of an empty message part, the \fIdelimiter\fR, followed by one or more \fIbody parts\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&3.\ \&Summary of ZMQ_DEALER characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_ROUTER\fR, \fIZMQ_REQ\fR, \fIZMQ_REP\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp ZMQ_HWM option action T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_ROUTER\fR .RS 4 .sp A socket of type \fIZMQ_ROUTER\fR is an advanced pattern used for extending request/reply sockets\&. When receiving messages a \fIZMQ_ROUTER\fR socket shall prepend a message part containing the \fIidentity\fR of the originating peer to the message before passing it to the application\&. Messages received are fair\-queued from among all connected peers\&. When sending messages a \fIZMQ_ROUTER\fR socket shall remove the first part of the message and use it to determine the \fIidentity\fR of the peer the message shall be routed to\&. If the peer does not exist anymore the message shall be silently discarded\&. .sp Previously this socket was called \fIZMQ_XREP\fR and that name remains available for backwards compatibility\&. .sp When a \fIZMQ_ROUTER\fR socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends\&. Likewise, any messages routed to a non\-existent peer or a peer for which the individual high water mark has been reached shall also be dropped\&. .sp When a \fIZMQ_REQ\fR socket is connected to a \fIZMQ_ROUTER\fR socket, in addition to the \fIidentity\fR of the originating peer each message received shall contain an empty \fIdelimiter\fR message part\&. Hence, the entire structure of each received message as seen by the application becomes: one or more \fIidentity\fR parts, \fIdelimiter\fR part, one or more \fIbody parts\fR\&. When sending replies to a \fIZMQ_REQ\fR socket the application must include the \fIdelimiter\fR part\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&4.\ \&Summary of ZMQ_ROUTER characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_DEALER\fR, \fIZMQ_REQ\fR, \fIZMQ_REP\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Outgoing routing strategy T}:T{ .sp See text T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp ZMQ_HWM option action T}:T{ .sp Drop T} .TE .sp 1 .RE .SS "Publish\-subscribe pattern" .sp The publish\-subscribe pattern is used for one\-to\-many distribution of data from a single \fIpublisher\fR to multiple \fIsubscribers\fR in a fan out fashion\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PUB\fR .RS 4 .sp A socket of type \fIZMQ_PUB\fR is used by a \fIpublisher\fR to distribute data\&. Messages sent are distributed in a fan out fashion to all connected peers\&. The \fBzmq_recv\fR(3) function is not implemented for this socket type\&. .sp When a \fIZMQ_PUB\fR socket enters an exceptional state due to having reached the high water mark for a \fIsubscriber\fR, then any messages that would be sent to the \fIsubscriber\fR in question shall instead be dropped until the exceptional state ends\&. The \fIzmq_send()\fR function shall never block for this socket type\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&5.\ \&Summary of ZMQ_PUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_SUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send only T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp Fan out T} T{ .sp ZMQ_HWM option action T}:T{ .sp Drop T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_SUB\fR .RS 4 .sp A socket of type \fIZMQ_SUB\fR is used by a \fIsubscriber\fR to subscribe to data distributed by a \fIpublisher\fR\&. Initially a \fIZMQ_SUB\fR socket is not subscribed to any messages, use the \fIZMQ_SUBSCRIBE\fR option of \fBzmq_setsockopt\fR(3) to specify which messages to subscribe to\&. The \fIzmq_send()\fR function is not implemented for this socket type\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&6.\ \&Summary of ZMQ_SUB characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PUB\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive only T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp ZMQ_HWM option action T}:T{ .sp Drop T} .TE .sp 1 .RE .SS "Pipeline pattern" .sp The pipeline pattern is used for distributing data to \fInodes\fR arranged in a pipeline\&. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one \fInode\fR\&. When a pipeline stage is connected to multiple \fInodes\fR data is round\-robined among all connected \fInodes\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PUSH\fR .RS 4 .sp A socket of type \fIZMQ_PUSH\fR is used by a pipeline \fInode\fR to send messages to downstream pipeline \fInodes\fR\&. Messages are round\-robined to all connected downstream \fInodes\fR\&. The \fIzmq_recv()\fR function is not implemented for this socket type\&. .sp When a \fIZMQ_PUSH\fR socket enters an exceptional state due to having reached the high water mark for all downstream \fInodes\fR, or if there are no downstream \fInodes\fR at all, then any \fBzmq_send\fR(3) operations on the socket shall block until the exceptional state ends or at least one downstream \fInode\fR becomes available for sending; messages are not discarded\&. .sp Deprecated alias: \fIZMQ_DOWNSTREAM\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&7.\ \&Summary of ZMQ_PUSH characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PULL\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Send only T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp Round\-robin T} T{ .sp ZMQ_HWM option action T}:T{ .sp Block T} .TE .sp 1 .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PULL\fR .RS 4 .sp A socket of type \fIZMQ_PULL\fR is used by a pipeline \fInode\fR to receive messages from upstream pipeline \fInodes\fR\&. Messages are fair\-queued from among all connected upstream \fInodes\fR\&. The \fIzmq_send()\fR function is not implemented for this socket type\&. .sp Deprecated alias: \fIZMQ_UPSTREAM\fR\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&8.\ \&Summary of ZMQ_PULL characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PUSH\fR T} T{ .sp Direction T}:T{ .sp Unidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Receive only T} T{ .sp Incoming routing strategy T}:T{ .sp Fair\-queued T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp ZMQ_HWM option action T}:T{ .sp N/A T} .TE .sp 1 .RE .SS "Exclusive pair pattern" .sp The exclusive pair pattern is used to connect a peer to precisely one other peer\&. This pattern is used for inter\-thread communication across the inproc transport\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBZMQ_PAIR\fR .RS 4 .sp A socket of type \fIZMQ_PAIR\fR can only be connected to a single peer at any one time\&. No message routing or filtering is performed on messages sent over a \fIZMQ_PAIR\fR socket\&. .sp When a \fIZMQ_PAIR\fR socket enters an exceptional state due to having reached the high water mark for the connected peer, or if no peer is connected, then any \fBzmq_send\fR(3) operations on the socket shall block until the peer becomes available for sending; messages are not discarded\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp \fIZMQ_PAIR\fR sockets are designed for inter\-thread communication across the \fBzmq_inproc\fR(7) transport and do not implement functionality such as auto\-reconnection\&. \fIZMQ_PAIR\fR sockets are considered experimental and may have other missing or broken aspects\&. .sp .5v .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&9.\ \&Summary of ZMQ_PAIR characteristics .TS tab(:); lt lt lt lt lt lt lt lt lt lt lt lt. T{ .sp Compatible peer sockets T}:T{ .sp \fIZMQ_PAIR\fR T} T{ .sp Direction T}:T{ .sp Bidirectional T} T{ .sp Send/receive pattern T}:T{ .sp Unrestricted T} T{ .sp Incoming routing strategy T}:T{ .sp N/A T} T{ .sp Outgoing routing strategy T}:T{ .sp N/A T} T{ .sp ZMQ_HWM option action T}:T{ .sp Block T} .TE .sp 1 .RE .SH "RETURN VALUE" .sp The \fIzmq_socket()\fR function shall return an opaque handle to the newly created socket if successful\&. Otherwise, it shall return NULL and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested socket \fItype\fR is invalid\&. .RE .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR is invalid\&. .RE .PP \fBEMFILE\fR .RS 4 The limit on the total number of open 0MQ sockets has been reached\&. .RE .PP \fBETERM\fR .RS 4 The context specified was terminated\&. .RE .SH "SEE ALSO" .sp \fBzmq_init\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_send\fR(3) \fBzmq_recv\fR(3) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_strerror.txt0000664000000000000000000000175211737025246016562 0ustar rootrootzmq_strerror(3) =============== NAME ---- zmq_strerror - get 0MQ error message string SYNOPSIS -------- *const char *zmq_strerror (int 'errnum');* DESCRIPTION ----------- The _zmq_strerror()_ function shall return a pointer to an error message string corresponding to the error number specified by the 'errnum' argument. As 0MQ defines additional error numbers over and above those defined by the operating system, applications should use _zmq_strerror()_ in preference to the standard _strerror()_ function. RETURN VALUE ------------ The _zmq_strerror()_ function shall return a pointer to an error message string. ERRORS ------ No errors are defined. EXAMPLE ------- .Displaying an error message when a 0MQ context cannot be initialised ---- void *ctx = zmq_init (1, 1, 0); if (!ctx) { printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno)); abort (); } ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_close.html0000664000000000000000000003634311741075664016142 0ustar rootroot zmq_close(3)

SYNOPSIS

int zmq_close (void *socket);

DESCRIPTION

The zmq_close() function shall destroy the socket referenced by the socket argument. Any outstanding messages physically received from the network but not yet received by the application with zmq_recv() shall be discarded. The behaviour for discarding messages sent by the application with zmq_send() but not yet physically transferred to the network depends on the value of the ZMQ_LINGER socket option for the specified socket.

Note
The default setting of ZMQ_LINGER does not discard unsent messages; this behaviour may cause the application to block when calling zmq_term(). For details refer to zmq_setsockopt(3) and zmq_term(3).

RETURN VALUE

The zmq_close() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOTSOCK

The provided socket was invalid.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_bind.txt0000664000000000000000000000521411737025246015611 0ustar rootrootzmq_bind(3) =========== NAME ---- zmq_bind - accept connections on a socket SYNOPSIS -------- *int zmq_bind (void '*socket', const char '*endpoint');* DESCRIPTION ----------- The _zmq_bind()_ function shall create an endpoint for accepting connections and bind it to the socket referenced by the 'socket' argument. The 'endpoint' argument is a string consisting of two parts as follows: 'transport'`://`'address'. The 'transport' part specifies the underlying transport protocol to use. The meaning of the 'address' part is specific to the underlying transport protocol selected. The following transports are defined: 'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] 'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] 'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7] 'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7] With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to multiple endpoints using _zmq_connect()_, while simultaneously accepting incoming connections from multiple endpoints bound to the socket using _zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints. RETURN VALUE ------------ The _zmq_bind()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *EPROTONOSUPPORT*:: The requested 'transport' protocol is not supported. *ENOCOMPATPROTO*:: The requested 'transport' protocol is not compatible with the socket type. *EADDRINUSE*:: The requested 'address' is already in use. *EADDRNOTAVAIL*:: The requested 'address' was not local. *ENODEV*:: The requested 'address' specifies a nonexistent interface. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EMTHREAD*:: No I/O thread is available to accomplish the task. EXAMPLE ------- .Binding a publisher socket to an in-process and a TCP transport ---- /* Create a ZMQ_PUB socket */ void *socket = zmq_socket (context, ZMQ_PUB); assert (socket); /* Bind it to a in-process transport with the address 'my_publisher' */ int rc = zmq_bind (socket, "inproc://my_publisher"); assert (rc == 0); /* Bind it to a TCP transport on port 5555 of the 'eth0' interface */ rc = zmq_bind (socket, "tcp://eth0:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_tcp.html0000664000000000000000000005065411741075733015621 0ustar rootroot zmq_tcp(7)

SYNOPSIS

TCP is an ubiquitous, reliable, unicast transport. When connecting distributed applications over a network with ØMQ, using the TCP transport will likely be your first choice.

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use, and for the TCP transport shall be set to tcp. The meaning of the endpoint part for the TCP transport is defined below.

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the tcp transport, the endpoint shall be interpreted as an interface followed by a colon and the TCP port number to use.

An interface may be specified by either of the following:

  • The wild-card *, meaning all available interfaces.

  • The primary IPv4 address assigned to the interface, in its numeric representation.

  • The interface name as defined by the operating system.

Note
Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an interface.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the tcp transport, the endpoint shall be interpreted as a peer address followed by a colon and the TCP port number to use.

A peer address may be specified by either of the following:

  • The DNS name of the peer.

  • The IPv4 address of the peer, in its numeric representation.

WIRE FORMAT

ØMQ messages are transmitted over TCP in frames consisting of an encoded payload length, followed by a flags field and the message body. The payload length is defined as the combined length in octets of the message body and the flags field.

For frames with a payload length not exceeding 254 octets, the payload length shall be encoded as a single octet. The minimum valid payload length of a frame is 1 octet, thus a payload length of 0 octets is invalid and such frames SHOULD be ignored.

For frames with a payload length exceeding 254 octets, the payload length shall be encoded as a single octet with the value 255 followed by the payload length represented as a 64-bit unsigned integer in network byte order.

The flags field consists of a single octet containing various control flags:

Bit 0 (MORE): More message parts to follow. A value of 0 indicates that there are no more message parts to follow; or that the message being sent is not a multi-part message. A value of 1 indicates that the message being sent is a multi-part message and more message parts are to follow.

Bits 1-7: Reserved. Bits 1-7 are reserved for future expansion and MUST be set to zero.

The following ABNF grammar represents a single frame:

    frame           = (length flags data)
    length          = OCTET / (escape 8OCTET)
    flags           = OCTET
    escape          = %xFF
    data            = *OCTET

The following diagram illustrates the layout of a frame with a payload length not exceeding 254 octets:

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload length|     Flags     |       Message body        ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message body ...
+-+-+-+-+-+-+- ...

The following diagram illustrates the layout of a frame with a payload length exceeding 254 octets:

0                   1                   2                   3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     0xff      |               Payload length              ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       Payload length                      ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Payload length|     Flags     |        Message body       ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  Message body ...
+-+-+-+-+-+-+-+ ...

EXAMPLES

Assigning a local address to a socket
/* TCP port 5555 on all available interfaces */
rc = zmq_bind(socket, "tcp://*:5555");
assert (rc == 0);
/* TCP port 5555 on the local loop-back interface on all platforms */
rc = zmq_bind(socket, "tcp://127.0.0.1:5555");
assert (rc == 0);
/* TCP port 5555 on the first Ethernet network interface on Linux */
rc = zmq_bind(socket, "tcp://eth0:5555");
assert (rc == 0);
Connecting a socket
/* Connecting using an IP address */
rc = zmq_connect(socket, "tcp://192.168.1.1:5555");
assert (rc == 0);
/* Connecting using a DNS name */
rc = zmq_connect(socket, "tcp://server1:5555");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_errno.txt0000664000000000000000000000204411737025246016020 0ustar rootrootzmq_errno(3) ============ NAME ---- zmq_errno - retrieve value of errno for the calling thread SYNOPSIS -------- *int zmq_errno (void);* DESCRIPTION ----------- The _zmq_errno()_ function shall retrieve the value of the 'errno' variable for the calling thread. The _zmq_errno()_ function is provided to assist users on non-POSIX systems who are experiencing issues with retrieving the correct value of 'errno' directly. Specifically, users on Win32 systems whose application is using a different C run-time library from the C run-time library in use by 0MQ will need to use _zmq_errno()_ for correct operation. IMPORTANT: Users not experiencing issues with retrieving the correct value of 'errno' should not use this function and should instead access the 'errno' variable directly. RETURN VALUE ------------ The _zmq_errno()_ function shall return the value of the 'errno' variable for the calling thread. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/asciidoc.conf0000664000000000000000000000240111732125604015657 0ustar rootroot[paradef-default] literal-style=template="literalparagraph" [macros] (?su)[\\]?(?Plinkzmq):(?P\S*?)\[(?P.*?)\]= ifdef::backend-docbook[] [linkzmq-inlinemacro] {0%{target}} {0#} {0#{target}{0}} {0#} endif::backend-docbook[] ifdef::backend-xhtml11[] [linkzmq-inlinemacro] {target}{0?({0})} endif::backend-xhtml11[] ifdef::doctype-manpage[] ifdef::backend-docbook[] [header] template::[header-declarations] {mantitle} {manvolnum} 0MQ {zmq_version} 0MQ Manual {manname} {manpurpose} endif::backend-docbook[] endif::doctype-manpage[] ifdef::backend-xhtml11[] [footer] {disable-javascript%

} endif::backend-xhtml11[] [replacements] ifdef::backend-xhtml11[] 0MQ=ØMQ endif::backend-xhtml11[] zeromq-2.2.0.orig/doc/zmq_epgm.html0000664000000000000000000005107011741075734015755 0ustar rootroot zmq_pgm(7)

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the pgm transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the epgm transport).

The pgm and epgm transports can only be used with the ZMQ_PUB and ZMQ_SUB socket types.

Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop-back interface. For details, refer to the ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP options documented in zmq_setsockopt(3).

Caution
The pgm transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the epgm transport instead which does not require any special privileges.

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use. For the standard PGM protocol, transport shall be set to pgm. For the "Encapsulated PGM" protocol transport shall be set to epgm. The meaning of the endpoint part for both the pgm and epgm transport is defined below.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon and a port number.

An interface may be specified by either of the following:

  • The interface name as defined by the operating system.

  • The primary IPv4 address assigned to the interface, in its numeric representation.

Note
Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an interface.

A multicast address is specified by an IPv4 multicast address in its numeric representation.

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

datagram               = (offset data)
offset                 = 2OCTET
data                   = *OCTET

In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

+------------------+----------------------+
| offset (16 bits) |         data         |
+------------------+----------------------+

The following diagram further illustrates how three example ØMQ frames are laid out in consecutive PGM datagram payloads:

First datagram payload
+--------------+-------------+---------------------+
| Frame offset |   Frame 1   |   Frame 2, part 1   |
|    0x0000    | (Message 1) | (Message 2, part 1) |
+--------------+-------------+---------------------+

Second datagram payload
+--------------+---------------------+
| Frame offset |   Frame 2, part 2   |
| 0xFFFF       | (Message 2, part 2) |
+--------------+---------------------+

Third datagram payload
+--------------+----------------------------+-------------+
| Frame offset |   Frame 2, final 8 bytes   |   Frame 3   |
| 0x0008       | (Message 2, final 8 bytes) | (Message 3) |
+--------------+----------------------------+-------------+

EXAMPLE

Connecting a socket
/* Connecting to the multicast address 239.192.1.1, port 5555, */
/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
/* Connecting to the multicast address 239.192.1.1, port 5555, */
/* using the network interface with the address 192.168.1.1 */
/* and the standard PGM protocol */
rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_poll.txt0000664000000000000000000001060611737025246015644 0ustar rootrootzmq_poll(3) =========== NAME ---- zmq_poll - input/output multiplexing SYNOPSIS -------- *int zmq_poll (zmq_pollitem_t '*items', int 'nitems', long 'timeout');* DESCRIPTION ----------- The _zmq_poll()_ function provides a mechanism for applications to multiplex input/output events in a level-triggered fashion over a set of sockets. Each member of the array pointed to by the 'items' argument is a *zmq_pollitem_t* structure. The 'nitems' argument specifies the number of items in the 'items' array. The *zmq_pollitem_t* structure is defined as follows: ["literal", subs="quotes"] typedef struct { void '*socket'; int 'fd'; short 'events'; short 'revents'; } zmq_pollitem_t; For each *zmq_pollitem_t* item, _zmq_poll()_ shall examine either the 0MQ socket referenced by 'socket' *or* the standard socket specified by the file descriptor 'fd', for the event(s) specified in 'events'. If both 'socket' and 'fd' are set in a single *zmq_pollitem_t*, the 0MQ socket referenced by 'socket' shall take precedence and the value of 'fd' shall be ignored. NOTE: All 0MQ sockets passed to the _zmq_poll()_ function must share the same 0MQ 'context' and must belong to the thread calling _zmq_poll()_. For each *zmq_pollitem_t* item, _zmq_poll()_ shall first clear the 'revents' member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the 'revents' member. If none of the requested events have occurred on any *zmq_pollitem_t* item, _zmq_poll()_ shall wait 'timeout' microseconds for an event to occur on any of the requested items. If the value of 'timeout' is `0`, _zmq_poll()_ shall return immediately. If the value of 'timeout' is `-1`, _zmq_poll()_ shall block indefinitely until a requested event has occurred on at least one *zmq_pollitem_t*. The resolution of 'timeout' is 1 millisecond. The 'events' and 'revents' members of *zmq_pollitem_t* are bit masks constructed by OR'ing a combination of the following event flags: *ZMQ_POLLIN*:: For 0MQ sockets, at least one message may be received from the 'socket' without blocking. For standard sockets this is equivalent to the 'POLLIN' flag of the _poll()_ system call and generally means that at least one byte of data may be read from 'fd' without blocking. *ZMQ_POLLOUT*:: For 0MQ sockets, at least one message may be sent to the 'socket' without blocking. For standard sockets this is equivalent to the 'POLLOUT' flag of the _poll()_ system call and generally means that at least one byte of data may be written to 'fd' without blocking. *ZMQ_POLLERR*:: For standard sockets, this flag is passed through _zmq_poll()_ to the underlying _poll()_ system call and generally means that some sort of error condition is present on the socket specified by 'fd'. For 0MQ sockets this flag has no effect if set in 'events', and shall never be returned in 'revents' by _zmq_poll()_. NOTE: The _zmq_poll()_ function may be implemented or emulated using operating system interfaces other than _poll()_, and as such may be subject to the limits of those interfaces in ways not defined in this documentation. RETURN VALUE ------------ Upon successful completion, the _zmq_poll()_ function shall return the number of *zmq_pollitem_t* structures with events signaled in 'revents' or `0` if no events have been signaled. Upon failure, _zmq_poll()_ shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ETERM*:: At least one of the members of the 'items' array refers to a 'socket' whose associated 0MQ 'context' was terminated. *EFAULT*:: The provided 'items' was not valid (NULL). *EINTR*:: The operation was interrupted by delivery of a signal before any events were available. EXAMPLE ------- .Polling indefinitely for input events on both a 0MQ socket and a standard socket. ---- zmq_pollitem_t items [2]; /* First item refers to 0MQ socket 'socket' */ items[0].socket = socket; items[0].events = ZMQ_POLLIN; /* Second item refers to standard socket 'fd' */ items[1].socket = NULL; items[1].fd = fd; items[1].events = ZMQ_POLLIN; /* Poll for events indefinitely */ int rc = zmq_poll (items, 2, -1); assert (rc >= 0); /* Returned events will be stored in items[].revents */ ---- SEE ALSO -------- linkzmq:zmq_socket[3] linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq[7] Your operating system documentation for the _poll()_ system call. AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_close.txt0000664000000000000000000000232111737025246016644 0ustar rootrootzmq_msg_close(3) ================ NAME ---- zmq_msg_close - release 0MQ message SYNOPSIS -------- *int zmq_msg_close (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_close()_ function shall inform the 0MQ infrastructure that any resources associated with the message object referenced by 'msg' are no longer required and may be released. Actual release of resources associated with the message object shall be postponed by 0MQ until all users of the message or underlying data buffer have indicated it is no longer required. Applications should ensure that _zmq_msg_close()_ is called once a message is no longer required, otherwise memory leaks may occur. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_close()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_device.30000664000000000000000000001261511737025314015456 0ustar rootroot'\" t .\" Title: zmq_device .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_DEVICE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_device \- start built\-in 0MQ device .SH "SYNOPSIS" .sp \fBint zmq_device (int \fR\fB\fIdevice\fR\fR\fB, const void \fR\fB\fI*frontend\fR\fR\fB, const void \fR\fB\fI*backend\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_device()\fR function starts a built\-in 0MQ device\&. The \fIdevice\fR argument is one of: .PP \fIZMQ_QUEUE\fR .RS 4 starts a queue device .RE .PP \fIZMQ_FORWARDER\fR .RS 4 starts a forwarder device .RE .PP \fIZMQ_STREAMER\fR .RS 4 starts a streamer device .RE .sp The device connects a frontend socket to a backend socket\&. Conceptually, data flows from frontend to backend\&. Depending on the socket types, replies may flow in the opposite direction\&. .sp Before calling \fIzmq_device()\fR you must set any socket options, and connect or bind both frontend and backend sockets\&. The two conventional device models are: .PP \fBproxy\fR .RS 4 bind frontend socket to an endpoint, and connect backend socket to downstream components\&. A proxy device model does not require changes to the downstream topology but that topology is static (any changes require reconfiguring the device)\&. .RE .PP \fBbroker\fR .RS 4 bind frontend socket to one endpoint and bind backend socket to a second endpoint\&. Downstream components must now connect into the device\&. A broker device model allows a dynamic downstream topology (components can come and go at any time)\&. .RE .sp \fIzmq_device()\fR runs in the current thread and returns only if/when the current context is closed\&. .SH "QUEUE DEVICE" .sp \fIZMQ_QUEUE\fR creates a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services\&. Requests are fair\-queued from frontend connections and load\-balanced between backend connections\&. Replies automatically return to the client that made the original request\&. .sp This device is part of the \fIrequest\-reply\fR pattern\&. The frontend speaks to clients and the backend speaks to services\&. You should use \fIZMQ_QUEUE\fR with a \fIZMQ_XREP\fR socket for the frontend and a \fIZMQ_XREQ\fR socket for the backend\&. Other combinations are not documented\&. .sp Refer to \fBzmq_socket\fR(3) for a description of these socket types\&. .SH "FORWARDER DEVICE" .sp \fIZMQ_FORWARDER\fR collects messages from a set of publishers and forwards these to a set of subscribers\&. You will generally use this to bridge networks, e\&.g\&. read on TCP unicast and forward on multicast\&. .sp This device is part of the \fIpublish\-subscribe\fR pattern\&. The frontend speaks to publishers and the backend speaks to subscribers\&. You should use \fIZMQ_FORWARDER\fR with a \fIZMQ_SUB\fR socket for the frontend and a \fIZMQ_PUB\fR socket for the backend\&. Other combinations are not documented\&. .sp Refer to \fBzmq_socket\fR(3) for a description of these socket types\&. .SH "STREAMER DEVICE" .sp \fIZMQ_STREAMER\fR collects tasks from a set of pushers and forwards these to a set of pullers\&. You will generally use this to bridge networks\&. Messages are fair\-queued from pushers and load\-balanced to pullers\&. .sp This device is part of the \fIpipeline\fR pattern\&. The frontend speaks to pushers and the backend speaks to pullers\&. You should use \fIZMQ_STREAMER\fR with a \fIZMQ_PULL\fR socket for the frontend and a \fIZMQ_PUSH\fR socket for the backend\&. Other combinations are not documented\&. .sp Refer to \fBzmq_socket\fR(3) for a description of these socket types\&. .SH "RETURN VALUE" .sp The \fIzmq_device()\fR function always returns \-1 and \fIerrno\fR set to \fBETERM\fR (the 0MQ \fIcontext\fR associated with either of the specified sockets was terminated)\&. .SH "EXAMPLE" .PP \fBCreating a queue broker\fR. .sp .if n \{\ .RS 4 .\} .nf // Create frontend and backend sockets void *frontend = zmq_socket (context, ZMQ_XREP); assert (backend); void *backend = zmq_socket (context, ZMQ_XREQ); assert (frontend); // Bind both sockets to TCP ports assert (zmq_bind (frontend, "tcp://*:5555") == 0); assert (zmq_bind (backend, "tcp://*:5556") == 0); // Start a queue device zmq_device (ZMQ_QUEUE, frontend, backend); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_cpp.txt0000664000000000000000000001126411737025246015461 0ustar rootrootzmq_cpp(7) ========== NAME ---- zmq_cpp - interface between 0MQ and C++ applications SYNOPSIS -------- *#include * *c$$++$$* ['flags'] 'files' *-lzmq* ['libraries'] DESCRIPTION ----------- This manual page describes how the 0MQ C++ language binding maps to the underlying 0MQ C library functions. All 0MQ constants defined by _zmq.h_ are also available to the C++ language binding. The following classes are provided in the 'zmq' namespace: Context ~~~~~~~ The 'context_t' class encapsulates functionality dealing with the initialisation and termination of a 0MQ _context_. Constructor ^^^^^^^^^^^ [verse] *context_t::context_t(int 'io_threads')* Maps to the _zmq_init()_ function, as described in linkzmq:zmq_init[3]. Destructor ^^^^^^^^^^ [verse] *context_t::~context_t(void)* Maps to the _zmq_term()_ function, as described in linkzmq:zmq_term[3]. Methods ^^^^^^^ None. Socket ~~~~~~ The 'socket_t' class encapsulates a 0MQ socket. Constructor ^^^^^^^^^^^ [verse] *socket_t::socket_t(context_t '&context', int 'type')* Maps to the _zmq_socket()_ function, as described in linkzmq:zmq_socket[3]. Destructor ^^^^^^^^^^ [verse] *socket_t::~socket_t(void)* Calls the _zmq_close()_ function, as described in linkzmq:zmq_close[3]. Methods ^^^^^^^ [verse] *void socket_t::getsockopt(int 'option_name', void '*option_value', size_t '*option_len')* Maps to the _zmq_getsockopt()_ function, as described in linkzmq:zmq_getsockopt[3]. [verse] *void socket_t::setsockopt(int 'option_name', const void '*option_value', size_t 'option_len')* Maps to the _zmq_setsockopt()_ function, as described in linkzmq:zmq_setsockopt[3]. [verse] *void socket_t::bind(const char '*endpoint')* Maps to the _zmq_bind()_ function, as described in linkzmq:zmq_bind[3]. [verse] *void socket_t::connect(const char '*endpoint')* Maps to the _zmq_connect()_ function, as described in linkzmq:zmq_connect[3]. [verse] *bool socket_t::send(message_t '&msg', int 'flags' = 0)* Maps to the _zmq_send()_ function, as described in linkzmq:zmq_send[3]. Returns true if message is successfully sent, false if it is not. [verse] *bool socket_t::recv(message_t '*msg', int 'flags' = 0)* Maps to the _zmq_recv()_ function, as described in linkzmq:zmq_recv[3]. Returns true if message is successfully received, false if it is not. Message ~~~~~~~ The 'zmq::message_t' class encapsulates the 'zmq_msg_t' structure and functions to construct, destruct and manipulate 0MQ messages. Constructor ^^^^^^^^^^^ [verse] *message_t::message_t(void)* *message_t::message_t(size_t 'size')* *message_t::message_t(void '*data', size_t 'size', free_fn '*ffn')* These map to the _zmq_msg_init()_, _zmq_msg_init_size()_ and _zmq_msg_init_data()_ functions, described in linkzmq:zmq_msg_init[3], linkzmq:zmq_msg_init_size[3] and linkzmq:zmq_msg_init_data[3] respectively. Destructor ^^^^^^^^^^ [verse] *message_t::~message_t(void)* Calls the _zmq_msg_close()_ function, as described in linkzmq:zmq_msg_close[3]. Methods ^^^^^^^ [verse] *void *message_t::data (void)* Maps to the _zmq_msg_data()_ function, as described in linkzmq:zmq_msg_data[3]. [verse] *size_t message_t::size (void)* Maps to the _zmq_msg_size()_ function, as described in linkzmq:zmq_msg_size[3]. [verse] *void message_t::copy (message_t '*src')* Maps to the _zmq_msg_copy()_ function, as described in linkzmq:zmq_msg_copy[3]. [verse] *void message_t::move (message_t '*src')* Maps to the _zmq_msg_move()_ function, as described in linkzmq:zmq_msg_move[3]. [verse] *message_t::rebuild(void)* *message_t::rebuild(size_t 'size')* *message_t::rebuild(void '*data', size_t 'size', free_fn '*ffn')* Equivalent to calling the _zmq_msg_close()_ function followed by the corresponding _zmq_msg_init()_ function. Input/output multiplexing ~~~~~~~~~~~~~~~~~~~~~~~~~ [verse] *int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)* The _poll()_ function is a namespaced equivalent of the _zmq_poll()_ function, as described in linkzmq:zmq_poll[3]. NOTE: To obtain a 0MQ _socket_ for use in a _zmq_pollitem_t_ structure, you should cast an instance of the _socket_t_ class to `(void *)`. ERROR HANDLING -------------- All errors reported by the underlying 0MQ C library functions are automatically converted to exceptions by the C++ language binding. The 'zmq::error_t' class is derived from the 'std::exception' class and uses the _zmq_strerror()_ function to convert the error code to human-readable string. EXAMPLE ------- ---- zmq::context_t ctx (1); zmq::socket_t s (ctx, ZMQ_PUB); s.connect ("tcp://192.168.0.115:5555"); zmq::message_t msg (100); memset (msg.data (), 0, 100); s.send (msg); ---- SEE ALSO -------- linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_connect.30000664000000000000000000001045311737025312015644 0ustar rootroot'\" t .\" Title: zmq_connect .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_CONNECT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_connect \- connect a socket .SH "SYNOPSIS" .sp \fBint zmq_connect (void \fR\fB\fI*socket\fR\fR\fB, const char \fR\fB\fI*endpoint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_connect()\fR function shall connect the socket referenced by the \fIsocket\fR argument to the endpoint specified by the \fIendpoint\fR argument\&. .sp The \fIendpoint\fR argument is a string consisting of two parts as follows: \fItransport\fR://\fIaddress\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use\&. The meaning of the \fIaddress\fR part is specific to the underlying transport protocol selected\&. .sp The following transports are defined: .PP \fIinproc\fR .RS 4 local in\-process (inter\-thread) communication transport, see \fBzmq_inproc\fR(7) .RE .PP \fIipc\fR .RS 4 local inter\-process communication transport, see \fBzmq_ipc\fR(7) .RE .PP \fItcp\fR .RS 4 unicast transport using TCP, see \fBzmq_tcp\fR(7) .RE .PP \fIpgm\fR, \fIepgm\fR .RS 4 reliable multicast transport using PGM, see \fBzmq_pgm\fR(7) .RE .sp With the exception of \fIZMQ_PAIR\fR sockets, a single socket may be connected to multiple endpoints using \fIzmq_connect()\fR, while simultaneously accepting incoming connections from multiple endpoints bound to the socket using \fIzmq_bind()\fR\&. Refer to \fBzmq_socket\fR(3) for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The connection will not be performed immediately but as needed by 0MQ\&. Thus a successful invocation of \fIzmq_connect()\fR does not indicate that a physical connection was or can actually be established\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_connect()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBEPROTONOSUPPORT\fR .RS 4 The requested \fItransport\fR protocol is not supported\&. .RE .PP \fBENOCOMPATPROTO\fR .RS 4 The requested \fItransport\fR protocol is not compatible with the socket type\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEMTHREAD\fR .RS 4 No I/O thread is available to accomplish the task\&. .RE .SH "EXAMPLE" .PP \fBConnecting a subscriber socket to an in-process and a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to an in\-process transport with the address \*(Aqmy_publisher\*(Aq */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_version.html0000664000000000000000000003554011741075731016513 0ustar rootroot zmq_version(3)

SYNOPSIS

void zmq_version (int *major, int *minor, int *patch);

DESCRIPTION

The zmq_version() function shall fill in the integer variables pointed to by the major, minor and patch arguments with the major, minor and patch level components of the ØMQ library version.

This functionality is intended for applications or language bindings dynamically linking to the ØMQ library that wish to determine the actual version of the ØMQ library they are using.

RETURN VALUE

There is no return value.

ERRORS

No errors are defined.

EXAMPLE

Printing out the version of the ØMQ library
int major, minor, patch;
zmq_version (&major, &minor, &patch);
printf ("Current 0MQ version is %d.%d.%d\n", major, minor, patch);

SEE ALSO

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_init.30000664000000000000000000000435611737025315015166 0ustar rootroot'\" t .\" Title: zmq_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_INIT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_init \- initialise 0MQ context .SH "SYNOPSIS" .sp \fBvoid *zmq_init (int \fR\fB\fIio_threads\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_init()\fR function initialises a 0MQ \fIcontext\fR\&. .sp The \fIio_threads\fR argument specifies the size of the 0MQ thread pool to handle I/O operations\&. If your application is using only the \fIinproc\fR transport for messaging you may set this to zero, otherwise set it to at least one\&. .PP \fBThread safety\fR. A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. .SH "RETURN VALUE" .sp The \fIzmq_init()\fR function shall return an opaque handle to the initialised \fIcontext\fR if successful\&. Otherwise it shall return NULL and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 An invalid number of \fIio_threads\fR was requested\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_term\fR(3) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_getsockopt.html0000664000000000000000000012630411741075732017210 0ustar rootroot zmq_getsockopt(3)

SYNOPSIS

int zmq_getsockopt (void *socket, int option_name, void *option_value, size_t *option_len);

DESCRIPTION

The zmq_getsockopt() function shall retrieve the value for the option specified by the option_name argument for the ØMQ socket pointed to by the socket argument, and store it in the buffer pointed to by the option_value argument. The option_len argument is the size in bytes of the buffer pointed to by option_value; upon successful completion zmq_getsockopt() shall modify the option_len argument to indicate the actual size of the option value stored in the buffer.

The following options can be retrieved with the zmq_getsockopt() function:

ZMQ_TYPE: Retrieve socket type

The ZMQ_TYPE option shall retrieve the socket type for the specified socket. The socket type is specified at socket creation time and cannot be modified afterwards.

Option value type

int

Option value unit

N/A

Default value

N/A

Applicable socket types

all

ZMQ_RCVMORE: More message parts to follow

The ZMQ_RCVMORE option shall return a boolean value indicating if the multi-part message currently being read from the specified socket has more message parts to follow. If there are no message parts to follow or if the message currently being read is not a multi-part message a value of zero shall be returned. Otherwise, a value of 1 shall be returned.

Refer to zmq_send(3) and zmq_recv(3) for a detailed description of sending/receiving multi-part messages.

Option value type

int64_t

Option value unit

boolean

Default value

N/A

Applicable socket types

all

ZMQ_HWM: Retrieve high water mark

The ZMQ_HWM option shall retrieve the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

The default ZMQ_HWM value of zero means "no limit".

Option value type

uint64_t

Option value unit

messages

Default value

0

Applicable socket types

all

ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN

Retrieve the timeout for recv operation on the socket. If the value is 0, zmq_recv(3) will return immediately, with a EAGAIN error if there is no message to receive. If the value is -1, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN

Retrieve the timeout for send operation on the socket. If the value is 0, zmq_send(3) will return immediately, with a EAGAIN error if the message cannot be sent. If the value is -1, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_SWAP: Retrieve disk offload size

The ZMQ_SWAP option shall retrieve the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory.

The value of ZMQ_SWAP defines the maximum size of the swap space in bytes.

Option value type

int64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_AFFINITY: Retrieve I/O thread affinity

The ZMQ_AFFINITY option shall retrieve the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with the socket’s context shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on socket shall be handled exclusively by I/O threads 1 and 2.

See also zmq_init(3) for details on allocating the number of I/O threads for a specific context.

Option value type

uint64_t

Option value unit

N/A (bitmap)

Default value

0

Applicable socket types

N/A

ZMQ_IDENTITY: Retrieve socket identity

The ZMQ_IDENTITY option shall retrieve the identity of the specified socket. Socket identity determines if existing ØMQ infrastructure (message queues, forwarding devices) shall be identified with a specific application and persist across multiple runs of the application.

If the socket has no identity, each run of an application is completely separate from other runs. However, with identity set the socket shall re-use any existing ØMQ infrastructure configured by the previous run(s). Thus the application may receive messages that were sent in the meantime, message queue limits shall be shared with previous run(s) and so on.

Identity can be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by ØMQ infrastructure.

Option value type

binary data

Option value unit

N/A

Default value

NULL

Applicable socket types

all

ZMQ_RATE: Retrieve multicast data rate

The ZMQ_RATE option shall retrieve the maximum send or receive data rate for multicast transports using the specified socket.

Option value type

int64_t

Option value unit

kilobits per second

Default value

100

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL: Get multicast recovery interval

The ZMQ_RECOVERY_IVL option shall retrieve the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

Option value type

int64_t

Option value unit

seconds

Default value

10

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds

The ZMQ_RECOVERY_IVL’_MSEC option shall retrieve the recovery interval, in milliseconds, for multicast transports using the specified 'socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

For backward compatibility, the default value of ZMQ_RECOVERY_IVL_MSEC is -1 indicating that the recovery interval should be obtained from the ZMQ_RECOVERY_IVL option. However, if the ZMQ_RECOVERY_IVL_MSEC value is not zero, then it will take precedence, and be used.

Option value type

int64_t

Option value unit

milliseconds

Default value

-1

Applicable socket types

all, when using multicast transports

ZMQ_MCAST_LOOP: Control multicast loop-back

The ZMQ_MCAST_LOOP option controls whether data sent via multicast transports can also be received by the sending host via loop-back. A value of zero indicates that the loop-back functionality is disabled, while the default value of 1 indicates that the loop-back functionality is enabled. Leaving multicast loop-back enabled when it is not required can have a negative impact on performance. Where possible, disable ZMQ_MCAST_LOOP in production environments.

Option value type

int64_t

Option value unit

boolean

Default value

1

Applicable socket types

all, when using multicast transports

ZMQ_SNDBUF: Retrieve kernel transmit buffer size

The ZMQ_SNDBUF option shall retrieve the underlying kernel transmit buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the SO_SNDBUF socket option.

Option value type

uint64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_RCVBUF: Retrieve kernel receive buffer size

The ZMQ_RCVBUF option shall retrieve the underlying kernel receive buffer size for the specified socket. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the SO_RCVBUF socket option.

Option value type

uint64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_LINGER: Retrieve linger period for socket shutdown

The ZMQ_LINGER option shall retrieve the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with zmq_close(3), and further affects the termination of the socket’s context with zmq_term(3). The following outlines the different behaviours:

  • The default value of -1 specifies an infinite linger period. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until all pending messages have been sent to a peer.

  • The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with zmq_close().

  • Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded.

    Option value type

    int

    Option value unit

    milliseconds

    Default value

    -1 (infinite)

    Applicable socket types

    all

ZMQ_RECONNECT_IVL: Retrieve reconnection interval

The ZMQ_RECONNECT_IVL option shall retrieve the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports.

Note
The reconnection interval may be randomized by ØMQ to prevent reconnection storms in topologies with a large number of peers per socket.
Option value type

int

Option value unit

milliseconds

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall retrieve the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.

Note
Values less than ZMQ_RECONNECT_IVL will be ignored.
Option value type

int

Option value unit

milliseconds

Default value

0 (only use ZMQ_RECONNECT_IVL)

Applicable socket types

all, only for connection-oriented transport

ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall retrieve the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system documentation for the listen function.

Option value type

int

Option value unit

connections

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_FD: Retrieve file descriptor associated with the socket

The ZMQ_FD option shall retrieve the file descriptor associated with the specified socket. The returned file descriptor can be used to integrate the socket into an existing event loop; the ØMQ library shall signal any pending events on the socket in an edge-triggered fashion by making the file descriptor become ready for reading.

Note
The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the ZMQ_EVENTS option.
Caution
The returned file descriptor is intended for use with a poll or similar system call only. Applications must never attempt to read or write data to it directly, neither should they try to close it.
Option value type

int on POSIX systems, SOCKET on Windows

Option value unit

N/A

Default value

N/A

Applicable socket types

all

ZMQ_EVENTS: Retrieve socket event state

The ZMQ_EVENTS option shall retrieve the event state for the specified socket. The returned value is a bit mask constructed by OR’ing a combination of the following event flags:

ZMQ_POLLIN

Indicates that at least one message may be received from the specified socket without blocking.

ZMQ_POLLOUT

Indicates that at least one message may be sent to the specified socket without blocking.

The combination of a file descriptor returned by the ZMQ_FD option being ready for reading but no actual events returned by a subsequent retrieval of the ZMQ_EVENTS option is valid; applications should simply ignore this case and restart their polling operation/event loop.

Option value type

uint32_t

Option value unit

N/A (flags)

Default value

N/A

Applicable socket types

all

RETURN VALUE

The zmq_getsockopt() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown, or the requested option_len or option_value is invalid, or the size of the buffer pointed to by option_value, as specified by option_len, is insufficient for storing the option value.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal.

EXAMPLE

Retrieving the high water mark
/* Retrieve high water mark into hwm */
int64_t hwm;
size_t hwm_size = sizeof (hwm);
rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, &hwm_size);
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_strerror.html0000664000000000000000000003550311741075731016707 0ustar rootroot zmq_strerror(3)

SYNOPSIS

const char *zmq_strerror (int errnum);

DESCRIPTION

The zmq_strerror() function shall return a pointer to an error message string corresponding to the error number specified by the errnum argument. As ØMQ defines additional error numbers over and above those defined by the operating system, applications should use zmq_strerror() in preference to the standard strerror() function.

RETURN VALUE

The zmq_strerror() function shall return a pointer to an error message string.

ERRORS

No errors are defined.

EXAMPLE

Displaying an error message when a ØMQ context cannot be initialised
void *ctx = zmq_init (1, 1, 0);
if (!ctx) {
    printf ("Error occurred during zmq_init(): %s\n", zmq_strerror (errno));
    abort ();
}

SEE ALSO

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_poll.html0000664000000000000000000004750611741075726016005 0ustar rootroot zmq_poll(3)

SYNOPSIS

int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout);

DESCRIPTION

The zmq_poll() function provides a mechanism for applications to multiplex input/output events in a level-triggered fashion over a set of sockets. Each member of the array pointed to by the items argument is a zmq_pollitem_t structure. The nitems argument specifies the number of items in the items array. The zmq_pollitem_t structure is defined as follows:

typedef struct
{
    void *socket;
    int fd;
    short events;
    short revents;
} zmq_pollitem_t;

For each zmq_pollitem_t item, zmq_poll() shall examine either the ØMQ socket referenced by socket or the standard socket specified by the file descriptor fd, for the event(s) specified in events. If both socket and fd are set in a single zmq_pollitem_t, the ØMQ socket referenced by socket shall take precedence and the value of fd shall be ignored.

Note
All ØMQ sockets passed to the zmq_poll() function must share the same ØMQ context and must belong to the thread calling zmq_poll().

For each zmq_pollitem_t item, zmq_poll() shall first clear the revents member, and then indicate any requested events that have occurred by setting the bit corresponding to the event condition in the revents member.

If none of the requested events have occurred on any zmq_pollitem_t item, zmq_poll() shall wait timeout microseconds for an event to occur on any of the requested items. If the value of timeout is 0, zmq_poll() shall return immediately. If the value of timeout is -1, zmq_poll() shall block indefinitely until a requested event has occurred on at least one zmq_pollitem_t. The resolution of timeout is 1 millisecond.

The events and revents members of zmq_pollitem_t are bit masks constructed by OR’ing a combination of the following event flags:

ZMQ_POLLIN

For ØMQ sockets, at least one message may be received from the socket without blocking. For standard sockets this is equivalent to the POLLIN flag of the poll() system call and generally means that at least one byte of data may be read from fd without blocking.

ZMQ_POLLOUT

For ØMQ sockets, at least one message may be sent to the socket without blocking. For standard sockets this is equivalent to the POLLOUT flag of the poll() system call and generally means that at least one byte of data may be written to fd without blocking.

ZMQ_POLLERR

For standard sockets, this flag is passed through zmq_poll() to the underlying poll() system call and generally means that some sort of error condition is present on the socket specified by fd. For ØMQ sockets this flag has no effect if set in events, and shall never be returned in revents by zmq_poll().

Note
The zmq_poll() function may be implemented or emulated using operating system interfaces other than poll(), and as such may be subject to the limits of those interfaces in ways not defined in this documentation.

RETURN VALUE

Upon successful completion, the zmq_poll() function shall return the number of zmq_pollitem_t structures with events signaled in revents or 0 if no events have been signaled. Upon failure, zmq_poll() shall return -1 and set errno to one of the values defined below.

ERRORS

ETERM

At least one of the members of the items array refers to a socket whose associated ØMQ context was terminated.

EFAULT

The provided items was not valid (NULL).

EINTR

The operation was interrupted by delivery of a signal before any events were available.

EXAMPLE

Polling indefinitely for input events on both a ØMQ socket and a standard socket.
zmq_pollitem_t items [2];
/* First item refers to 0MQ socket 'socket' */
items[0].socket = socket;
items[0].events = ZMQ_POLLIN;
/* Second item refers to standard socket 'fd' */
items[1].socket = NULL;
items[1].fd = fd;
items[1].events = ZMQ_POLLIN;
/* Poll for events indefinitely */
int rc = zmq_poll (items, 2, -1);
assert (rc >= 0);
/* Returned events will be stored in items[].revents */

SEE ALSO

Your operating system documentation for the poll() system call.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_errno.30000664000000000000000000000455211737025357015354 0ustar rootroot'\" t .\" Title: zmq_errno .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_ERRNO" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_errno \- retrieve value of errno for the calling thread .SH "SYNOPSIS" .sp \fBint zmq_errno (void);\fR .SH "DESCRIPTION" .sp The \fIzmq_errno()\fR function shall retrieve the value of the \fIerrno\fR variable for the calling thread\&. .sp The \fIzmq_errno()\fR function is provided to assist users on non\-POSIX systems who are experiencing issues with retrieving the correct value of \fIerrno\fR directly\&. Specifically, users on Win32 systems whose application is using a different C run\-time library from the C run\-time library in use by 0MQ will need to use \fIzmq_errno()\fR for correct operation\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br .sp Users not experiencing issues with retrieving the correct value of \fIerrno\fR should not use this function and should instead access the \fIerrno\fR variable directly\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_errno()\fR function shall return the value of the \fIerrno\fR variable for the calling thread\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_inproc.txt0000664000000000000000000000457011737025246016173 0ustar rootrootzmq_inproc(7) ============= NAME ---- zmq_inproc - 0MQ local in-process (inter-thread) communication transport SYNOPSIS -------- The in-process transport passes messages via memory directly between threads sharing a single 0MQ 'context'. NOTE: No I/O threads are involved in passing messages using the 'inproc' transport. Therefore, if you are using a 0MQ 'context' for in-process messaging only you can initialise the 'context' with zero I/O threads. See linkzmq:zmq_init[3] for details. ADDRESSING ---------- A 0MQ address string consists of two parts as follows: 'transport'`://`'endpoint'. The 'transport' part specifies the underlying transport protocol to use, and for the in-process transport shall be set to `inproc`. The meaning of the 'endpoint' part for the in-process transport is defined below. Assigning a local address to a socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When assigning a local address to a 'socket' using _zmq_bind()_ with the 'inproc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'name' to create. The 'name' must be unique within the 0MQ 'context' associated with the 'socket' and may be up to 256 characters in length. No other restrictions are placed on the format of the 'name'. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a 'socket' to a peer address using _zmq_connect()_ with the 'inproc' transport, the 'endpoint' shall be interpreted as an arbitrary string identifying the 'name' to connect to. The 'name' must have been previously created by assigning it to at least one 'socket' within the same 0MQ 'context' as the 'socket' being connected. WIRE FORMAT ----------- Not applicable. EXAMPLES -------- .Assigning a local address to a socket ---- /* Assign the in-process name "#1" */ rc = zmq_bind(socket, "inproc://#1"); assert (rc == 0); /* Assign the in-process name "my-endpoint" */ rc = zmq_bind(socket, "inproc://my-endpoint"); assert (rc == 0); ---- .Connecting a socket ---- /* Connect to the in-process name "#1" */ rc = zmq_connect(socket, "inproc://#1"); assert (rc == 0); /* Connect to the in-process name "my-endpoint" */ rc = zmq_connect(socket, "inproc://my-endpoint"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_ipc[7] linkzmq:zmq_tcp[7] linkzmq:zmq_pgm[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_init.html0000664000000000000000000003705011741075725016640 0ustar rootroot zmq_msg_init(3)

SYNOPSIS

int zmq_msg_init (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_init() function shall initialise the message object referenced by msg to represent an empty message. This function is most useful when called before receiving a message with zmq_recv().

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

No errors are defined.

EXAMPLE

Receiving a message from a socket
zmq_msg_t msg;
rc = zmq_msg_init (&msg);
assert (rc == 0);
rc = zmq_recv (socket, &msg, 0);
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_ipc.html0000664000000000000000000004055411741075735015606 0ustar rootroot zmq_ipc(7)

SYNOPSIS

The inter-process transport passes messages between local processes using a system-dependent IPC mechanism.

Note
The inter-process transport is currently only implemented on operating systems that provide UNIX domain sockets.

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use, and for the inter-process transport shall be set to ipc. The meaning of the endpoint part for the inter-process transport is defined below.

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to create. The pathname must be unique within the operating system namespace used by the ipc implementation, and must fulfill any restrictions placed by the operating system on the format and length of a pathname.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the ipc transport, the endpoint shall be interpreted as an arbitrary string identifying the pathname to connect to. The pathname must have been previously created within the operating system namespace by assigning it to a socket with zmq_bind().

WIRE FORMAT

Not applicable.

EXAMPLES

Assigning a local address to a socket
/* Assign the pathname "/tmp/feeds/0" */
rc = zmq_bind(socket, "ipc:///tmp/feeds/0");
assert (rc == 0);
Connecting a socket
/* Connect to the pathname "/tmp/feeds/0" */
rc = zmq_connect(socket, "ipc:///tmp/feeds/0");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_data.txt0000664000000000000000000000144211737025246016453 0ustar rootrootzmq_msg_data(3) =============== NAME ---- zmq_msg_data - retrieve pointer to message content SYNOPSIS -------- *void *zmq_msg_data (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_data()_ function shall return a pointer to the message content of the message object referenced by 'msg'. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ Upon successful completion, _zmq_msg_data()_ shall return a pointer to the message content. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq_msg_size[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_size.html0000664000000000000000000003534311741075726016653 0ustar rootroot zmq_msg_size(3)

SYNOPSIS

size_t zmq_msg_size (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_size() function shall return the size in bytes of the content of the message object referenced by msg.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

Upon successful completion, zmq_msg_size() shall return the size of the message content in bytes.

ERRORS

No errors are defined.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_tcp.txt0000664000000000000000000001231011737025246015456 0ustar rootrootzmq_tcp(7) ========== NAME ---- zmq_tcp - 0MQ unicast transport using TCP SYNOPSIS -------- TCP is an ubiquitous, reliable, unicast transport. When connecting distributed applications over a network with 0MQ, using the TCP transport will likely be your first choice. ADDRESSING ---------- A 0MQ address string consists of two parts as follows: 'transport'`://`'endpoint'. The 'transport' part specifies the underlying transport protocol to use, and for the TCP transport shall be set to `tcp`. The meaning of the 'endpoint' part for the TCP transport is defined below. Assigning a local address to a socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When assigning a local address to a socket using _zmq_bind()_ with the 'tcp' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a colon and the TCP port number to use. An 'interface' may be specified by either of the following: * The wild-card `*`, meaning all available interfaces. * The primary IPv4 address assigned to the interface, in its numeric representation. * The interface name as defined by the operating system. NOTE: Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an 'interface'. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'tcp' transport, the 'endpoint' shall be interpreted as a 'peer address' followed by a colon and the TCP port number to use. A 'peer address' may be specified by either of the following: * The DNS name of the peer. * The IPv4 address of the peer, in its numeric representation. WIRE FORMAT ----------- 0MQ messages are transmitted over TCP in frames consisting of an encoded 'payload length', followed by a 'flags' field and the message body. The 'payload length' is defined as the combined length in octets of the message body and the 'flags' field. For frames with a 'payload length' not exceeding 254 octets, the 'payload length' shall be encoded as a single octet. The minimum valid 'payload length' of a frame is 1 octet, thus a 'payload length' of 0 octets is invalid and such frames SHOULD be ignored. For frames with a 'payload length' exceeding 254 octets, the 'payload length' shall be encoded as a single octet with the value `255` followed by the 'payload length' represented as a 64-bit unsigned integer in network byte order. The 'flags' field consists of a single octet containing various control flags: Bit 0 (MORE): _More message parts to follow_. A value of 0 indicates that there are no more message parts to follow; or that the message being sent is not a multi-part message. A value of 1 indicates that the message being sent is a multi-part message and more message parts are to follow. Bits 1-7: _Reserved_. Bits 1-7 are reserved for future expansion and MUST be set to zero. The following ABNF grammar represents a single 'frame': .... frame = (length flags data) length = OCTET / (escape 8OCTET) flags = OCTET escape = %xFF data = *OCTET .... The following diagram illustrates the layout of a frame with a 'payload length' not exceeding 254 octets: .... 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload length| Flags | Message body ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message body ... +-+-+-+-+-+-+- ... .... The following diagram illustrates the layout of a frame with a 'payload length' exceeding 254 octets: .... 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 0xff | Payload length ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload length ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Payload length| Flags | Message body ... | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Message body ... +-+-+-+-+-+-+-+ ... .... EXAMPLES -------- .Assigning a local address to a socket ---- /* TCP port 5555 on all available interfaces */ rc = zmq_bind(socket, "tcp://*:5555"); assert (rc == 0); /* TCP port 5555 on the local loop-back interface on all platforms */ rc = zmq_bind(socket, "tcp://127.0.0.1:5555"); assert (rc == 0); /* TCP port 5555 on the first Ethernet network interface on Linux */ rc = zmq_bind(socket, "tcp://eth0:5555"); assert (rc == 0); ---- .Connecting a socket ---- /* Connecting using an IP address */ rc = zmq_connect(socket, "tcp://192.168.1.1:5555"); assert (rc == 0); /* Connecting using a DNS name */ rc = zmq_connect(socket, "tcp://server1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_pgm[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_epgm.txt0000664000000000000000000001247111737025255015630 0ustar rootrootzmq_pgm(7) ========== NAME ---- zmq_pgm - 0MQ reliable multicast transport using PGM SYNOPSIS -------- PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks. DESCRIPTION ----------- 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the 'pgm' transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the 'epgm' transport). The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and 'ZMQ_SUB' socket types. Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop-back interface. For details, refer to the 'ZMQ_RATE', 'ZMQ_RECOVERY_IVL' and 'ZMQ_MCAST_LOOP' options documented in linkzmq:zmq_setsockopt[3]. CAUTION: The 'pgm' transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the 'epgm' transport instead which does not require any special privileges. ADDRESSING ---------- A 0MQ address string consists of two parts as follows: 'transport'`://`'endpoint'. The 'transport' part specifies the underlying transport protocol to use. For the standard PGM protocol, 'transport' shall be set to `pgm`. For the "Encapsulated PGM" protocol 'transport' shall be set to `epgm`. The meaning of the 'endpoint' part for both the 'pgm' and 'epgm' transport is defined below. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'pgm' or 'epgm' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a semicolon, followed by a 'multicast address', followed by a colon and a port number. An 'interface' may be specified by either of the following: * The interface name as defined by the operating system. * The primary IPv4 address assigned to the interface, in its numeric representation. NOTE: Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an 'interface'. A 'multicast address' is specified by an IPv4 multicast address in its numeric representation. WIRE FORMAT ----------- Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams. This stream of data consists of 0MQ messages encapsulated in 'frames' as described in linkzmq:zmq_tcp[7]. PGM datagram payload ~~~~~~~~~~~~~~~~~~~~ The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .... datagram = (offset data) offset = 2OCTET data = *OCTET .... In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet. The following diagram illustrates the layout of a single PGM datagram payload: .... +------------------+----------------------+ | offset (16 bits) | data | +------------------+----------------------+ .... The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .... First datagram payload +--------------+-------------+---------------------+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +--------------+-------------+---------------------+ Second datagram payload +--------------+---------------------+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +--------------+---------------------+ Third datagram payload +--------------+----------------------------+-------------+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +--------------+----------------------------+-------------+ .... EXAMPLE ------- .Connecting a socket ---- /* Connecting to the multicast address 239.192.1.1, port 5555, */ /* using the first Ethernet network interface on Linux */ /* and the Encapsulated PGM protocol */ rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555"); assert (rc == 0); /* Connecting to the multicast address 239.192.1.1, port 5555, */ /* using the network interface with the address 192.168.1.1 */ /* and the standard PGM protocol */ rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_tcp[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_pgm.txt0000664000000000000000000001247111737025255015463 0ustar rootrootzmq_pgm(7) ========== NAME ---- zmq_pgm - 0MQ reliable multicast transport using PGM SYNOPSIS -------- PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks. DESCRIPTION ----------- 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the 'pgm' transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the 'epgm' transport). The 'pgm' and 'epgm' transports can only be used with the 'ZMQ_PUB' and 'ZMQ_SUB' socket types. Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop-back interface. For details, refer to the 'ZMQ_RATE', 'ZMQ_RECOVERY_IVL' and 'ZMQ_MCAST_LOOP' options documented in linkzmq:zmq_setsockopt[3]. CAUTION: The 'pgm' transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the 'epgm' transport instead which does not require any special privileges. ADDRESSING ---------- A 0MQ address string consists of two parts as follows: 'transport'`://`'endpoint'. The 'transport' part specifies the underlying transport protocol to use. For the standard PGM protocol, 'transport' shall be set to `pgm`. For the "Encapsulated PGM" protocol 'transport' shall be set to `epgm`. The meaning of the 'endpoint' part for both the 'pgm' and 'epgm' transport is defined below. Connecting a socket ~~~~~~~~~~~~~~~~~~~ When connecting a socket to a peer address using _zmq_connect()_ with the 'pgm' or 'epgm' transport, the 'endpoint' shall be interpreted as an 'interface' followed by a semicolon, followed by a 'multicast address', followed by a colon and a port number. An 'interface' may be specified by either of the following: * The interface name as defined by the operating system. * The primary IPv4 address assigned to the interface, in its numeric representation. NOTE: Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an 'interface'. A 'multicast address' is specified by an IPv4 multicast address in its numeric representation. WIRE FORMAT ----------- Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams. This stream of data consists of 0MQ messages encapsulated in 'frames' as described in linkzmq:zmq_tcp[7]. PGM datagram payload ~~~~~~~~~~~~~~~~~~~~ The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .... datagram = (offset data) offset = 2OCTET data = *OCTET .... In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message 'frame' in the datagram or containing the value `0xFFFF` if the datagram contains solely an intermediate part of a larger message. Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet. The following diagram illustrates the layout of a single PGM datagram payload: .... +------------------+----------------------+ | offset (16 bits) | data | +------------------+----------------------+ .... The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .... First datagram payload +--------------+-------------+---------------------+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +--------------+-------------+---------------------+ Second datagram payload +--------------+---------------------+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +--------------+---------------------+ Third datagram payload +--------------+----------------------------+-------------+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +--------------+----------------------------+-------------+ .... EXAMPLE ------- .Connecting a socket ---- /* Connecting to the multicast address 239.192.1.1, port 5555, */ /* using the first Ethernet network interface on Linux */ /* and the Encapsulated PGM protocol */ rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555"); assert (rc == 0); /* Connecting to the multicast address 239.192.1.1, port 5555, */ /* using the network interface with the address 192.168.1.1 */ /* and the standard PGM protocol */ rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_connect[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_tcp[7] linkzmq:zmq_ipc[7] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_ipc.70000664000000000000000000000667611737025371015013 0ustar rootroot'\" t .\" Title: zmq_ipc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_IPC" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_ipc \- 0MQ local inter\-process communication transport .SH "SYNOPSIS" .sp The inter\-process transport passes messages between local processes using a system\-dependent IPC mechanism\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The inter\-process transport is currently only implemented on operating systems that provide UNIX domain sockets\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use, and for the inter\-process transport shall be set to ipc\&. The meaning of the \fIendpoint\fR part for the inter\-process transport is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a \fIsocket\fR using \fIzmq_bind()\fR with the \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to create\&. The \fIpathname\fR must be unique within the operating system namespace used by the \fIipc\fR implementation, and must fulfill any restrictions placed by the operating system on the format and length of a \fIpathname\fR\&. .SS "Connecting a socket" .sp When connecting a \fIsocket\fR to a peer address using \fIzmq_connect()\fR with the \fIipc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIpathname\fR to connect to\&. The \fIpathname\fR must have been previously created within the operating system namespace by assigning it to a \fIsocket\fR with \fIzmq_bind()\fR\&. .SH "WIRE FORMAT" .sp Not applicable\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Assign the pathname "/tmp/feeds/0" */ rc = zmq_bind(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connect to the pathname "/tmp/feeds/0" */ rc = zmq_connect(socket, "ipc:///tmp/feeds/0"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_inproc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_setsockopt.html0000664000000000000000000012176511741075730017230 0ustar rootroot zmq_setsockopt(3)

SYNOPSIS

int zmq_setsockopt (void *socket, int option_name, const void *option_value, size_t option_len);

Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects.

DESCRIPTION

The zmq_setsockopt() function shall set the option specified by the option_name argument to the value pointed to by the option_value argument for the ØMQ socket pointed to by the socket argument. The option_len argument is the size of the option value in bytes.

The following socket options can be set with the zmq_setsockopt() function:

ZMQ_HWM: Set high water mark

The ZMQ_HWM option shall set the high water mark for the specified socket. The high water mark is a hard limit on the maximum number of outstanding messages ØMQ shall queue in memory for any single peer that the specified socket is communicating with.

If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, ØMQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in zmq_socket(3) for details on the exact action taken for each socket type.

The default ZMQ_HWM value of zero means "no limit".

Option value type

uint64_t

Option value unit

messages

Default value

0

Applicable socket types

all

ZMQ_SWAP: Set disk offload size

The ZMQ_SWAP option shall set the disk offload (swap) size for the specified socket. A socket which has ZMQ_SWAP set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory.

The value of ZMQ_SWAP defines the maximum size of the swap space in bytes.

Option value type

int64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_AFFINITY: Set I/O thread affinity

The ZMQ_AFFINITY option shall set the I/O thread affinity for newly created connections on the specified socket.

Affinity determines which threads from the ØMQ I/O thread pool associated with the socket’s context shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all ØMQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on socket shall be handled exclusively by I/O threads 1 and 2.

See also zmq_init(3) for details on allocating the number of I/O threads for a specific context.

Option value type

uint64_t

Option value unit

N/A (bitmap)

Default value

0

Applicable socket types

N/A

ZMQ_IDENTITY: Set socket identity

The ZMQ_IDENTITY option shall set the identity of the specified socket. Socket identity determines if existing ØMQ infrastructure (message queues, forwarding devices) shall be identified with a specific application and persist across multiple runs of the application.

If the socket has no identity, each run of an application is completely separate from other runs. However, with identity set the socket shall re-use any existing ØMQ infrastructure configured by the previous run(s). Thus the application may receive messages that were sent in the meantime, message queue limits shall be shared with previous run(s) and so on.

Identity should be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by ØMQ infrastructure.

Option value type

binary data

Option value unit

N/A

Default value

NULL

Applicable socket types

all

ZMQ_SUBSCRIBE: Establish message filter

The ZMQ_SUBSCRIBE option shall establish a new message filter on a ZMQ_SUB socket. Newly created ZMQ_SUB sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter.

An empty option_value of length zero shall subscribe to all incoming messages. A non-empty option_value shall subscribe to all messages beginning with the specified prefix. Multiple filters may be attached to a single ZMQ_SUB socket, in which case a message shall be accepted if it matches at least one filter.

Option value type

binary data

Option value unit

N/A

Default value

N/A

Applicable socket types

ZMQ_SUB

ZMQ_UNSUBSCRIBE: Remove message filter

The ZMQ_UNSUBSCRIBE option shall remove an existing message filter on a ZMQ_SUB socket. The filter specified must match an existing filter previously established with the ZMQ_SUBSCRIBE option. If the socket has several instances of the same filter attached the ZMQ_UNSUBSCRIBE option shall remove only one instance, leaving the rest in place and functional.

Option value type

binary data

Option value unit

N/A

Default value

N/A

Applicable socket types

ZMQ_SUB

ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN

Sets the timeout for receive operation on the socket. If the value is 0, zmq_recv(3) will return immediately, with a EAGAIN error if there is no message to receive. If the value is -1, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN

Sets the timeout for send operation on the socket. If the value is 0, zmq_send(3) will return immediately, with a EAGAIN error if the message cannot be sent. If the value is -1, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error.

Option value type

int

Option value unit

milliseconds

Default value

-1 (infinite)

Applicable socket types

all

ZMQ_RATE: Set multicast data rate

The ZMQ_RATE option shall set the maximum send or receive data rate for multicast transports such as zmq_pgm(7) using the specified socket.

Option value type

int64_t

Option value unit

kilobits per second

Default value

100

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL: Set multicast recovery interval

The ZMQ_RECOVERY_IVL option shall set the recovery interval for multicast transports using the specified socket. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

Caution
Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
Option value type

int64_t

Option value unit

seconds

Default value

10

Applicable socket types

all, when using multicast transports

ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds

The ZMQ_RECOVERY_IVL_MSEC option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified socket. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur.

A non-zero value of the ZMQ_RECOVERY_IVL_MSEC option will take precedence over the ZMQ_RECOVERY_IVL option, but since the default for the ZMQ_RECOVERY_IVL_MSEC is -1, the default is to use the ZMQ_RECOVERY_IVL option value.

Caution
Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer.
Option value type

int64_t

Option value unit

milliseconds

Default value

-1

Applicable socket types

all, when using multicast transports

ZMQ_MCAST_LOOP: Control multicast loop-back

The ZMQ_MCAST_LOOP option shall control whether data sent via multicast transports using the specified socket can also be received by the sending host via loop-back. A value of zero disables the loop-back functionality, while the default value of 1 enables the loop-back functionality. Leaving multicast loop-back enabled when it is not required can have a negative impact on performance. Where possible, disable ZMQ_MCAST_LOOP in production environments.

Option value type

int64_t

Option value unit

boolean

Default value

1

Applicable socket types

all, when using multicast transports

ZMQ_SNDBUF: Set kernel transmit buffer size

The ZMQ_SNDBUF option shall set the underlying kernel transmit buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system documentation for the SO_SNDBUF socket option.

Option value type

uint64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_RCVBUF: Set kernel receive buffer size

The ZMQ_RCVBUF option shall set the underlying kernel receive buffer size for the socket to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation for the SO_RCVBUF socket option.

Option value type

uint64_t

Option value unit

bytes

Default value

0

Applicable socket types

all

ZMQ_LINGER: Set linger period for socket shutdown

The ZMQ_LINGER option shall set the linger period for the specified socket. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with zmq_close(3), and further affects the termination of the socket’s context with zmq_term(3). The following outlines the different behaviours:

  • The default value of -1 specifies an infinite linger period. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until all pending messages have been sent to a peer.

  • The value of 0 specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with zmq_close().

  • Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to zmq_close(); attempting to terminate the socket’s context with zmq_term() shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded.

    Option value type

    int

    Option value unit

    milliseconds

    Default value

    -1 (infinite)

    Applicable socket types

    all

ZMQ_RECONNECT_IVL: Set reconnection interval

The ZMQ_RECONNECT_IVL option shall set the initial reconnection interval for the specified socket. The reconnection interval is the period ØMQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports.

Note
The reconnection interval may be randomized by ØMQ to prevent reconnection storms in topologies with a large number of peers per socket.
Option value type

int

Option value unit

milliseconds

Default value

100

Applicable socket types

all, only for connection-oriented transports

ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval

The ZMQ_RECONNECT_IVL_MAX option shall set the maximum reconnection interval for the specified socket. This is the maximum period ØMQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL.

Note
Values less than ZMQ_RECONNECT_IVL will be ignored.
Option value type

int

Option value unit

milliseconds

Default value

0 (only use ZMQ_RECONNECT_IVL)

Applicable socket types

all, only for connection-oriented transports

ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections

The ZMQ_BACKLOG option shall set the maximum length of the queue of outstanding peer connections for the specified socket; this only applies to connection-oriented transports. For details refer to your operating system documentation for the listen function.

Option value type

int

Option value unit

connections

Default value

100

Applicable socket types

all, only for connection-oriented transports.

RETURN VALUE

The zmq_setsockopt() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The requested option option_name is unknown, or the requested option_len or option_value is invalid.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal.

EXAMPLE

Subscribing to messages on a ZMQ_SUB socket
/* Subscribe to all messages */
rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0);
assert (rc == 0);
/* Subscribe to messages prefixed with "ANIMALS.CATS" */
rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12);
Setting I/O thread affinity
int64_t affinity;
/* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */
affinity = 1;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity);
assert (rc);
rc = zmq_bind (socket, "tcp://lo:5555");
assert (rc);
/* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */
affinity = 2;
rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity);
assert (rc);
rc = zmq_bind (socket, "tcp://lo:5556");
assert (rc);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_data.html0000664000000000000000000003532711741075725016613 0ustar rootroot zmq_msg_data(3)

SYNOPSIS

void *zmq_msg_data (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_data() function shall return a pointer to the message content of the message object referenced by msg.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

Upon successful completion, zmq_msg_data() shall return a pointer to the message content.

ERRORS

No errors are defined.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_copy.txt0000664000000000000000000000253111737025246016514 0ustar rootrootzmq_msg_copy(3) =============== NAME ---- zmq_msg_copy - copy content of a message to another message SYNOPSIS -------- *int zmq_msg_copy (zmq_msg_t '*dest', zmq_msg_t '*src');* DESCRIPTION ----------- The _zmq_msg_copy()_ function shall copy the message object referenced by 'src' to the message object referenced by 'dest'. The original content of 'dest', if any, shall be released. CAUTION: The implementation may choose not to physically copy the message content, rather to share the underlying buffer between 'src' and 'dest'. Avoid modifying message content after a message has been copied with _zmq_msg_copy()_, doing so can result in undefined behaviour. If what you need is an actual hard copy, allocate a new message using _zmq_msg_init_size()_ and copy the message content using _memcpy()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_copy()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_move[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_send.txt0000664000000000000000000000717711737025246015640 0ustar rootrootzmq_send(3) =========== NAME ---- zmq_send - send a message on a socket SYNOPSIS -------- *int zmq_send (void '*socket', zmq_msg_t '*msg', int 'flags');* DESCRIPTION ----------- The _zmq_send()_ function shall queue the message referenced by the 'msg' argument to be sent to the socket referenced by the 'socket' argument. The 'flags' argument is a combination of the flags defined below: *ZMQ_NOBLOCK*:: Specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the 'socket', the _zmq_send()_ function shall fail with 'errno' set to EAGAIN. *ZMQ_SNDMORE*:: Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description. The _zmq_msg_t_ structure passed to _zmq_send()_ is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using _zmq_msg_copy()_). NOTE: A successful invocation of _zmq_send()_ does not indicate that the message has been transmitted to the network, only that it has been queued on the 'socket' and 0MQ has assumed responsibility for the message. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts; each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited. An application wishing to send a multi-part message does so by specifying the 'ZMQ_SNDMORE' flag to _zmq_send()_. The presence of this flag indicates to 0MQ that the message being sent is a multi-part message and that more message parts are to follow. When the application wishes to send the final message part it does so by calling _zmq_send()_ without the 'ZMQ_SNDMORE' flag; this indicates that no more message parts are to follow. RETURN VALUE ------------ The _zmq_send()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and the message cannot be sent at the moment. *ENOTSUP*:: The _zmq_send()_ operation is not supported by this socket type. *EFSM*:: The _zmq_send()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before the message was sent. *EFAULT*:: Invalid message. EXAMPLE ------- .Filling in a message and sending it to a socket ---- /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with 'AAAAAA' */ memset (zmq_msg_data (&msg), 'A', 6); /* Send the message to the socket */ rc = zmq_send (socket, &msg, 0); assert (rc == 0); ---- .Sending a multi-part message ---- /* Send a multi-part message consisting of three parts to socket */ rc = zmq_send (socket, &part1, ZMQ_SNDMORE); rc = zmq_send (socket, &part2, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_send (socket, &part3, 0); ---- SEE ALSO -------- linkzmq:zmq_recv[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_pgm.70000664000000000000000000001703311737025365015013 0ustar rootroot'\" t .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_PGM" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_pgm \- 0MQ reliable multicast transport using PGM .SH "SYNOPSIS" .sp PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks\&. .SH "DESCRIPTION" .sp 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the \fIpgm\fR transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the \fIepgm\fR transport)\&. .sp The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&. .sp Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop\-back interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The \fIpgm\fR transport implementation requires access to raw IP sockets\&. Additional privileges may be required on some operating systems for this operation\&. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the \fIepgm\fR transport instead which does not require any special privileges\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use\&. For the standard PGM protocol, \fItransport\fR shall be set to pgm\&. For the "Encapsulated PGM" protocol \fItransport\fR shall be set to epgm\&. The meaning of the \fIendpoint\fR part for both the \fIpgm\fR and \fIepgm\fR transport is defined below\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fIpgm\fR or \fIepgm\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a semicolon, followed by a \fImulticast address\fR, followed by a colon and a port number\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The interface name as defined by the operating system\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 address assigned to the interface, in its numeric representation\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent\&. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an \fIinterface\fR\&. .sp .5v .RE .sp A \fImulticast address\fR is specified by an IPv4 multicast address in its numeric representation\&. .SH "WIRE FORMAT" .sp Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&. .SS "PGM datagram payload" .sp The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .sp .if n \{\ .RS 4 .\} .nf datagram = (offset data) offset = 2OCTET data = *OCTET .fi .if n \{\ .RE .\} .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. .sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ .RS 4 .\} .nf +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | offset (16 bits) | data | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .sp The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .sp .if n \{\ .RS 4 .\} .nf First datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Second datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Third datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .SH "EXAMPLE" .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */ /* using the first Ethernet network interface on Linux */ /* and the Encapsulated PGM protocol */ rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555"); assert (rc == 0); /* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */ /* using the network interface with the address 192\&.168\&.1\&.1 */ /* and the standard PGM protocol */ rc = zmq_connect(socket, "pgm://192\&.168\&.1\&.1;239\&.192\&.1\&.1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_close.html0000664000000000000000000003641111741075724017001 0ustar rootroot zmq_msg_close(3)

SYNOPSIS

int zmq_msg_close (zmq_msg_t *msg);

DESCRIPTION

The zmq_msg_close() function shall inform the ØMQ infrastructure that any resources associated with the message object referenced by msg are no longer required and may be released. Actual release of resources associated with the message object shall be postponed by ØMQ until all users of the message or underlying data buffer have indicated it is no longer required.

Applications should ensure that zmq_msg_close() is called once a message is no longer required, otherwise memory leaks may occur.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_close() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_socket.html0000664000000000000000000010767111741075730016322 0ustar rootroot zmq_socket(3)

SYNOPSIS

void *zmq_socket (void *context, int type);

DESCRIPTION

The zmq_socket() function shall create a ØMQ socket within the specified context and return an opaque handle to the newly created socket. The type argument specifies the socket type, which determines the semantics of communication over the socket.

The newly created socket is initially unbound, and not associated with any endpoints. In order to establish a message flow a socket must first be connected to at least one endpoint with zmq_connect(3), or at least one endpoint must be created for accepting incoming connections with zmq_bind(3).

Key differences to conventional sockets

Generally speaking, conventional sockets present a synchronous interface to either connection-oriented reliable byte streams (SOCK_STREAM), or connection-less unreliable datagrams (SOCK_DGRAM). In comparison, ØMQ sockets present an abstraction of an asynchronous message queue, with the exact queueing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, ØMQ sockets transfer discrete messages.

ØMQ sockets being asynchronous means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by ØMQ itself. Further, messages may be queued in the event that a peer is unavailable to receive them.

Conventional sockets allow only strict one-to-one (two peers), many-to-one (many clients, one server), or in some cases one-to-many (multicast) relationships. With the exception of ZMQ_PAIR, ØMQ sockets may be connected to multiple endpoints using zmq_connect(), while simultaneously accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(), thus allowing many-to-many relationships.

Thread safety

ØMQ sockets are not thread safe. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier.

Socket types

The following sections present the socket types defined by ØMQ, grouped by the general messaging pattern which is built from related socket types.

Request-reply pattern

The request-reply pattern is used for sending requests from a client to one or more instances of a service, and receiving subsequent replies to each request sent.

ZMQ_REQ

A socket of type ZMQ_REQ is used by a client to send requests to and receive replies from a service. This socket type allows only an alternating sequence of zmq_send(request) and subsequent zmq_recv(reply) calls. Each request sent is round-robined among all services, and each reply received is matched with the last issued request.

When a ZMQ_REQ socket enters an exceptional state due to having reached the high water mark for all services, or if there are no services at all, then any zmq_send(3) operations on the socket shall block until the exceptional state ends or at least one service becomes available for sending; messages are not discarded.

Summary of ZMQ_REQ characteristics
Compatible peer sockets

ZMQ_REP

Direction

Bidirectional

Send/receive pattern

Send, Receive, Send, Receive, …

Outgoing routing strategy

Round-robin

Incoming routing strategy

Last peer

ZMQ_HWM option action

Block

ZMQ_REP

A socket of type ZMQ_REP is used by a service to receive requests from and send replies to a client. This socket type allows only an alternating sequence of zmq_recv(request) and subsequent zmq_send(reply) calls. Each request received is fair-queued from among all clients, and each reply sent is routed to the client that issued the last request. If the original requester doesn’t exist any more the reply is silently discarded.

When a ZMQ_REP socket enters an exceptional state due to having reached the high water mark for a client, then any replies sent to the client in question shall be dropped until the exceptional state ends.

Summary of ZMQ_REP characteristics
Compatible peer sockets

ZMQ_REQ

Direction

Bidirectional

Send/receive pattern

Receive, Send, Receive, Send, …

Incoming routing strategy

Fair-queued

Outgoing routing strategy

Last peer

ZMQ_HWM option action

Drop

ZMQ_DEALER

A socket of type ZMQ_DEALER is an advanced pattern used for extending request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers.

Previously this socket was called ZMQ_XREQ and that name remains available for backwards compatibility.

When a ZMQ_DEALER socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any zmq_send(3) operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded.

When a ZMQ_DEALER socket is connected to a ZMQ_REP socket each message sent must consist of an empty message part, the delimiter, followed by one or more body parts.

Summary of ZMQ_DEALER characteristics
Compatible peer sockets

ZMQ_ROUTER, ZMQ_REQ, ZMQ_REP

Direction

Bidirectional

Send/receive pattern

Unrestricted

Outgoing routing strategy

Round-robin

Incoming routing strategy

Fair-queued

ZMQ_HWM option action

Block

ZMQ_ROUTER

A socket of type ZMQ_ROUTER is an advanced pattern used for extending request/reply sockets. When receiving messages a ZMQ_ROUTER socket shall prepend a message part containing the identity of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers. When sending messages a ZMQ_ROUTER socket shall remove the first part of the message and use it to determine the identity of the peer the message shall be routed to. If the peer does not exist anymore the message shall be silently discarded.

Previously this socket was called ZMQ_XREP and that name remains available for backwards compatibility.

When a ZMQ_ROUTER socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends. Likewise, any messages routed to a non-existent peer or a peer for which the individual high water mark has been reached shall also be dropped.

When a ZMQ_REQ socket is connected to a ZMQ_ROUTER socket, in addition to the identity of the originating peer each message received shall contain an empty delimiter message part. Hence, the entire structure of each received message as seen by the application becomes: one or more identity parts, delimiter part, one or more body parts. When sending replies to a ZMQ_REQ socket the application must include the delimiter part.

Summary of ZMQ_ROUTER characteristics
Compatible peer sockets

ZMQ_DEALER, ZMQ_REQ, ZMQ_REP

Direction

Bidirectional

Send/receive pattern

Unrestricted

Outgoing routing strategy

See text

Incoming routing strategy

Fair-queued

ZMQ_HWM option action

Drop

Publish-subscribe pattern

The publish-subscribe pattern is used for one-to-many distribution of data from a single publisher to multiple subscribers in a fan out fashion.

ZMQ_PUB

A socket of type ZMQ_PUB is used by a publisher to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. The zmq_recv(3) function is not implemented for this socket type.

When a ZMQ_PUB socket enters an exceptional state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the exceptional state ends. The zmq_send() function shall never block for this socket type.

Summary of ZMQ_PUB characteristics
Compatible peer sockets

ZMQ_SUB

Direction

Unidirectional

Send/receive pattern

Send only

Incoming routing strategy

N/A

Outgoing routing strategy

Fan out

ZMQ_HWM option action

Drop

ZMQ_SUB

A socket of type ZMQ_SUB is used by a subscriber to subscribe to data distributed by a publisher. Initially a ZMQ_SUB socket is not subscribed to any messages, use the ZMQ_SUBSCRIBE option of zmq_setsockopt(3) to specify which messages to subscribe to. The zmq_send() function is not implemented for this socket type.

Summary of ZMQ_SUB characteristics
Compatible peer sockets

ZMQ_PUB

Direction

Unidirectional

Send/receive pattern

Receive only

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

ZMQ_HWM option action

Drop

Pipeline pattern

The pipeline pattern is used for distributing data to nodes arranged in a pipeline. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one node. When a pipeline stage is connected to multiple nodes data is round-robined among all connected nodes.

ZMQ_PUSH

A socket of type ZMQ_PUSH is used by a pipeline node to send messages to downstream pipeline nodes. Messages are round-robined to all connected downstream nodes. The zmq_recv() function is not implemented for this socket type.

When a ZMQ_PUSH socket enters an exceptional state due to having reached the high water mark for all downstream nodes, or if there are no downstream nodes at all, then any zmq_send(3) operations on the socket shall block until the exceptional state ends or at least one downstream node becomes available for sending; messages are not discarded.

Deprecated alias: ZMQ_DOWNSTREAM.

Summary of ZMQ_PUSH characteristics
Compatible peer sockets

ZMQ_PULL

Direction

Unidirectional

Send/receive pattern

Send only

Incoming routing strategy

N/A

Outgoing routing strategy

Round-robin

ZMQ_HWM option action

Block

ZMQ_PULL

A socket of type ZMQ_PULL is used by a pipeline node to receive messages from upstream pipeline nodes. Messages are fair-queued from among all connected upstream nodes. The zmq_send() function is not implemented for this socket type.

Deprecated alias: ZMQ_UPSTREAM.

Summary of ZMQ_PULL characteristics
Compatible peer sockets

ZMQ_PUSH

Direction

Unidirectional

Send/receive pattern

Receive only

Incoming routing strategy

Fair-queued

Outgoing routing strategy

N/A

ZMQ_HWM option action

N/A

Exclusive pair pattern

The exclusive pair pattern is used to connect a peer to precisely one other peer. This pattern is used for inter-thread communication across the inproc transport.

ZMQ_PAIR

A socket of type ZMQ_PAIR can only be connected to a single peer at any one time. No message routing or filtering is performed on messages sent over a ZMQ_PAIR socket.

When a ZMQ_PAIR socket enters an exceptional state due to having reached the high water mark for the connected peer, or if no peer is connected, then any zmq_send(3) operations on the socket shall block until the peer becomes available for sending; messages are not discarded.

Note
ZMQ_PAIR sockets are designed for inter-thread communication across the zmq_inproc(7) transport and do not implement functionality such as auto-reconnection. ZMQ_PAIR sockets are considered experimental and may have other missing or broken aspects.
Summary of ZMQ_PAIR characteristics
Compatible peer sockets

ZMQ_PAIR

Direction

Bidirectional

Send/receive pattern

Unrestricted

Incoming routing strategy

N/A

Outgoing routing strategy

N/A

ZMQ_HWM option action

Block

RETURN VALUE

The zmq_socket() function shall return an opaque handle to the newly created socket if successful. Otherwise, it shall return NULL and set errno to one of the values defined below.

ERRORS

EINVAL

The requested socket type is invalid.

EFAULT

The provided context is invalid.

EMFILE

The limit on the total number of open ØMQ sockets has been reached.

ETERM

The context specified was terminated.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_send.30000664000000000000000000001252711737025341015152 0ustar rootroot'\" t .\" Title: zmq_send .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_SEND" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_send \- send a message on a socket .SH "SYNOPSIS" .sp \fBint zmq_send (void \fR\fB\fI*socket\fR\fR\fB, zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, int \fR\fB\fIflags\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_send()\fR function shall queue the message referenced by the \fImsg\fR argument to be sent to the socket referenced by the \fIsocket\fR argument\&. The \fIflags\fR argument is a combination of the flags defined below: .PP \fBZMQ_NOBLOCK\fR .RS 4 Specifies that the operation should be performed in non\-blocking mode\&. If the message cannot be queued on the \fIsocket\fR, the \fIzmq_send()\fR function shall fail with \fIerrno\fR set to EAGAIN\&. .RE .PP \fBZMQ_SNDMORE\fR .RS 4 Specifies that the message being sent is a multi\-part message, and that further message parts are to follow\&. Refer to the section regarding multi\-part messages below for a detailed description\&. .RE .sp The \fIzmq_msg_t\fR structure passed to \fIzmq_send()\fR is nullified during the call\&. If you want to send the same message to multiple sockets you have to copy it using (e\&.g\&. using \fIzmq_msg_copy()\fR)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp A successful invocation of \fIzmq_send()\fR does not indicate that the message has been transmitted to the network, only that it has been queued on the \fIsocket\fR and 0MQ has assumed responsibility for the message\&. .sp .5v .RE .SS "Multi\-part messages" .sp A 0MQ message is composed of 1 or more message parts; each message part is an independent \fIzmq_msg_t\fR in its own right\&. 0MQ ensures atomic delivery of messages; peers shall receive either all \fImessage parts\fR of a message or none at all\&. .sp The total number of message parts is unlimited\&. .sp An application wishing to send a multi\-part message does so by specifying the \fIZMQ_SNDMORE\fR flag to \fIzmq_send()\fR\&. The presence of this flag indicates to 0MQ that the message being sent is a multi\-part message and that more message parts are to follow\&. When the application wishes to send the final message part it does so by calling \fIzmq_send()\fR without the \fIZMQ_SNDMORE\fR flag; this indicates that no more message parts are to follow\&. .SH "RETURN VALUE" .sp The \fIzmq_send()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEAGAIN\fR .RS 4 Non\-blocking mode was requested and the message cannot be sent at the moment\&. .RE .PP \fBENOTSUP\fR .RS 4 The \fIzmq_send()\fR operation is not supported by this socket type\&. .RE .PP \fBEFSM\fR .RS 4 The \fIzmq_send()\fR operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state\&. This error may occur with socket types that switch between several states, such as ZMQ_REP\&. See the \fImessaging patterns\fR section of \fBzmq_socket\fR(3) for more information\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal before the message was sent\&. .RE .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "EXAMPLE" .PP \fBFilling in a message and sending it to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a new message, allocating 6 bytes for message content */ zmq_msg_t msg; int rc = zmq_msg_init_size (&msg, 6); assert (rc == 0); /* Fill in message content with \*(AqAAAAAA\*(Aq */ memset (zmq_msg_data (&msg), \*(AqA\*(Aq, 6); /* Send the message to the socket */ rc = zmq_send (socket, &msg, 0); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBSending a multi-part message\fR. .sp .if n \{\ .RS 4 .\} .nf /* Send a multi\-part message consisting of three parts to socket */ rc = zmq_send (socket, &part1, ZMQ_SNDMORE); rc = zmq_send (socket, &part2, ZMQ_SNDMORE); /* Final part; no more parts to follow */ rc = zmq_send (socket, &part3, 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_recv\fR(3) \fBzmq_socket\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_recv.txt0000664000000000000000000000702611737025246015637 0ustar rootrootzmq_recv(3) =========== NAME ---- zmq_recv - receive a message from a socket SYNOPSIS -------- *int zmq_recv (void '*socket', zmq_msg_t '*msg', int 'flags');* DESCRIPTION ----------- The _zmq_recv()_ function shall receive a message from the socket referenced by the 'socket' argument and store it in the message referenced by the 'msg' argument. Any content previously stored in 'msg' shall be properly deallocated. If there are no messages available on the specified 'socket' the _zmq_recv()_ function shall block until the request can be satisfied. The 'flags' argument is a combination of the flags defined below: *ZMQ_NOBLOCK*:: Specifies that the operation should be performed in non-blocking mode. If there are no messages available on the specified 'socket', the _zmq_recv()_ function shall fail with 'errno' set to EAGAIN. Multi-part messages ~~~~~~~~~~~~~~~~~~~ A 0MQ message is composed of 1 or more message parts; each message part is an independent 'zmq_msg_t' in its own right. 0MQ ensures atomic delivery of messages; peers shall receive either all _message parts_ of a message or none at all. The total number of message parts is unlimited. An application wishing to determine if a message is composed of multiple parts does so by retrieving the value of the _ZMQ_RCVMORE_ socket option on the 'socket' it is receiving the message from. If there are no message parts to follow, or if the message is not composed of multiple parts, _ZMQ_RCVMORE_ shall report a value of zero. Otherwise, _ZMQ_RCVMORE_ shall report a value of 1, indicating that more message parts are to follow. RETURN VALUE ------------ The _zmq_recv()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EAGAIN*:: Non-blocking mode was requested and no messages are available at the moment. *ENOTSUP*:: The _zmq_recv()_ operation is not supported by this socket type. *EFSM*:: The _zmq_recv()_ operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the _messaging patterns_ section of linkzmq:zmq_socket[3] for more information. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal before a message was available. *EFAULT*:: The message passed to the function was invalid. EXAMPLE ------- .Receiving a message from a socket ---- /* Create an empty 0MQ message */ zmq_msg_t msg; int rc = zmq_msg_init (&msg); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recv (socket, &msg, 0); assert (rc == 0); /* Release message */ zmq_msg_close (&msg); ---- .Receiving a multi-part message ---- int64_t more; size_t more_size = sizeof more; do { /* Create an empty 0MQ message to hold the message part */ zmq_msg_t part; int rc = zmq_msg_init (&part); assert (rc == 0); /* Block until a message is available to be received from socket */ rc = zmq_recv (socket, &part, 0); assert (rc == 0); /* Determine if more message parts are to follow */ rc = zmq_getsockopt (socket, ZMQ_RCVMORE, &more, &more_size); assert (rc == 0); zmq_msg_close (&part); } while (more); ---- SEE ALSO -------- linkzmq:zmq_send[3] linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_connect.txt0000664000000000000000000000527111737025246016331 0ustar rootrootzmq_connect(3) ============== NAME ---- zmq_connect - connect a socket SYNOPSIS -------- *int zmq_connect (void '*socket', const char '*endpoint');* DESCRIPTION ----------- The _zmq_connect()_ function shall connect the socket referenced by the 'socket' argument to the endpoint specified by the 'endpoint' argument. The 'endpoint' argument is a string consisting of two parts as follows: 'transport'`://`'address'. The 'transport' part specifies the underlying transport protocol to use. The meaning of the 'address' part is specific to the underlying transport protocol selected. The following transports are defined: 'inproc':: local in-process (inter-thread) communication transport, see linkzmq:zmq_inproc[7] 'ipc':: local inter-process communication transport, see linkzmq:zmq_ipc[7] 'tcp':: unicast transport using TCP, see linkzmq:zmq_tcp[7] 'pgm', 'epgm':: reliable multicast transport using PGM, see linkzmq:zmq_pgm[7] With the exception of 'ZMQ_PAIR' sockets, a single socket may be connected to multiple endpoints using _zmq_connect()_, while simultaneously accepting incoming connections from multiple endpoints bound to the socket using _zmq_bind()_. Refer to linkzmq:zmq_socket[3] for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints. NOTE: The connection will not be performed immediately but as needed by 0MQ. Thus a successful invocation of _zmq_connect()_ does not indicate that a physical connection was or can actually be established. RETURN VALUE ------------ The _zmq_connect()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The endpoint supplied is invalid. *EPROTONOSUPPORT*:: The requested 'transport' protocol is not supported. *ENOCOMPATPROTO*:: The requested 'transport' protocol is not compatible with the socket type. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EMTHREAD*:: No I/O thread is available to accomplish the task. EXAMPLE ------- .Connecting a subscriber socket to an in-process and a TCP transport ---- /* Create a ZMQ_SUB socket */ void *socket = zmq_socket (context, ZMQ_SUB); assert (socket); /* Connect it to an in-process transport with the address 'my_publisher' */ int rc = zmq_connect (socket, "inproc://my_publisher"); assert (rc == 0); /* Connect it to the host server001, port 5555 using a TCP transport */ rc = zmq_connect (socket, "tcp://server001:5555"); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_init.30000664000000000000000000000535711737025324016036 0ustar rootroot'\" t .\" Title: zmq_msg_init .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_INIT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init \- initialise empty 0MQ message .SH "SYNOPSIS" .sp \fBint zmq_msg_init (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init()\fR function shall initialise the message object referenced by \fImsg\fR to represent an empty message\&. This function is most useful when called before receiving a message with \fIzmq_recv()\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBReceiving a message from a socket\fR. .sp .if n \{\ .RS 4 .\} .nf zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_recv (socket, &msg, 0); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_strerror.30000664000000000000000000000433711737025347016111 0ustar rootroot'\" t .\" Title: zmq_strerror .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_STRERROR" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_strerror \- get 0MQ error message string .SH "SYNOPSIS" .sp \fBconst char *zmq_strerror (int \fR\fB\fIerrnum\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_strerror()\fR function shall return a pointer to an error message string corresponding to the error number specified by the \fIerrnum\fR argument\&. As 0MQ defines additional error numbers over and above those defined by the operating system, applications should use \fIzmq_strerror()\fR in preference to the standard \fIstrerror()\fR function\&. .SH "RETURN VALUE" .sp The \fIzmq_strerror()\fR function shall return a pointer to an error message string\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBDisplaying an error message when a 0MQ context cannot be initialised\fR. .sp .if n \{\ .RS 4 .\} .nf void *ctx = zmq_init (1, 1, 0); if (!ctx) { printf ("Error occurred during zmq_init(): %s\en", zmq_strerror (errno)); abort (); } .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_size.30000664000000000000000000000414011737025333016032 0ustar rootroot'\" t .\" Title: zmq_msg_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_SIZE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_size \- retrieve message content size in bytes .SH "SYNOPSIS" .sp \fBsize_t zmq_msg_size (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_size()\fR function shall return the size in bytes of the content of the message object referenced by \fImsg\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp Upon successful completion, \fIzmq_msg_size()\fR shall return the size of the message content in bytes\&. .SH "ERRORS" .sp No errors are defined\&. .SH "SEE ALSO" .sp \fBzmq_msg_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_term.html0000664000000000000000000003745211741075731016001 0ustar rootroot zmq_term(3)

SYNOPSIS

int zmq_term (void *context);

DESCRIPTION

The zmq_term() function shall terminate the ØMQ context context.

Context termination is performed in the following steps:

  1. Any blocking operations currently in progress on sockets open within context shall return immediately with an error code of ETERM. With the exception of zmq_close(), any further operations on sockets open within context shall fail with an error code of ETERM.

  2. After interrupting all blocking calls, zmq_term() shall block until the following conditions are satisfied:

    • All sockets open within context have been closed with zmq_close().

    • For each socket within context, all messages sent by the application with zmq_send() have either been physically transferred to a network peer, or the socket’s linger period set with the ZMQ_LINGER socket option has expired.

For further details regarding socket linger behaviour refer to the ZMQ_LINGER option in zmq_setsockopt(3).

RETURN VALUE

The zmq_term() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

The provided context was invalid.

EINTR

Termination was interrupted by a signal. It can be restarted if needed.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_device.txt0000664000000000000000000000772111737025246016141 0ustar rootrootzmq_device(3) ============= NAME ---- zmq_device - start built-in 0MQ device SYNOPSIS -------- *int zmq_device (int 'device', const void '*frontend', const void '*backend');* DESCRIPTION ----------- The _zmq_device()_ function starts a built-in 0MQ device. The 'device' argument is one of: 'ZMQ_QUEUE':: starts a queue device 'ZMQ_FORWARDER':: starts a forwarder device 'ZMQ_STREAMER':: starts a streamer device The device connects a frontend socket to a backend socket. Conceptually, data flows from frontend to backend. Depending on the socket types, replies may flow in the opposite direction. Before calling _zmq_device()_ you must set any socket options, and connect or bind both frontend and backend sockets. The two conventional device models are: *proxy*:: bind frontend socket to an endpoint, and connect backend socket to downstream components. A proxy device model does not require changes to the downstream topology but that topology is static (any changes require reconfiguring the device). *broker*:: bind frontend socket to one endpoint and bind backend socket to a second endpoint. Downstream components must now connect into the device. A broker device model allows a dynamic downstream topology (components can come and go at any time). _zmq_device()_ runs in the current thread and returns only if/when the current context is closed. QUEUE DEVICE ------------ 'ZMQ_QUEUE' creates a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services. Requests are fair-queued from frontend connections and load-balanced between backend connections. Replies automatically return to the client that made the original request. This device is part of the 'request-reply' pattern. The frontend speaks to clients and the backend speaks to services. You should use 'ZMQ_QUEUE' with a 'ZMQ_XREP' socket for the frontend and a 'ZMQ_XREQ' socket for the backend. Other combinations are not documented. Refer to linkzmq:zmq_socket[3] for a description of these socket types. FORWARDER DEVICE ---------------- 'ZMQ_FORWARDER' collects messages from a set of publishers and forwards these to a set of subscribers. You will generally use this to bridge networks, e.g. read on TCP unicast and forward on multicast. This device is part of the 'publish-subscribe' pattern. The frontend speaks to publishers and the backend speaks to subscribers. You should use 'ZMQ_FORWARDER' with a 'ZMQ_SUB' socket for the frontend and a 'ZMQ_PUB' socket for the backend. Other combinations are not documented. Refer to linkzmq:zmq_socket[3] for a description of these socket types. STREAMER DEVICE --------------- 'ZMQ_STREAMER' collects tasks from a set of pushers and forwards these to a set of pullers. You will generally use this to bridge networks. Messages are fair-queued from pushers and load-balanced to pullers. This device is part of the 'pipeline' pattern. The frontend speaks to pushers and the backend speaks to pullers. You should use 'ZMQ_STREAMER' with a 'ZMQ_PULL' socket for the frontend and a 'ZMQ_PUSH' socket for the backend. Other combinations are not documented. Refer to linkzmq:zmq_socket[3] for a description of these socket types. RETURN VALUE ------------ The _zmq_device()_ function always returns `-1` and 'errno' set to *ETERM* (the 0MQ 'context' associated with either of the specified sockets was terminated). EXAMPLE ------- .Creating a queue broker ---- // Create frontend and backend sockets void *frontend = zmq_socket (context, ZMQ_XREP); assert (backend); void *backend = zmq_socket (context, ZMQ_XREQ); assert (frontend); // Bind both sockets to TCP ports assert (zmq_bind (frontend, "tcp://*:5555") == 0); assert (zmq_bind (backend, "tcp://*:5556") == 0); // Start a queue device zmq_device (ZMQ_QUEUE, frontend, backend); ---- SEE ALSO -------- linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_init_data.html0000664000000000000000000004101311741075725017623 0ustar rootroot zmq_msg_init_data(3)

SYNOPSIS

typedef void (zmq_free_fn) (void *data, void *hint);

int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint);

DESCRIPTION

The zmq_msg_init_data() function shall initialise the message object referenced by msg to represent the content referenced by the buffer located at address data, size bytes long. No copy of data shall be performed and ØMQ shall take ownership of the supplied buffer.

If provided, the deallocation function ffn shall be called once the data buffer is no longer required by ØMQ, with the data and hint arguments supplied to zmq_msg_init_data().

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The deallocation function ffn needs to be thread-safe, since it will be called from an arbitrary thread.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init_data() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

No errors are defined.

EXAMPLE

Initialising a message from a supplied buffer
void my_free (void *data, void *hint)
{
    free (data);
}

    /*  ...  */

void *data = malloc (6);
assert (data);
memcpy (data, "ABCDEF", 6);
zmq_msg_t msg;
rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL);
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_inproc.html0000664000000000000000000004141511741075734016321 0ustar rootroot zmq_inproc(7)

SYNOPSIS

The in-process transport passes messages via memory directly between threads sharing a single ØMQ context.

Note
No I/O threads are involved in passing messages using the inproc transport. Therefore, if you are using a ØMQ context for in-process messaging only you can initialise the context with zero I/O threads. See zmq_init(3) for details.

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use, and for the in-process transport shall be set to inproc. The meaning of the endpoint part for the in-process transport is defined below.

Assigning a local address to a socket

When assigning a local address to a socket using zmq_bind() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to create. The name must be unique within the ØMQ context associated with the socket and may be up to 256 characters in length. No other restrictions are placed on the format of the name.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the inproc transport, the endpoint shall be interpreted as an arbitrary string identifying the name to connect to. The name must have been previously created by assigning it to at least one socket within the same ØMQ context as the socket being connected.

WIRE FORMAT

Not applicable.

EXAMPLES

Assigning a local address to a socket
/* Assign the in-process name "#1" */
rc = zmq_bind(socket, "inproc://#1");
assert (rc == 0);
/* Assign the in-process name "my-endpoint" */
rc = zmq_bind(socket, "inproc://my-endpoint");
assert (rc == 0);
Connecting a socket
/* Connect to the in-process name "#1" */
rc = zmq_connect(socket, "inproc://#1");
assert (rc == 0);
/* Connect to the in-process name "my-endpoint" */
rc = zmq_connect(socket, "inproc://my-endpoint");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_size.txt0000664000000000000000000000145611737025246016521 0ustar rootrootzmq_msg_size(3) =============== NAME ---- zmq_msg_size - retrieve message content size in bytes SYNOPSIS -------- *size_t zmq_msg_size (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_size()_ function shall return the size in bytes of the content of the message object referenced by 'msg'. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ Upon successful completion, _zmq_msg_size()_ shall return the size of the message content in bytes. ERRORS ------ No errors are defined. SEE ALSO -------- linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_term.30000664000000000000000000000616511737025351015172 0ustar rootroot'\" t .\" Title: zmq_term .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_TERM" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_term \- terminate 0MQ context .SH "SYNOPSIS" .sp \fBint zmq_term (void \fR\fB\fI*context\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_term()\fR function shall terminate the 0MQ context \fIcontext\fR\&. .sp Context termination is performed in the following steps: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Any blocking operations currently in progress on sockets open within \fIcontext\fR shall return immediately with an error code of ETERM\&. With the exception of \fIzmq_close()\fR, any further operations on sockets open within \fIcontext\fR shall fail with an error code of ETERM\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} After interrupting all blocking calls, \fIzmq_term()\fR shall \fIblock\fR until the following conditions are satisfied: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} All sockets open within \fIcontext\fR have been closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} For each socket within \fIcontext\fR, all messages sent by the application with \fIzmq_send()\fR have either been physically transferred to a network peer, or the socket\(cqs linger period set with the \fIZMQ_LINGER\fR socket option has expired\&. .RE .RE .sp For further details regarding socket linger behaviour refer to the \fIZMQ_LINGER\fR option in \fBzmq_setsockopt\fR(3)\&. .SH "RETURN VALUE" .sp The \fIzmq_term()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 The provided \fIcontext\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 Termination was interrupted by a signal\&. It can be restarted if needed\&. .RE .SH "SEE ALSO" .sp \fBzmq\fR(7) \fBzmq_init\fR(3) \fBzmq_close\fR(3) \fBzmq_setsockopt\fR(3) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_epgm.70000664000000000000000000001703311737025365015160 0ustar rootroot'\" t .\" Title: zmq_pgm .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_PGM" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_pgm \- 0MQ reliable multicast transport using PGM .SH "SYNOPSIS" .sp PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks\&. .SH "DESCRIPTION" .sp 0MQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the \fIpgm\fR transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the \fIepgm\fR transport)\&. .sp The \fIpgm\fR and \fIepgm\fR transports can only be used with the \fIZMQ_PUB\fR and \fIZMQ_SUB\fR socket types\&. .sp Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop\-back interface\&. For details, refer to the \fIZMQ_RATE\fR, \fIZMQ_RECOVERY_IVL\fR and \fIZMQ_MCAST_LOOP\fR options documented in \fBzmq_setsockopt\fR(3)\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The \fIpgm\fR transport implementation requires access to raw IP sockets\&. Additional privileges may be required on some operating systems for this operation\&. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the \fIepgm\fR transport instead which does not require any special privileges\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use\&. For the standard PGM protocol, \fItransport\fR shall be set to pgm\&. For the "Encapsulated PGM" protocol \fItransport\fR shall be set to epgm\&. The meaning of the \fIendpoint\fR part for both the \fIpgm\fR and \fIepgm\fR transport is defined below\&. .SS "Connecting a socket" .sp When connecting a socket to a peer address using \fIzmq_connect()\fR with the \fIpgm\fR or \fIepgm\fR transport, the \fIendpoint\fR shall be interpreted as an \fIinterface\fR followed by a semicolon, followed by a \fImulticast address\fR, followed by a colon and a port number\&. .sp An \fIinterface\fR may be specified by either of the following: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The interface name as defined by the operating system\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The primary IPv4 address assigned to the interface, in its numeric representation\&. .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent\&. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an \fIinterface\fR\&. .sp .5v .RE .sp A \fImulticast address\fR is specified by an IPv4 multicast address in its numeric representation\&. .SH "WIRE FORMAT" .sp Consecutive PGM datagrams are interpreted by 0MQ as a single continuous stream of data where 0MQ messages are not necessarily aligned with PGM datagram boundaries and a single 0MQ message may span several PGM datagrams\&. This stream of data consists of 0MQ messages encapsulated in \fIframes\fR as described in \fBzmq_tcp\fR(7)\&. .SS "PGM datagram payload" .sp The following ABNF grammar represents the payload of a single PGM datagram as used by 0MQ: .sp .if n \{\ .RS 4 .\} .nf datagram = (offset data) offset = 2OCTET data = *OCTET .fi .if n \{\ .RE .\} .sp In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16\-bit unsigned integer in network byte order specifying either the offset of the first message \fIframe\fR in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message\&. .sp Note that offset specifies where the first message begins rather than the first message part\&. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet\&. .sp The following diagram illustrates the layout of a single PGM datagram payload: .sp .if n \{\ .RS 4 .\} .nf +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | offset (16 bits) | data | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .sp The following diagram further illustrates how three example 0MQ frames are laid out in consecutive PGM datagram payloads: .sp .if n \{\ .RS 4 .\} .nf First datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 1 | Frame 2, part 1 | | 0x0000 | (Message 1) | (Message 2, part 1) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Second datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, part 2 | | 0xFFFF | (Message 2, part 2) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ Third datagram payload +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ | Frame offset | Frame 2, final 8 bytes | Frame 3 | | 0x0008 | (Message 2, final 8 bytes) | (Message 3) | +\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-+ .fi .if n \{\ .RE .\} .SH "EXAMPLE" .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */ /* using the first Ethernet network interface on Linux */ /* and the Encapsulated PGM protocol */ rc = zmq_connect(socket, "epgm://eth0;239\&.192\&.1\&.1:5555"); assert (rc == 0); /* Connecting to the multicast address 239\&.192\&.1\&.1, port 5555, */ /* using the network interface with the address 192\&.168\&.1\&.1 */ /* and the standard PGM protocol */ rc = zmq_connect(socket, "pgm://192\&.168\&.1\&.1;239\&.192\&.1\&.1:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq_tcp\fR(7) \fBzmq_ipc\fR(7) \fBzmq_inproc\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_send.html0000664000000000000000000004545711741075727015774 0ustar rootroot zmq_send(3)

SYNOPSIS

int zmq_send (void *socket, zmq_msg_t *msg, int flags);

DESCRIPTION

The zmq_send() function shall queue the message referenced by the msg argument to be sent to the socket referenced by the socket argument. The flags argument is a combination of the flags defined below:

ZMQ_NOBLOCK

Specifies that the operation should be performed in non-blocking mode. If the message cannot be queued on the socket, the zmq_send() function shall fail with errno set to EAGAIN.

ZMQ_SNDMORE

Specifies that the message being sent is a multi-part message, and that further message parts are to follow. Refer to the section regarding multi-part messages below for a detailed description.

The zmq_msg_t structure passed to zmq_send() is nullified during the call. If you want to send the same message to multiple sockets you have to copy it using (e.g. using zmq_msg_copy()).

Note
A successful invocation of zmq_send() does not indicate that the message has been transmitted to the network, only that it has been queued on the socket and ØMQ has assumed responsibility for the message.

Multi-part messages

A ØMQ message is composed of 1 or more message parts; each message part is an independent zmq_msg_t in its own right. ØMQ ensures atomic delivery of messages; peers shall receive either all message parts of a message or none at all.

The total number of message parts is unlimited.

An application wishing to send a multi-part message does so by specifying the ZMQ_SNDMORE flag to zmq_send(). The presence of this flag indicates to ØMQ that the message being sent is a multi-part message and that more message parts are to follow. When the application wishes to send the final message part it does so by calling zmq_send() without the ZMQ_SNDMORE flag; this indicates that no more message parts are to follow.

RETURN VALUE

The zmq_send() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EAGAIN

Non-blocking mode was requested and the message cannot be sent at the moment.

ENOTSUP

The zmq_send() operation is not supported by this socket type.

EFSM

The zmq_send() operation cannot be performed on this socket at the moment due to the socket not being in the appropriate state. This error may occur with socket types that switch between several states, such as ZMQ_REP. See the messaging patterns section of zmq_socket(3) for more information.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EINTR

The operation was interrupted by delivery of a signal before the message was sent.

EFAULT

Invalid message.

EXAMPLE

Filling in a message and sending it to a socket
/* Create a new message, allocating 6 bytes for message content */
zmq_msg_t msg;
int rc = zmq_msg_init_size (&msg, 6);
assert (rc == 0);
/* Fill in message content with 'AAAAAA' */
memset (zmq_msg_data (&msg), 'A', 6);
/* Send the message to the socket */
rc = zmq_send (socket, &msg, 0);
assert (rc == 0);
Sending a multi-part message
/* Send a multi-part message consisting of three parts to socket */
rc = zmq_send (socket, &part1, ZMQ_SNDMORE);
rc = zmq_send (socket, &part2, ZMQ_SNDMORE);
/* Final part; no more parts to follow */
rc = zmq_send (socket, &part3, 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_term.txt0000664000000000000000000000311111737025246015636 0ustar rootrootzmq_term(3) =========== NAME ---- zmq_term - terminate 0MQ context SYNOPSIS -------- *int zmq_term (void '*context');* DESCRIPTION ----------- The _zmq_term()_ function shall terminate the 0MQ context 'context'. Context termination is performed in the following steps: 1. Any blocking operations currently in progress on sockets open within 'context' shall return immediately with an error code of ETERM. With the exception of _zmq_close()_, any further operations on sockets open within 'context' shall fail with an error code of ETERM. 2. After interrupting all blocking calls, _zmq_term()_ shall _block_ until the following conditions are satisfied: + * All sockets open within 'context' have been closed with _zmq_close()_. * For each socket within 'context', all messages sent by the application with _zmq_send()_ have either been physically transferred to a network peer, or the socket's linger period set with the _ZMQ_LINGER_ socket option has expired. For further details regarding socket linger behaviour refer to the _ZMQ_LINGER_ option in linkzmq:zmq_setsockopt[3]. RETURN VALUE ------------ The _zmq_term()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: The provided 'context' was invalid. *EINTR*:: Termination was interrupted by a signal. It can be restarted if needed. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_init[3] linkzmq:zmq_close[3] linkzmq:zmq_setsockopt[3] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_setsockopt.30000664000000000000000000004530011737025423016413 0ustar rootroot'\" t .\" Title: zmq_setsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_SETSOCKOPT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_setsockopt \- set 0MQ socket options .SH "SYNOPSIS" .sp \fBint zmq_setsockopt (void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, const void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fIoption_len\fR\fR\fB);\fR .sp Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects\&. .SH "DESCRIPTION" .sp The \fIzmq_setsockopt()\fR function shall set the option specified by the \fIoption_name\fR argument to the value pointed to by the \fIoption_value\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument\&. The \fIoption_len\fR argument is the size of the option value in bytes\&. .sp The following socket options can be set with the \fIzmq_setsockopt()\fR function: .SS "ZMQ_HWM: Set high water mark" .sp The \fIZMQ_HWM\fR option shall set the high water mark for the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .sp The default \fIZMQ_HWM\fR value of zero means "no limit"\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SWAP: Set disk offload size" .sp The \fIZMQ_SWAP\fR option shall set the disk offload (swap) size for the specified \fIsocket\fR\&. A socket which has \fIZMQ_SWAP\fR set to a non\-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory\&. .sp The value of \fIZMQ_SWAP\fR defines the maximum size of the swap space in bytes\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_AFFINITY: Set I/O thread affinity" .sp The \fIZMQ_AFFINITY\fR option shall set the I/O thread affinity for newly created connections on the specified \fIsocket\fR\&. .sp Affinity determines which threads from the 0MQ I/O thread pool associated with the socket\(cqs \fIcontext\fR shall handle newly created connections\&. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool\&. For non\-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on\&. For example, a value of 3 specifies that subsequent connections on \fIsocket\fR shall be handled exclusively by I/O threads 1 and 2\&. .sp See also \fBzmq_init\fR(3) for details on allocating the number of I/O threads for a specific \fIcontext\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp N/A (bitmap) T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp N/A T} .TE .sp 1 .SS "ZMQ_IDENTITY: Set socket identity" .sp The \fIZMQ_IDENTITY\fR option shall set the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infrastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&. .sp If the socket has no identity, each run of an application is completely separate from other runs\&. However, with identity set the socket shall re\-use any existing 0MQ infrastructure configured by the previous run(s)\&. Thus the application may receive messages that were sent in the meantime, \fImessage queue\fR limits shall be shared with previous run(s) and so on\&. .sp Identity should be at least one byte and at most 255 bytes long\&. Identities starting with binary zero are reserved for use by 0MQ infrastructure\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SUBSCRIBE: Establish message filter" .sp The \fIZMQ_SUBSCRIBE\fR option shall establish a new message filter on a \fIZMQ_SUB\fR socket\&. Newly created \fIZMQ_SUB\fR sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter\&. .sp An empty \fIoption_value\fR of length zero shall subscribe to all incoming messages\&. A non\-empty \fIoption_value\fR shall subscribe to all messages beginning with the specified prefix\&. Multiple filters may be attached to a single \fIZMQ_SUB\fR socket, in which case a message shall be accepted if it matches at least one filter\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_SUB T} .TE .sp 1 .SS "ZMQ_UNSUBSCRIBE: Remove message filter" .sp The \fIZMQ_UNSUBSCRIBE\fR option shall remove an existing message filter on a \fIZMQ_SUB\fR socket\&. The filter specified must match an existing filter previously established with the \fIZMQ_SUBSCRIBE\fR option\&. If the socket has several instances of the same filter attached the \fIZMQ_UNSUBSCRIBE\fR option shall remove only one instance, leaving the rest in place and functional\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp ZMQ_SUB T} .TE .sp 1 .SS "ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN" .sp Sets the timeout for receive operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN" .sp Sets the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RATE: Set multicast data rate" .sp The \fIZMQ_RATE\fR option shall set the maximum send or receive data rate for multicast transports such as \fBzmq_pgm\fR(7) using the specified \fIsocket\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp kilobits per second T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL: Set multicast recovery interval" .sp The \fIZMQ_RECOVERY_IVL\fR option shall set the recovery interval for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp seconds T} T{ .sp Default value T}:T{ .sp 10 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds" .sp The \fIZMQ_RECOVERY_IVL_MSEC\fR option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .sp A non\-zero value of the \fIZMQ_RECOVERY_IVL_MSEC\fR option will take precedence over the \fIZMQ_RECOVERY_IVL\fR option, but since the default for the \fIZMQ_RECOVERY_IVL_MSEC\fR is \-1, the default is to use the \fIZMQ_RECOVERY_IVL\fR option value\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory\&. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in\-memory buffer\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_MCAST_LOOP: Control multicast loop\-back" .sp The \fIZMQ_MCAST_LOOP\fR option shall control whether data sent via multicast transports using the specified \fIsocket\fR can also be received by the sending host via loop\-back\&. A value of zero disables the loop\-back functionality, while the default value of 1 enables the loop\-back functionality\&. Leaving multicast loop\-back enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_SNDBUF: Set kernel transmit buffer size" .sp The \fIZMQ_SNDBUF\fR option shall set the underlying kernel transmit buffer size for the \fIsocket\fR to the specified size in bytes\&. A value of zero means leave the OS default unchanged\&. For details please refer to your operating system documentation for the \fISO_SNDBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVBUF: Set kernel receive buffer size" .sp The \fIZMQ_RCVBUF\fR option shall set the underlying kernel receive buffer size for the \fIsocket\fR to the specified size in bytes\&. A value of zero means leave the OS default unchanged\&. For details refer to your operating system documentation for the \fISO_RCVBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_LINGER: Set linger period for socket shutdown" .sp The \fIZMQ_LINGER\fR option shall set the linger period for the specified \fIsocket\fR\&. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The default value of \fI\-1\fR specifies an infinite linger period\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until all pending messages have been sent to a peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The value of \fI0\fR specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ Option value type T}:T{ int T} T{ Option value unit T}:T{ milliseconds T} T{ Default value T}:T{ \-1 (infinite) T} T{ Applicable socket types T}:T{ all T} .TE .sp 1 .RE .SS "ZMQ_RECONNECT_IVL: Set reconnection interval" .sp The \fIZMQ_RECONNECT_IVL\fR option shall set the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval" .sp The \fIZMQ_RECONNECT_IVL_MAX\fR option shall set the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Values less than ZMQ_RECONNECT_IVL will be ignored\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 0 (only use ZMQ_RECONNECT_IVL) T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections" .sp The \fIZMQ_BACKLOG\fR option shall set the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp connections T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports\&. T} .TE .sp 1 .SH "RETURN VALUE" .sp The \fIzmq_setsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown, or the requested \fIoption_len\fR or \fIoption_value\fR is invalid\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal\&. .RE .SH "EXAMPLE" .PP \fBSubscribing to messages on a ZMQ_SUB socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Subscribe to all messages */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); /* Subscribe to messages prefixed with "ANIMALS\&.CATS" */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS\&.CATS", 12); .fi .if n \{\ .RE .\} .PP \fBSetting I/O thread affinity\fR. .sp .if n \{\ .RS 4 .\} .nf int64_t affinity; /* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */ affinity = 1; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); assert (rc); rc = zmq_bind (socket, "tcp://lo:5555"); assert (rc); /* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */ affinity = 2; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); assert (rc); rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_getsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_inproc.70000664000000000000000000000747411737025367015534 0ustar rootroot'\" t .\" Title: zmq_inproc .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_INPROC" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_inproc \- 0MQ local in\-process (inter\-thread) communication transport .SH "SYNOPSIS" .sp The in\-process transport passes messages via memory directly between threads sharing a single 0MQ \fIcontext\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp No I/O threads are involved in passing messages using the \fIinproc\fR transport\&. Therefore, if you are using a 0MQ \fIcontext\fR for in\-process messaging only you can initialise the \fIcontext\fR with zero I/O threads\&. See \fBzmq_init\fR(3) for details\&. .sp .5v .RE .SH "ADDRESSING" .sp A 0MQ address string consists of two parts as follows: \fItransport\fR://\fIendpoint\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use, and for the in\-process transport shall be set to inproc\&. The meaning of the \fIendpoint\fR part for the in\-process transport is defined below\&. .SS "Assigning a local address to a socket" .sp When assigning a local address to a \fIsocket\fR using \fIzmq_bind()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to create\&. The \fIname\fR must be unique within the 0MQ \fIcontext\fR associated with the \fIsocket\fR and may be up to 256 characters in length\&. No other restrictions are placed on the format of the \fIname\fR\&. .SS "Connecting a socket" .sp When connecting a \fIsocket\fR to a peer address using \fIzmq_connect()\fR with the \fIinproc\fR transport, the \fIendpoint\fR shall be interpreted as an arbitrary string identifying the \fIname\fR to connect to\&. The \fIname\fR must have been previously created by assigning it to at least one \fIsocket\fR within the same 0MQ \fIcontext\fR as the \fIsocket\fR being connected\&. .SH "WIRE FORMAT" .sp Not applicable\&. .SH "EXAMPLES" .PP \fBAssigning a local address to a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Assign the in\-process name "#1" */ rc = zmq_bind(socket, "inproc://#1"); assert (rc == 0); /* Assign the in\-process name "my\-endpoint" */ rc = zmq_bind(socket, "inproc://my\-endpoint"); assert (rc == 0); .fi .if n \{\ .RE .\} .PP \fBConnecting a socket\fR. .sp .if n \{\ .RS 4 .\} .nf /* Connect to the in\-process name "#1" */ rc = zmq_connect(socket, "inproc://#1"); assert (rc == 0); /* Connect to the in\-process name "my\-endpoint" */ rc = zmq_connect(socket, "inproc://my\-endpoint"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) \fBzmq_ipc\fR(7) \fBzmq_tcp\fR(7) \fBzmq_pgm\fR(7) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_close.30000664000000000000000000000503711737025317016175 0ustar rootroot'\" t .\" Title: zmq_msg_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_CLOSE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_close \- release 0MQ message .SH "SYNOPSIS" .sp \fBint zmq_msg_close (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_close()\fR function shall inform the 0MQ infrastructure that any resources associated with the message object referenced by \fImsg\fR are no longer required and may be released\&. Actual release of resources associated with the message object shall be postponed by 0MQ until all users of the message or underlying data buffer have indicated it is no longer required\&. .sp Applications should ensure that \fIzmq_msg_close()\fR is called once a message is no longer required, otherwise memory leaks may occur\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_init_data.30000664000000000000000000000723111737025326017022 0ustar rootroot'\" t .\" Title: zmq_msg_init_data .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_INIT_DATA" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init_data \- initialise 0MQ message from a supplied buffer .SH "SYNOPSIS" .sp \fBtypedef void (zmq_free_fn) (void \fR\fB\fI*data\fR\fR\fB, void \fR\fB\fI*hint\fR\fR\fB);\fR .sp \fBint zmq_msg_init_data (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, void \fR\fB\fI*data\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB, zmq_free_fn \fR\fB\fI*ffn\fR\fR\fB, void \fR\fB\fI*hint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init_data()\fR function shall initialise the message object referenced by \fImsg\fR to represent the content referenced by the buffer located at address \fIdata\fR, \fIsize\fR bytes long\&. No copy of \fIdata\fR shall be performed and 0MQ shall take ownership of the supplied buffer\&. .sp If provided, the deallocation function \fIffn\fR shall be called once the data buffer is no longer required by 0MQ, with the \fIdata\fR and \fIhint\fR arguments supplied to \fIzmq_msg_init_data()\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The deallocation function \fIffn\fR needs to be thread\-safe, since it will be called from an arbitrary thread\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init_data()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBInitialising a message from a supplied buffer\fR. .sp .if n \{\ .RS 4 .\} .nf void my_free (void *data, void *hint) { free (data); } /* \&.\&.\&. */ void *data = malloc (6); assert (data); memcpy (data, "ABCDEF", 6); zmq_msg_t msg; rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_init.txt0000664000000000000000000000200111737025246015627 0ustar rootrootzmq_init(3) =========== NAME ---- zmq_init - initialise 0MQ context SYNOPSIS -------- *void *zmq_init (int 'io_threads');* DESCRIPTION ----------- The _zmq_init()_ function initialises a 0MQ 'context'. The 'io_threads' argument specifies the size of the 0MQ thread pool to handle I/O operations. If your application is using only the 'inproc' transport for messaging you may set this to zero, otherwise set it to at least one. .Thread safety A 0MQ 'context' is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller. RETURN VALUE ------------ The _zmq_init()_ function shall return an opaque handle to the initialised 'context' if successful. Otherwise it shall return NULL and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: An invalid number of 'io_threads' was requested. SEE ALSO -------- linkzmq:zmq[7] linkzmq:zmq_term[3] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_move.html0000664000000000000000000003624411741075726016650 0ustar rootroot zmq_msg_move(3)

SYNOPSIS

int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src);

DESCRIPTION

The zmq_msg_move() function shall move the content of the message object referenced by src to the message object referenced by dest. No actual copying of message content is performed, dest is simply updated to reference the new content. src becomes an empty message after calling zmq_msg_move(). The original content of dest, if any, shall be released.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_move() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_version.30000664000000000000000000000435111737025353015705 0ustar rootroot'\" t .\" Title: zmq_version .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_VERSION" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_version \- report 0MQ library version .SH "SYNOPSIS" .sp \fBvoid zmq_version (int \fR\fB\fI*major\fR\fR\fB, int \fR\fB\fI*minor\fR\fR\fB, int \fR\fB\fI*patch\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_version()\fR function shall fill in the integer variables pointed to by the \fImajor\fR, \fIminor\fR and \fIpatch\fR arguments with the major, minor and patch level components of the 0MQ library version\&. .sp This functionality is intended for applications or language bindings dynamically linking to the 0MQ library that wish to determine the actual version of the 0MQ library they are using\&. .SH "RETURN VALUE" .sp There is no return value\&. .SH "ERRORS" .sp No errors are defined\&. .SH "EXAMPLE" .PP \fBPrinting out the version of the 0MQ library\fR. .sp .if n \{\ .RS 4 .\} .nf int major, minor, patch; zmq_version (&major, &minor, &patch); printf ("Current 0MQ version is %d\&.%d\&.%d\en", major, minor, patch); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_init_size.html0000664000000000000000000003712011741075725017670 0ustar rootroot zmq_msg_init_size(3)

SYNOPSIS

int zmq_msg_init_size (zmq_msg_t *msg, size_t size);

DESCRIPTION

The zmq_msg_init_size() function shall allocate any resources required to store a message size bytes long and initialise the message object referenced by msg to represent the newly allocated message.

The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages). For performance reasons zmq_msg_init_size() shall not clear the message data.

Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.
Caution
The functions zmq_msg_init(), zmq_msg_init_data() and zmq_msg_init_size() are mutually exclusive. Never initialize the same zmq_msg_t twice.

RETURN VALUE

The zmq_msg_init_size() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

ENOMEM

Insufficient storage space is available.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_move.txt0000664000000000000000000000215711737025246016514 0ustar rootrootzmq_msg_move(3) =============== NAME ---- zmq_msg_move - move content of a message to another message SYNOPSIS -------- *int zmq_msg_move (zmq_msg_t '*dest', zmq_msg_t '*src');* DESCRIPTION ----------- The _zmq_msg_move()_ function shall move the content of the message object referenced by 'src' to the message object referenced by 'dest'. No actual copying of message content is performed, 'dest' is simply updated to reference the new content. 'src' becomes an empty message after calling _zmq_msg_move()_. The original content of 'dest', if any, shall be released. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. RETURN VALUE ------------ The _zmq_msg_move()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EFAULT*:: Invalid message. SEE ALSO -------- linkzmq:zmq_msg_copy[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_init_data.txt0000664000000000000000000000361711737025246017504 0ustar rootrootzmq_msg_init_data(3) ==================== NAME ---- zmq_msg_init_data - initialise 0MQ message from a supplied buffer SYNOPSIS -------- *typedef void (zmq_free_fn) (void '*data', void '*hint');* *int zmq_msg_init_data (zmq_msg_t '*msg', void '*data', size_t 'size', zmq_free_fn '*ffn', void '*hint');* DESCRIPTION ----------- The _zmq_msg_init_data()_ function shall initialise the message object referenced by 'msg' to represent the content referenced by the buffer located at address 'data', 'size' bytes long. No copy of 'data' shall be performed and 0MQ shall take ownership of the supplied buffer. If provided, the deallocation function 'ffn' shall be called once the data buffer is no longer required by 0MQ, with the 'data' and 'hint' arguments supplied to _zmq_msg_init_data()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The deallocation function 'ffn' needs to be thread-safe, since it will be called from an arbitrary thread. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init_data()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ No errors are defined. EXAMPLE ------- .Initialising a message from a supplied buffer ---- void my_free (void *data, void *hint) { free (data); } /* ... */ void *data = malloc (6); assert (data); memcpy (data, "ABCDEF", 6); zmq_msg_t msg; rc = zmq_msg_init_data (&msg, data, 6, my_free, NULL); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_init.html0000664000000000000000000003557211741075724016000 0ustar rootroot zmq_init(3)

SYNOPSIS

void *zmq_init (int io_threads);

DESCRIPTION

The zmq_init() function initialises a ØMQ context.

The io_threads argument specifies the size of the ØMQ thread pool to handle I/O operations. If your application is using only the inproc transport for messaging you may set this to zero, otherwise set it to at least one.

Thread safety

A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

RETURN VALUE

The zmq_init() function shall return an opaque handle to the initialised context if successful. Otherwise it shall return NULL and set errno to one of the values defined below.

ERRORS

EINVAL

An invalid number of io_threads was requested.

SEE ALSO

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/Makefile.am0000664000000000000000000000235611732125604015277 0ustar rootrootMAN1 = MAN3 = zmq_bind.3 zmq_close.3 zmq_connect.3 zmq_device.3 zmq_init.3 \ zmq_msg_close.3 zmq_msg_copy.3 zmq_msg_data.3 zmq_msg_init.3 \ zmq_msg_init_data.3 zmq_msg_init_size.3 zmq_msg_move.3 zmq_msg_size.3 \ zmq_poll.3 zmq_recv.3 zmq_send.3 zmq_setsockopt.3 zmq_socket.3 \ zmq_strerror.3 zmq_term.3 zmq_version.3 zmq_getsockopt.3 zmq_errno.3 MAN7 = zmq.7 zmq_tcp.7 zmq_pgm.7 zmq_epgm.7 zmq_inproc.7 zmq_ipc.7 \ zmq_cpp.7 MAN_DOC = $(MAN1) $(MAN3) $(MAN7) MAN_TXT = $(MAN1:%.1=%.txt) MAN_TXT += $(MAN3:%.3=%.txt) MAN_TXT += $(MAN7:%.7=%.txt) MAN_HTML = $(MAN_TXT:%.txt=%.html) if INSTALL_MAN dist_man_MANS = $(MAN_DOC) endif EXTRA_DIST = asciidoc.conf $(MAN_TXT) if BUILD_DOC EXTRA_DIST += $(MAN_HTML) endif MAINTAINERCLEANFILES = $(MAN_DOC) $(MAN_HTML) dist-hook : $(MAN_DOC) $(MAN_HTML) if BUILD_DOC SUFFIXES=.html .txt .xml .1 .3 .7 .txt.html: $(AM_V_GEN)$(ASCIIDOC) -d manpage -b xhtml11 -f asciidoc.conf \ -azmq_version=@PACKAGE_VERSION@ $< .txt.xml: $(AM_V_GEN)$(ASCIIDOC) -d manpage -b docbook -f asciidoc.conf \ -azmq_version=@PACKAGE_VERSION@ $< .xml.1: $(AM_V_GEN)$(XMLTO) man $< .xml.3: $(AM_V_GEN)$(XMLTO) man $< .xml.7: $(AM_V_GEN)$(XMLTO) man $< zmq_epgm.7: zmq_pgm.7 $(AM_V_GEN)cp zmq_pgm.7 $@ endif zeromq-2.2.0.orig/doc/zmq_close.30000664000000000000000000000504311737025310015315 0ustar rootroot'\" t .\" Title: zmq_close .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_CLOSE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_close \- close 0MQ socket .SH "SYNOPSIS" .sp \fBint zmq_close (void \fR\fB\fI*socket\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_close()\fR function shall destroy the socket referenced by the \fIsocket\fR argument\&. Any outstanding messages physically received from the network but not yet received by the application with \fIzmq_recv()\fR shall be discarded\&. The behaviour for discarding messages sent by the application with \fIzmq_send()\fR but not yet physically transferred to the network depends on the value of the \fIZMQ_LINGER\fR socket option for the specified \fIsocket\fR\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The default setting of \fIZMQ_LINGER\fR does not discard unsent messages; this behaviour may cause the application to block when calling \fIzmq_term()\fR\&. For details refer to \fBzmq_setsockopt\fR(3) and \fBzmq_term\fR(3)\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_close()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .SH "SEE ALSO" .sp \fBzmq_socket\fR(3) \fBzmq_term\fR(3) \fBzmq_setsockopt\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_socket.txt0000664000000000000000000003070111737025246016164 0ustar rootrootzmq_socket(3) ============= NAME ---- zmq_socket - create 0MQ socket SYNOPSIS -------- *void *zmq_socket (void '*context', int 'type');* DESCRIPTION ----------- The 'zmq_socket()' function shall create a 0MQ socket within the specified 'context' and return an opaque handle to the newly created socket. The 'type' argument specifies the socket type, which determines the semantics of communication over the socket. The newly created socket is initially unbound, and not associated with any endpoints. In order to establish a message flow a socket must first be connected to at least one endpoint with linkzmq:zmq_connect[3], or at least one endpoint must be created for accepting incoming connections with linkzmq:zmq_bind[3]. .Key differences to conventional sockets Generally speaking, conventional sockets present a _synchronous_ interface to either connection-oriented reliable byte streams (SOCK_STREAM), or connection-less unreliable datagrams (SOCK_DGRAM). In comparison, 0MQ sockets present an abstraction of an asynchronous _message queue_, with the exact queueing semantics depending on the socket type in use. Where conventional sockets transfer streams of bytes or discrete datagrams, 0MQ sockets transfer discrete _messages_. 0MQ sockets being _asynchronous_ means that the timings of the physical connection setup and tear down, reconnect and effective delivery are transparent to the user and organized by 0MQ itself. Further, messages may be _queued_ in the event that a peer is unavailable to receive them. Conventional sockets allow only strict one-to-one (two peers), many-to-one (many clients, one server), or in some cases one-to-many (multicast) relationships. With the exception of 'ZMQ_PAIR', 0MQ sockets may be connected *to multiple endpoints* using _zmq_connect()_, while simultaneously accepting incoming connections *from multiple endpoints* bound to the socket using _zmq_bind()_, thus allowing many-to-many relationships. .Thread safety 0MQ 'sockets' are _not_ thread safe. Applications MUST NOT use a socket from multiple threads except after migrating a socket from one thread to another with a "full fence" memory barrier. .Socket types The following sections present the socket types defined by 0MQ, grouped by the general _messaging pattern_ which is built from related socket types. Request-reply pattern ~~~~~~~~~~~~~~~~~~~~~ The request-reply pattern is used for sending requests from a _client_ to one or more instances of a _service_, and receiving subsequent replies to each request sent. ZMQ_REQ ^^^^^^^ A socket of type 'ZMQ_REQ' is used by a _client_ to send requests to and receive replies from a _service_. This socket type allows only an alternating sequence of _zmq_send(request)_ and subsequent _zmq_recv(reply)_ calls. Each request sent is round-robined among all _services_, and each reply received is matched with the last issued request. When a 'ZMQ_REQ' socket enters an exceptional state due to having reached the high water mark for all _services_, or if there are no _services_ at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one _service_ becomes available for sending; messages are not discarded. [horizontal] .Summary of ZMQ_REQ characteristics Compatible peer sockets:: 'ZMQ_REP' Direction:: Bidirectional Send/receive pattern:: Send, Receive, Send, Receive, ... Outgoing routing strategy:: Round-robin Incoming routing strategy:: Last peer ZMQ_HWM option action:: Block ZMQ_REP ^^^^^^^ A socket of type 'ZMQ_REP' is used by a _service_ to receive requests from and send replies to a _client_. This socket type allows only an alternating sequence of _zmq_recv(request)_ and subsequent _zmq_send(reply)_ calls. Each request received is fair-queued from among all _clients_, and each reply sent is routed to the _client_ that issued the last request. If the original requester doesn't exist any more the reply is silently discarded. When a 'ZMQ_REP' socket enters an exceptional state due to having reached the high water mark for a _client_, then any replies sent to the _client_ in question shall be dropped until the exceptional state ends. [horizontal] .Summary of ZMQ_REP characteristics Compatible peer sockets:: 'ZMQ_REQ' Direction:: Bidirectional Send/receive pattern:: Receive, Send, Receive, Send, ... Incoming routing strategy:: Fair-queued Outgoing routing strategy:: Last peer ZMQ_HWM option action:: Drop ZMQ_DEALER ^^^^^^^^^^ A socket of type 'ZMQ_DEALER' is an advanced pattern used for extending request/reply sockets. Each message sent is round-robined among all connected peers, and each message received is fair-queued from all connected peers. Previously this socket was called 'ZMQ_XREQ' and that name remains available for backwards compatibility. When a 'ZMQ_DEALER' socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one peer becomes available for sending; messages are not discarded. When a 'ZMQ_DEALER' socket is connected to a 'ZMQ_REP' socket each message sent must consist of an empty message part, the _delimiter_, followed by one or more _body parts_. [horizontal] .Summary of ZMQ_DEALER characteristics Compatible peer sockets:: 'ZMQ_ROUTER', 'ZMQ_REQ', 'ZMQ_REP' Direction:: Bidirectional Send/receive pattern:: Unrestricted Outgoing routing strategy:: Round-robin Incoming routing strategy:: Fair-queued ZMQ_HWM option action:: Block ZMQ_ROUTER ^^^^^^^^^^ A socket of type 'ZMQ_ROUTER' is an advanced pattern used for extending request/reply sockets. When receiving messages a 'ZMQ_ROUTER' socket shall prepend a message part containing the _identity_ of the originating peer to the message before passing it to the application. Messages received are fair-queued from among all connected peers. When sending messages a 'ZMQ_ROUTER' socket shall remove the first part of the message and use it to determine the _identity_ of the peer the message shall be routed to. If the peer does not exist anymore the message shall be silently discarded. Previously this socket was called 'ZMQ_XREP' and that name remains available for backwards compatibility. When a 'ZMQ_ROUTER' socket enters an exceptional state due to having reached the high water mark for all peers, or if there are no peers at all, then any messages sent to the socket shall be dropped until the exceptional state ends. Likewise, any messages routed to a non-existent peer or a peer for which the individual high water mark has been reached shall also be dropped. When a 'ZMQ_REQ' socket is connected to a 'ZMQ_ROUTER' socket, in addition to the _identity_ of the originating peer each message received shall contain an empty _delimiter_ message part. Hence, the entire structure of each received message as seen by the application becomes: one or more _identity_ parts, _delimiter_ part, one or more _body parts_. When sending replies to a 'ZMQ_REQ' socket the application must include the _delimiter_ part. [horizontal] .Summary of ZMQ_ROUTER characteristics Compatible peer sockets:: 'ZMQ_DEALER', 'ZMQ_REQ', 'ZMQ_REP' Direction:: Bidirectional Send/receive pattern:: Unrestricted Outgoing routing strategy:: See text Incoming routing strategy:: Fair-queued ZMQ_HWM option action:: Drop Publish-subscribe pattern ~~~~~~~~~~~~~~~~~~~~~~~~~ The publish-subscribe pattern is used for one-to-many distribution of data from a single _publisher_ to multiple _subscribers_ in a fan out fashion. ZMQ_PUB ^^^^^^^ A socket of type 'ZMQ_PUB' is used by a _publisher_ to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. The linkzmq:zmq_recv[3] function is not implemented for this socket type. When a 'ZMQ_PUB' socket enters an exceptional state due to having reached the high water mark for a _subscriber_, then any messages that would be sent to the _subscriber_ in question shall instead be dropped until the exceptional state ends. The _zmq_send()_ function shall never block for this socket type. [horizontal] .Summary of ZMQ_PUB characteristics Compatible peer sockets:: 'ZMQ_SUB' Direction:: Unidirectional Send/receive pattern:: Send only Incoming routing strategy:: N/A Outgoing routing strategy:: Fan out ZMQ_HWM option action:: Drop ZMQ_SUB ^^^^^^^ A socket of type 'ZMQ_SUB' is used by a _subscriber_ to subscribe to data distributed by a _publisher_. Initially a 'ZMQ_SUB' socket is not subscribed to any messages, use the 'ZMQ_SUBSCRIBE' option of linkzmq:zmq_setsockopt[3] to specify which messages to subscribe to. The _zmq_send()_ function is not implemented for this socket type. [horizontal] .Summary of ZMQ_SUB characteristics Compatible peer sockets:: 'ZMQ_PUB' Direction:: Unidirectional Send/receive pattern:: Receive only Incoming routing strategy:: Fair-queued Outgoing routing strategy:: N/A ZMQ_HWM option action:: Drop Pipeline pattern ~~~~~~~~~~~~~~~~ The pipeline pattern is used for distributing data to _nodes_ arranged in a pipeline. Data always flows down the pipeline, and each stage of the pipeline is connected to at least one _node_. When a pipeline stage is connected to multiple _nodes_ data is round-robined among all connected _nodes_. ZMQ_PUSH ^^^^^^^^ A socket of type 'ZMQ_PUSH' is used by a pipeline _node_ to send messages to downstream pipeline _nodes_. Messages are round-robined to all connected downstream _nodes_. The _zmq_recv()_ function is not implemented for this socket type. When a 'ZMQ_PUSH' socket enters an exceptional state due to having reached the high water mark for all downstream _nodes_, or if there are no downstream _nodes_ at all, then any linkzmq:zmq_send[3] operations on the socket shall block until the exceptional state ends or at least one downstream _node_ becomes available for sending; messages are not discarded. Deprecated alias: 'ZMQ_DOWNSTREAM'. [horizontal] .Summary of ZMQ_PUSH characteristics Compatible peer sockets:: 'ZMQ_PULL' Direction:: Unidirectional Send/receive pattern:: Send only Incoming routing strategy:: N/A Outgoing routing strategy:: Round-robin ZMQ_HWM option action:: Block ZMQ_PULL ^^^^^^^^ A socket of type 'ZMQ_PULL' is used by a pipeline _node_ to receive messages from upstream pipeline _nodes_. Messages are fair-queued from among all connected upstream _nodes_. The _zmq_send()_ function is not implemented for this socket type. Deprecated alias: 'ZMQ_UPSTREAM'. [horizontal] .Summary of ZMQ_PULL characteristics Compatible peer sockets:: 'ZMQ_PUSH' Direction:: Unidirectional Send/receive pattern:: Receive only Incoming routing strategy:: Fair-queued Outgoing routing strategy:: N/A ZMQ_HWM option action:: N/A Exclusive pair pattern ~~~~~~~~~~~~~~~~~~~~~~ The exclusive pair pattern is used to connect a peer to precisely one other peer. This pattern is used for inter-thread communication across the inproc transport. ZMQ_PAIR ^^^^^^^^ A socket of type 'ZMQ_PAIR' can only be connected to a single peer at any one time. No message routing or filtering is performed on messages sent over a 'ZMQ_PAIR' socket. When a 'ZMQ_PAIR' socket enters an exceptional state due to having reached the high water mark for the connected peer, or if no peer is connected, then any linkzmq:zmq_send[3] operations on the socket shall block until the peer becomes available for sending; messages are not discarded. NOTE: 'ZMQ_PAIR' sockets are designed for inter-thread communication across the linkzmq:zmq_inproc[7] transport and do not implement functionality such as auto-reconnection. 'ZMQ_PAIR' sockets are considered experimental and may have other missing or broken aspects. [horizontal] .Summary of ZMQ_PAIR characteristics Compatible peer sockets:: 'ZMQ_PAIR' Direction:: Bidirectional Send/receive pattern:: Unrestricted Incoming routing strategy:: N/A Outgoing routing strategy:: N/A ZMQ_HWM option action:: Block RETURN VALUE ------------ The _zmq_socket()_ function shall return an opaque handle to the newly created socket if successful. Otherwise, it shall return NULL and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested socket 'type' is invalid. *EFAULT*:: The provided 'context' is invalid. *EMFILE*:: The limit on the total number of open 0MQ sockets has been reached. *ETERM*:: The context specified was terminated. SEE ALSO -------- linkzmq:zmq_init[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] linkzmq:zmq_send[3] linkzmq:zmq_recv[3] linkzmq:zmq_inproc[7] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_copy.30000664000000000000000000000551311737025321016034 0ustar rootroot'\" t .\" Title: zmq_msg_copy .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_COPY" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_copy \- copy content of a message to another message .SH "SYNOPSIS" .sp \fBint zmq_msg_copy (zmq_msg_t \fR\fB\fI*dest\fR\fR\fB, zmq_msg_t \fR\fB\fI*src\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_copy()\fR function shall copy the message object referenced by \fIsrc\fR to the message object referenced by \fIdest\fR\&. The original content of \fIdest\fR, if any, shall be released\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The implementation may choose not to physically copy the message content, rather to share the underlying buffer between \fIsrc\fR and \fIdest\fR\&. Avoid modifying message content after a message has been copied with \fIzmq_msg_copy()\fR, doing so can result in undefined behaviour\&. If what you need is an actual hard copy, allocate a new message using \fIzmq_msg_init_size()\fR and copy the message content using \fImemcpy()\fR\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_copy()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_move\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_msg_copy.html0000664000000000000000000003705611741075724016654 0ustar rootroot zmq_msg_copy(3)

SYNOPSIS

int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src);

DESCRIPTION

The zmq_msg_copy() function shall copy the message object referenced by src to the message object referenced by dest. The original content of dest, if any, shall be released.

Caution
The implementation may choose not to physically copy the message content, rather to share the underlying buffer between src and dest. Avoid modifying message content after a message has been copied with zmq_msg_copy(), doing so can result in undefined behaviour. If what you need is an actual hard copy, allocate a new message using zmq_msg_init_size() and copy the message content using memcpy().
Caution
Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions.

RETURN VALUE

The zmq_msg_copy() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EFAULT

Invalid message.

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_msg_init_size.txt0000664000000000000000000000254411737025246017543 0ustar rootrootzmq_msg_init_size(3) ==================== NAME ---- zmq_msg_init_size - initialise 0MQ message of a specified size SYNOPSIS -------- *int zmq_msg_init_size (zmq_msg_t '*msg', size_t 'size');* DESCRIPTION ----------- The _zmq_msg_init_size()_ function shall allocate any resources required to store a message 'size' bytes long and initialise the message object referenced by 'msg' to represent the newly allocated message. The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages). For performance reasons _zmq_msg_init_size()_ shall not clear the message data. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init_size()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOMEM*:: Insufficient storage space is available. SEE ALSO -------- linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq.txt0000664000000000000000000001441711737025246014622 0ustar rootrootzmq(7) ====== NAME ---- zmq - 0MQ lightweight messaging kernel SYNOPSIS -------- *#include * *cc* ['flags'] 'files' *-lzmq* ['libraries'] DESCRIPTION ----------- The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised _messaging middleware_ products. 0MQ sockets provide an abstraction of asynchronous _message queues_, multiple _messaging patterns_, message filtering (_subscriptions_), seamless access to multiple _transport protocols_ and more. This documentation presents an overview of 0MQ concepts, describes how 0MQ abstracts standard sockets and provides a reference manual for the functions provided by the 0MQ library. Context ~~~~~~~ Before using any 0MQ library functions the caller must initialise a 0MQ 'context' using _zmq_init()_. The following functions are provided to handle initialisation and termination of a 'context': Initialise 0MQ context:: linkzmq:zmq_init[3] Terminate 0MQ context:: linkzmq:zmq_term[3] Thread safety ^^^^^^^^^^^^^ A 0MQ 'context' is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller. Individual 0MQ 'sockets' are _not_ thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another. In practice this means applications can create a socket in one thread with _zmq_socket()_ and then pass it to a _newly created_ thread as part of thread initialization, for example via a structure passed as an argument to _pthread_create()_. Multiple contexts ^^^^^^^^^^^^^^^^^ Multiple 'contexts' may coexist within a single application. Thus, an application can use 0MQ directly and at the same time make use of any number of additional libraries or components which themselves make use of 0MQ as long as the above guidelines regarding thread safety are adhered to. Messages ~~~~~~~~ A 0MQ message is a discrete unit of data passed between applications or components of the same application. 0MQ messages have no internal structure and from the point of view of 0MQ itself they are considered to be opaque binary data. The following functions are provided to work with messages: Initialise a message:: linkzmq:zmq_msg_init[3] linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] Release a message:: linkzmq:zmq_msg_close[3] Access message content:: linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] Message manipulation:: linkzmq:zmq_msg_copy[3] linkzmq:zmq_msg_move[3] Sockets ~~~~~~~ 0MQ sockets present an abstraction of a asynchronous _message queue_, with the exact queueing semantics depending on the socket type in use. See linkzmq:zmq_socket[3] for the socket types provided. The following functions are provided to work with sockets: Creating a socket:: linkzmq:zmq_socket[3] Closing a socket:: linkzmq:zmq_close[3] Manipulating socket options:: linkzmq:zmq_getsockopt[3] linkzmq:zmq_setsockopt[3] Establishing a message flow:: linkzmq:zmq_bind[3] linkzmq:zmq_connect[3] Sending and receiving messages:: linkzmq:zmq_send[3] linkzmq:zmq_recv[3] .Input/output multiplexing 0MQ provides a mechanism for applications to multiplex input/output events over a set containing both 0MQ sockets and standard sockets. This mechanism mirrors the standard _poll()_ system call, and is described in detail in linkzmq:zmq_poll[3]. Transports ~~~~~~~~~~ A 0MQ socket can use multiple different underlying transport mechanisms. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks. The following transport mechanisms are provided: Unicast transport using TCP:: linkzmq:zmq_tcp[7] Reliable multicast transport using PGM:: linkzmq:zmq_pgm[7] Local inter-process communication transport:: linkzmq:zmq_ipc[7] Local in-process (inter-thread) communication transport:: linkzmq:zmq_inproc[7] Devices ~~~~~~~ 0MQ provides 'devices', which are building blocks that act as intermediate nodes in complex messaging topologies. Devices can act as brokers that other nodes connect to, proxies that connect through to other nodes, or any mix of these two models. You can start a device in an application thread, see linkzmq:zmq_device[3]. ERROR HANDLING -------------- The 0MQ library functions handle errors using the standard conventions found on POSIX systems. Generally, this means that upon failure a 0MQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the 'errno' variable. On non-POSIX systems some users may experience issues with retrieving the correct value of the 'errno' variable. The _zmq_errno()_ function is provided to assist in these cases; for details refer to linkzmq:zmq_errno[3]. The _zmq_strerror()_ function is provided to translate 0MQ-specific error codes into error message strings; for details refer to linkzmq:zmq_strerror[3]. MISCELLANEOUS ------------- The following miscellaneous functions are provided: Report 0MQ library version:: linkzmq:zmq_version[3] LANGUAGE BINDINGS ----------------- The 0MQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers. The intent is that programmers using 0MQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding. C++ language binding ~~~~~~~~~~~~~~~~~~~~ The 0MQ distribution includes a $$C++$$ language binding, which is documented separately in linkzmq:zmq_cpp[7]. Other language bindings ~~~~~~~~~~~~~~~~~~~~~~~ Other language bindings (Python, Ruby, Java and more) are provided by members of the 0MQ community and pointers can be found on the 0MQ website. AUTHORS ------- This manual page was written by the 0MQ community. RESOURCES --------- Main web site: Report bugs to the 0MQ development mailing list: COPYING ------- Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER` included with the 0MQ distribution. zeromq-2.2.0.orig/doc/zmq_bind.html0000664000000000000000000004335311741075664015750 0ustar rootroot zmq_bind(3)

SYNOPSIS

int zmq_bind (void *socket, const char *endpoint);

DESCRIPTION

The zmq_bind() function shall create an endpoint for accepting connections and bind it to the socket referenced by the socket argument.

The endpoint argument is a string consisting of two parts as follows: transport://address. The transport part specifies the underlying transport protocol to use. The meaning of the address part is specific to the underlying transport protocol selected.

The following transports are defined:

inproc

local in-process (inter-thread) communication transport, see zmq_inproc(7)

ipc

local inter-process communication transport, see zmq_ipc(7)

tcp

unicast transport using TCP, see zmq_tcp(7)

pgm, epgm

reliable multicast transport using PGM, see zmq_pgm(7)

With the exception of ZMQ_PAIR sockets, a single socket may be connected to multiple endpoints using zmq_connect(), while simultaneously accepting incoming connections from multiple endpoints bound to the socket using zmq_bind(). Refer to zmq_socket(3) for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints.

RETURN VALUE

The zmq_bind() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below.

ERRORS

EINVAL

The endpoint supplied is invalid.

EPROTONOSUPPORT

The requested transport protocol is not supported.

ENOCOMPATPROTO

The requested transport protocol is not compatible with the socket type.

EADDRINUSE

The requested address is already in use.

EADDRNOTAVAIL

The requested address was not local.

ENODEV

The requested address specifies a nonexistent interface.

ETERM

The ØMQ context associated with the specified socket was terminated.

ENOTSOCK

The provided socket was invalid.

EMTHREAD

No I/O thread is available to accomplish the task.

EXAMPLE

Binding a publisher socket to an in-process and a TCP transport
/* Create a ZMQ_PUB socket */
void *socket = zmq_socket (context, ZMQ_PUB);
assert (socket);
/* Bind it to a in-process transport with the address 'my_publisher' */
int rc = zmq_bind (socket, "inproc://my_publisher");
assert (rc == 0);
/* Bind it to a TCP transport on port 5555 of the 'eth0' interface */
rc = zmq_bind (socket, "tcp://eth0:5555");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_errno.html0000664000000000000000000003562011741075733016154 0ustar rootroot zmq_errno(3)

SYNOPSIS

int zmq_errno (void);

DESCRIPTION

The zmq_errno() function shall retrieve the value of the errno variable for the calling thread.

The zmq_errno() function is provided to assist users on non-POSIX systems who are experiencing issues with retrieving the correct value of errno directly. Specifically, users on Win32 systems whose application is using a different C run-time library from the C run-time library in use by ØMQ will need to use zmq_errno() for correct operation.

Important
Users not experiencing issues with retrieving the correct value of errno should not use this function and should instead access the errno variable directly.

RETURN VALUE

The zmq_errno() function shall return the value of the errno variable for the calling thread.

ERRORS

No errors are defined.

SEE ALSO

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq.70000664000000000000000000001764011737025361014150 0ustar rootroot'\" t .\" Title: zmq .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ" "7" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq \- 0MQ lightweight messaging kernel .SH "SYNOPSIS" .sp \fB#include \fR .sp \fBcc\fR [\fIflags\fR] \fIfiles\fR \fB\-lzmq\fR [\fIlibraries\fR] .SH "DESCRIPTION" .sp The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised \fImessaging middleware\fR products\&. 0MQ sockets provide an abstraction of asynchronous \fImessage queues\fR, multiple \fImessaging patterns\fR, message filtering (\fIsubscriptions\fR), seamless access to multiple \fItransport protocols\fR and more\&. .sp This documentation presents an overview of 0MQ concepts, describes how 0MQ abstracts standard sockets and provides a reference manual for the functions provided by the 0MQ library\&. .SS "Context" .sp Before using any 0MQ library functions the caller must initialise a 0MQ \fIcontext\fR using \fIzmq_init()\fR\&. The following functions are provided to handle initialisation and termination of a \fIcontext\fR: .PP Initialise 0MQ context .RS 4 \fBzmq_init\fR(3) .RE .PP Terminate 0MQ context .RS 4 \fBzmq_term\fR(3) .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBThread safety\fR .RS 4 .sp A 0MQ \fIcontext\fR is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller\&. .sp Individual 0MQ \fIsockets\fR are \fInot\fR thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another\&. In practice this means applications can create a socket in one thread with \fIzmq_socket()\fR and then pass it to a \fInewly created\fR thread as part of thread initialization, for example via a structure passed as an argument to \fIpthread_create()\fR\&. .RE .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBMultiple contexts\fR .RS 4 .sp Multiple \fIcontexts\fR may coexist within a single application\&. Thus, an application can use 0MQ directly and at the same time make use of any number of additional libraries or components which themselves make use of 0MQ as long as the above guidelines regarding thread safety are adhered to\&. .RE .SS "Messages" .sp A 0MQ message is a discrete unit of data passed between applications or components of the same application\&. 0MQ messages have no internal structure and from the point of view of 0MQ itself they are considered to be opaque binary data\&. .sp The following functions are provided to work with messages: .PP Initialise a message .RS 4 \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) .RE .PP Release a message .RS 4 \fBzmq_msg_close\fR(3) .RE .PP Access message content .RS 4 \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) .RE .PP Message manipulation .RS 4 \fBzmq_msg_copy\fR(3) \fBzmq_msg_move\fR(3) .RE .SS "Sockets" .sp 0MQ sockets present an abstraction of a asynchronous \fImessage queue\fR, with the exact queueing semantics depending on the socket type in use\&. See \fBzmq_socket\fR(3) for the socket types provided\&. .sp The following functions are provided to work with sockets: .PP Creating a socket .RS 4 \fBzmq_socket\fR(3) .RE .PP Closing a socket .RS 4 \fBzmq_close\fR(3) .RE .PP Manipulating socket options .RS 4 \fBzmq_getsockopt\fR(3) \fBzmq_setsockopt\fR(3) .RE .PP Establishing a message flow .RS 4 \fBzmq_bind\fR(3) \fBzmq_connect\fR(3) .RE .PP Sending and receiving messages .RS 4 \fBzmq_send\fR(3) \fBzmq_recv\fR(3) .RE .PP \fBInput/output multiplexing\fR. 0MQ provides a mechanism for applications to multiplex input/output events over a set containing both 0MQ sockets and standard sockets\&. This mechanism mirrors the standard \fIpoll()\fR system call, and is described in detail in \fBzmq_poll\fR(3)\&. .SS "Transports" .sp A 0MQ socket can use multiple different underlying transport mechanisms\&. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks\&. .sp The following transport mechanisms are provided: .PP Unicast transport using TCP .RS 4 \fBzmq_tcp\fR(7) .RE .PP Reliable multicast transport using PGM .RS 4 \fBzmq_pgm\fR(7) .RE .PP Local inter\-process communication transport .RS 4 \fBzmq_ipc\fR(7) .RE .PP Local in\-process (inter\-thread) communication transport .RS 4 \fBzmq_inproc\fR(7) .RE .SS "Devices" .sp 0MQ provides \fIdevices\fR, which are building blocks that act as intermediate nodes in complex messaging topologies\&. Devices can act as brokers that other nodes connect to, proxies that connect through to other nodes, or any mix of these two models\&. .sp You can start a device in an application thread, see \fBzmq_device\fR(3)\&. .SH "ERROR HANDLING" .sp The 0MQ library functions handle errors using the standard conventions found on POSIX systems\&. Generally, this means that upon failure a 0MQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the \fIerrno\fR variable\&. .sp On non\-POSIX systems some users may experience issues with retrieving the correct value of the \fIerrno\fR variable\&. The \fIzmq_errno()\fR function is provided to assist in these cases; for details refer to \fBzmq_errno\fR(3)\&. .sp The \fIzmq_strerror()\fR function is provided to translate 0MQ\-specific error codes into error message strings; for details refer to \fBzmq_strerror\fR(3)\&. .SH "MISCELLANEOUS" .sp The following miscellaneous functions are provided: .PP Report 0MQ library version .RS 4 \fBzmq_version\fR(3) .RE .SH "LANGUAGE BINDINGS" .sp The 0MQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers\&. The intent is that programmers using 0MQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding\&. .SS "C++ language binding" .sp The 0MQ distribution includes a C++ language binding, which is documented separately in \fBzmq_cpp\fR(7)\&. .SS "Other language bindings" .sp Other language bindings (Python, Ruby, Java and more) are provided by members of the 0MQ community and pointers can be found on the 0MQ website\&. .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. .SH "RESOURCES" .sp Main web site: \m[blue]\fBhttp://www\&.zeromq\&.org/\fR\m[] .sp Report bugs to the 0MQ development mailing list: <\m[blue]\fBzeromq\-dev@lists\&.zeromq\&.org\fR\m[]\&\s-2\u[1]\d\s+2> .SH "COPYING" .sp Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL)\&. For details see the files COPYING and COPYING\&.LESSER included with the 0MQ distribution\&. .SH "NOTES" .IP " 1." 4 zeromq-dev@lists.zeromq.org .RS 4 \%mailto:zeromq-dev@lists.zeromq.org .RE zeromq-2.2.0.orig/doc/zmq_msg_init.txt0000664000000000000000000000236111737025246016506 0ustar rootrootzmq_msg_init(3) =============== NAME ---- zmq_msg_init - initialise empty 0MQ message SYNOPSIS -------- *int zmq_msg_init (zmq_msg_t '*msg');* DESCRIPTION ----------- The _zmq_msg_init()_ function shall initialise the message object referenced by 'msg' to represent an empty message. This function is most useful when called before receiving a message with _zmq_recv()_. CAUTION: Never access 'zmq_msg_t' members directly, instead always use the _zmq_msg_ family of functions. CAUTION: The functions _zmq_msg_init()_, _zmq_msg_init_data()_ and _zmq_msg_init_size()_ are mutually exclusive. Never initialize the same 'zmq_msg_t' twice. RETURN VALUE ------------ The _zmq_msg_init()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ No errors are defined. EXAMPLE ------- .Receiving a message from a socket ---- zmq_msg_t msg; rc = zmq_msg_init (&msg); assert (rc == 0); rc = zmq_recv (socket, &msg, 0); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_msg_init_size[3] linkzmq:zmq_msg_init_data[3] linkzmq:zmq_msg_close[3] linkzmq:zmq_msg_data[3] linkzmq:zmq_msg_size[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_move.30000664000000000000000000000473411737025331016035 0ustar rootroot'\" t .\" Title: zmq_msg_move .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_MOVE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_move \- move content of a message to another message .SH "SYNOPSIS" .sp \fBint zmq_msg_move (zmq_msg_t \fR\fB\fI*dest\fR\fR\fB, zmq_msg_t \fR\fB\fI*src\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_move()\fR function shall move the content of the message object referenced by \fIsrc\fR to the message object referenced by \fIdest\fR\&. No actual copying of message content is performed, \fIdest\fR is simply updated to reference the new content\&. \fIsrc\fR becomes an empty message after calling \fIzmq_msg_move()\fR\&. The original content of \fIdest\fR, if any, shall be released\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_move()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEFAULT\fR .RS 4 Invalid message\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_copy\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_init_size\fR(3) \fBzmq_msg_init_data\fR(3) \fBzmq_msg_close\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_cpp.html0000664000000000000000000005530011741075735015610 0ustar rootroot zmq_cpp(7)

SYNOPSIS

#include <zmq.hpp>

c++ [flags] files -lzmq [libraries]

DESCRIPTION

This manual page describes how the ØMQ C++ language binding maps to the underlying ØMQ C library functions.

All ØMQ constants defined by zmq.h are also available to the C++ language binding.

The following classes are provided in the zmq namespace:

Context

The context_t class encapsulates functionality dealing with the initialisation and termination of a ØMQ context.

Constructor

context_t::context_t(int io_threads)

Maps to the zmq_init() function, as described in zmq_init(3).

Destructor

context_t::~context_t(void)

Maps to the zmq_term() function, as described in zmq_term(3).

Methods

None.

Socket

The socket_t class encapsulates a ØMQ socket.

Constructor

socket_t::socket_t(context_t &context, int type)

Maps to the zmq_socket() function, as described in zmq_socket(3).

Destructor

socket_t::~socket_t(void)

Calls the zmq_close() function, as described in zmq_close(3).

Methods

void socket_t::getsockopt(int option_name, void *option_value, size_t
*option_len)

Maps to the zmq_getsockopt() function, as described in zmq_getsockopt(3).

void socket_t::setsockopt(int option_name, const void *option_value, size_t
option_len)

Maps to the zmq_setsockopt() function, as described in zmq_setsockopt(3).

void socket_t::bind(const char *endpoint)

Maps to the zmq_bind() function, as described in zmq_bind(3).

void socket_t::connect(const char *endpoint)

Maps to the zmq_connect() function, as described in zmq_connect(3).

bool socket_t::send(message_t &msg, int flags = 0)

Maps to the zmq_send() function, as described in zmq_send(3). Returns true if message is successfully sent, false if it is not.

bool socket_t::recv(message_t *msg, int flags = 0)

Maps to the zmq_recv() function, as described in zmq_recv(3). Returns true if message is successfully received, false if it is not.

Message

The zmq::message_t class encapsulates the zmq_msg_t structure and functions to construct, destruct and manipulate ØMQ messages.

Constructor

message_t::message_t(void)
message_t::message_t(size_t size)
message_t::message_t(void *data, size_t size, free_fn *ffn)

These map to the zmq_msg_init(), zmq_msg_init_size() and zmq_msg_init_data() functions, described in zmq_msg_init(3), zmq_msg_init_size(3) and zmq_msg_init_data(3) respectively.

Destructor

message_t::~message_t(void)

Calls the zmq_msg_close() function, as described in zmq_msg_close(3).

Methods

void *message_t::data (void)

Maps to the zmq_msg_data() function, as described in zmq_msg_data(3).

size_t message_t::size (void)

Maps to the zmq_msg_size() function, as described in zmq_msg_size(3).

void message_t::copy (message_t *src)

Maps to the zmq_msg_copy() function, as described in zmq_msg_copy(3).

void message_t::move (message_t *src)

Maps to the zmq_msg_move() function, as described in zmq_msg_move(3).

message_t::rebuild(void)
message_t::rebuild(size_t size)
message_t::rebuild(void *data, size_t size, free_fn *ffn)

Equivalent to calling the zmq_msg_close() function followed by the corresponding zmq_msg_init() function.

Input/output multiplexing

int poll (zmq_pollitem_t *items, int nitems, long timeout = -1)

The poll() function is a namespaced equivalent of the zmq_poll() function, as described in zmq_poll(3).

Note
To obtain a ØMQ socket for use in a zmq_pollitem_t structure, you should cast an instance of the socket_t class to (void *).

ERROR HANDLING

All errors reported by the underlying ØMQ C library functions are automatically converted to exceptions by the C++ language binding. The zmq::error_t class is derived from the std::exception class and uses the zmq_strerror() function to convert the error code to human-readable string.

EXAMPLE

zmq::context_t ctx (1);
zmq::socket_t s (ctx, ZMQ_PUB);
s.connect ("tcp://192.168.0.115:5555");
zmq::message_t msg (100);
memset (msg.data (), 0, 100);
s.send (msg);

SEE ALSO

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_close.txt0000664000000000000000000000230611737025246016001 0ustar rootrootzmq_close(3) ============ NAME ---- zmq_close - close 0MQ socket SYNOPSIS -------- *int zmq_close (void '*socket');* DESCRIPTION ----------- The _zmq_close()_ function shall destroy the socket referenced by the 'socket' argument. Any outstanding messages physically received from the network but not yet received by the application with _zmq_recv()_ shall be discarded. The behaviour for discarding messages sent by the application with _zmq_send()_ but not yet physically transferred to the network depends on the value of the _ZMQ_LINGER_ socket option for the specified 'socket'. NOTE: The default setting of _ZMQ_LINGER_ does not discard unsent messages; this behaviour may cause the application to block when calling _zmq_term()_. For details refer to linkzmq:zmq_setsockopt[3] and linkzmq:zmq_term[3]. RETURN VALUE ------------ The _zmq_close()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *ENOTSOCK*:: The provided 'socket' was invalid. SEE ALSO -------- linkzmq:zmq_socket[3] linkzmq:zmq_term[3] linkzmq:zmq_setsockopt[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_getsockopt.txt0000664000000000000000000003775411737025364017076 0ustar rootrootzmq_getsockopt(3) ================= NAME ---- zmq_getsockopt - get 0MQ socket options SYNOPSIS -------- *int zmq_getsockopt (void '*socket', int 'option_name', void '*option_value', size_t '*option_len');* DESCRIPTION ----------- The _zmq_getsockopt()_ function shall retrieve the value for the option specified by the 'option_name' argument for the 0MQ socket pointed to by the 'socket' argument, and store it in the buffer pointed to by the 'option_value' argument. The 'option_len' argument is the size in bytes of the buffer pointed to by 'option_value'; upon successful completion _zmq_getsockopt()_ shall modify the 'option_len' argument to indicate the actual size of the option value stored in the buffer. The following options can be retrieved with the _zmq_getsockopt()_ function: ZMQ_TYPE: Retrieve socket type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_TYPE' option shall retrieve the socket type for the specified 'socket'. The socket type is specified at socket creation time and cannot be modified afterwards. [horizontal] Option value type:: int Option value unit:: N/A Default value:: N/A Applicable socket types:: all ZMQ_RCVMORE: More message parts to follow ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVMORE' option shall return a boolean value indicating if the multi-part message currently being read from the specified 'socket' has more message parts to follow. If there are no message parts to follow or if the message currently being read is not a multi-part message a value of zero shall be returned. Otherwise, a value of 1 shall be returned. Refer to linkzmq:zmq_send[3] and linkzmq:zmq_recv[3] for a detailed description of sending/receiving multi-part messages. [horizontal] Option value type:: int64_t Option value unit:: boolean Default value:: N/A Applicable socket types:: all ZMQ_HWM: Retrieve high water mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_HWM' option shall retrieve the high water mark for the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. The default 'ZMQ_HWM' value of zero means "no limit". [horizontal] Option value type:: uint64_t Option value unit:: messages Default value:: 0 Applicable socket types:: all ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the timeout for recv operation on the socket. If the value is `0`, _zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no message to receive. If the value is `-1`, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Retrieve the timeout for send operation on the socket. If the value is `0`, _zmq_send(3)_ will return immediately, with a EAGAIN error if the message cannot be sent. If the value is `-1`, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_SWAP: Retrieve disk offload size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SWAP' option shall retrieve the disk offload (swap) size for the specified 'socket'. A socket which has 'ZMQ_SWAP' set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory. The value of 'ZMQ_SWAP' defines the maximum size of the swap space in bytes. [horizontal] Option value type:: int64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_AFFINITY: Retrieve I/O thread affinity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_AFFINITY' option shall retrieve the I/O thread affinity for newly created connections on the specified 'socket'. Affinity determines which threads from the 0MQ I/O thread pool associated with the socket's _context_ shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on 'socket' shall be handled exclusively by I/O threads 1 and 2. See also linkzmq:zmq_init[3] for details on allocating the number of I/O threads for a specific _context_. [horizontal] Option value type:: uint64_t Option value unit:: N/A (bitmap) Default value:: 0 Applicable socket types:: N/A ZMQ_IDENTITY: Retrieve socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IDENTITY' option shall retrieve the identity of the specified 'socket'. Socket identity determines if existing 0MQ infrastructure (_message queues_, _forwarding devices_) shall be identified with a specific application and persist across multiple runs of the application. If the socket has no identity, each run of an application is completely separate from other runs. However, with identity set the socket shall re-use any existing 0MQ infrastructure configured by the previous run(s). Thus the application may receive messages that were sent in the meantime, _message queue_ limits shall be shared with previous run(s) and so on. Identity can be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by 0MQ infrastructure. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: NULL Applicable socket types:: all ZMQ_RATE: Retrieve multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall retrieve the maximum send or receive data rate for multicast transports using the specified 'socket'. [horizontal] Option value type:: int64_t Option value unit:: kilobits per second Default value:: 100 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL: Get multicast recovery interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL' option shall retrieve the recovery interval for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. [horizontal] Option value type:: int64_t Option value unit:: seconds Default value:: 10 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL'_MSEC option shall retrieve the recovery interval, in milliseconds, for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. For backward compatibility, the default value of 'ZMQ_RECOVERY_IVL_MSEC' is -1 indicating that the recovery interval should be obtained from the 'ZMQ_RECOVERY_IVL' option. However, if the 'ZMQ_RECOVERY_IVL_MSEC' value is not zero, then it will take precedence, and be used. [horizontal] Option value type:: int64_t Option value unit:: milliseconds Default value:: -1 Applicable socket types:: all, when using multicast transports ZMQ_MCAST_LOOP: Control multicast loop-back ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MCAST_LOOP' option controls whether data sent via multicast transports can also be received by the sending host via loop-back. A value of zero indicates that the loop-back functionality is disabled, while the default value of 1 indicates that the loop-back functionality is enabled. Leaving multicast loop-back enabled when it is not required can have a negative impact on performance. Where possible, disable 'ZMQ_MCAST_LOOP' in production environments. [horizontal] Option value type:: int64_t Option value unit:: boolean Default value:: 1 Applicable socket types:: all, when using multicast transports ZMQ_SNDBUF: Retrieve kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall retrieve the underlying kernel transmit buffer size for the specified 'socket'. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: uint64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_RCVBUF: Retrieve kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall retrieve the underlying kernel receive buffer size for the specified 'socket'. A value of zero means that the OS default is in effect. For details refer to your operating system documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: uint64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_LINGER: Retrieve linger period for socket shutdown ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_LINGER' option shall retrieve the linger period for the specified 'socket'. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with linkzmq:zmq_close[3], and further affects the termination of the socket's context with linkzmq:zmq_term[3]. The following outlines the different behaviours: * The default value of '-1' specifies an infinite linger period. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until all pending messages have been sent to a peer. * The value of '0' specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with _zmq_close()_. * Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_RECONNECT_IVL: Retrieve reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL' option shall retrieve the initial reconnection interval for the specified 'socket'. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. NOTE: The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL_MAX' option shall retrieve the maximum reconnection interval for the specified 'socket'. This is the maximum period 0MQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL. NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 0 (only use ZMQ_RECONNECT_IVL) Applicable socket types:: all, only for connection-oriented transport ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_BACKLOG' option shall retrieve the maximum length of the queue of outstanding peer connections for the specified 'socket'; this only applies to connection-oriented transports. For details refer to your operating system documentation for the 'listen' function. [horizontal] Option value type:: int Option value unit:: connections Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_FD: Retrieve file descriptor associated with the socket ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_FD' option shall retrieve the file descriptor associated with the specified 'socket'. The returned file descriptor can be used to integrate the socket into an existing event loop; the 0MQ library shall signal any pending events on the socket in an _edge-triggered_ fashion by making the file descriptor become ready for reading. NOTE: The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the 'ZMQ_EVENTS' option. CAUTION: The returned file descriptor is intended for use with a 'poll' or similar system call only. Applications must never attempt to read or write data to it directly, neither should they try to close it. [horizontal] Option value type:: int on POSIX systems, SOCKET on Windows Option value unit:: N/A Default value:: N/A Applicable socket types:: all ZMQ_EVENTS: Retrieve socket event state ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_EVENTS' option shall retrieve the event state for the specified 'socket'. The returned value is a bit mask constructed by OR'ing a combination of the following event flags: *ZMQ_POLLIN*:: Indicates that at least one message may be received from the specified socket without blocking. *ZMQ_POLLOUT*:: Indicates that at least one message may be sent to the specified socket without blocking. The combination of a file descriptor returned by the 'ZMQ_FD' option being ready for reading but no actual events returned by a subsequent retrieval of the 'ZMQ_EVENTS' option is valid; applications should simply ignore this case and restart their polling operation/event loop. [horizontal] Option value type:: uint32_t Option value unit:: N/A (flags) Default value:: N/A Applicable socket types:: all RETURN VALUE ------------ The _zmq_getsockopt()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown, or the requested _option_len_ or _option_value_ is invalid, or the size of the buffer pointed to by _option_value_, as specified by _option_len_, is insufficient for storing the option value. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal. EXAMPLE ------- .Retrieving the high water mark ---- /* Retrieve high water mark into hwm */ int64_t hwm; size_t hwm_size = sizeof (hwm); rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, &hwm_size); assert (rc == 0); ---- SEE ALSO -------- linkzmq:zmq_setsockopt[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_setsockopt.txt0000664000000000000000000003600311737025414017070 0ustar rootrootzmq_setsockopt(3) ================= NAME ---- zmq_setsockopt - set 0MQ socket options SYNOPSIS -------- *int zmq_setsockopt (void '*socket', int 'option_name', const void '*option_value', size_t 'option_len');* Caution: All options, with the exception of ZMQ_SUBSCRIBE, ZMQ_UNSUBSCRIBE and ZMQ_LINGER, only take effect for subsequent socket bind/connects. DESCRIPTION ----------- The _zmq_setsockopt()_ function shall set the option specified by the 'option_name' argument to the value pointed to by the 'option_value' argument for the 0MQ socket pointed to by the 'socket' argument. The 'option_len' argument is the size of the option value in bytes. The following socket options can be set with the _zmq_setsockopt()_ function: ZMQ_HWM: Set high water mark ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_HWM' option shall set the high water mark for the specified 'socket'. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified 'socket' is communicating with. If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages. Refer to the individual socket descriptions in linkzmq:zmq_socket[3] for details on the exact action taken for each socket type. The default 'ZMQ_HWM' value of zero means "no limit". [horizontal] Option value type:: uint64_t Option value unit:: messages Default value:: 0 Applicable socket types:: all ZMQ_SWAP: Set disk offload size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SWAP' option shall set the disk offload (swap) size for the specified 'socket'. A socket which has 'ZMQ_SWAP' set to a non-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory. The value of 'ZMQ_SWAP' defines the maximum size of the swap space in bytes. [horizontal] Option value type:: int64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_AFFINITY: Set I/O thread affinity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_AFFINITY' option shall set the I/O thread affinity for newly created connections on the specified 'socket'. Affinity determines which threads from the 0MQ I/O thread pool associated with the socket's _context_ shall handle newly created connections. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool. For non-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on. For example, a value of 3 specifies that subsequent connections on 'socket' shall be handled exclusively by I/O threads 1 and 2. See also linkzmq:zmq_init[3] for details on allocating the number of I/O threads for a specific _context_. [horizontal] Option value type:: uint64_t Option value unit:: N/A (bitmap) Default value:: 0 Applicable socket types:: N/A ZMQ_IDENTITY: Set socket identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_IDENTITY' option shall set the identity of the specified 'socket'. Socket identity determines if existing 0MQ infrastructure (_message queues_, _forwarding devices_) shall be identified with a specific application and persist across multiple runs of the application. If the socket has no identity, each run of an application is completely separate from other runs. However, with identity set the socket shall re-use any existing 0MQ infrastructure configured by the previous run(s). Thus the application may receive messages that were sent in the meantime, _message queue_ limits shall be shared with previous run(s) and so on. Identity should be at least one byte and at most 255 bytes long. Identities starting with binary zero are reserved for use by 0MQ infrastructure. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: NULL Applicable socket types:: all ZMQ_SUBSCRIBE: Establish message filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SUBSCRIBE' option shall establish a new message filter on a 'ZMQ_SUB' socket. Newly created 'ZMQ_SUB' sockets shall filter out all incoming messages, therefore you should call this option to establish an initial message filter. An empty 'option_value' of length zero shall subscribe to all incoming messages. A non-empty 'option_value' shall subscribe to all messages beginning with the specified prefix. Multiple filters may be attached to a single 'ZMQ_SUB' socket, in which case a message shall be accepted if it matches at least one filter. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: N/A Applicable socket types:: ZMQ_SUB ZMQ_UNSUBSCRIBE: Remove message filter ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_UNSUBSCRIBE' option shall remove an existing message filter on a 'ZMQ_SUB' socket. The filter specified must match an existing filter previously established with the 'ZMQ_SUBSCRIBE' option. If the socket has several instances of the same filter attached the 'ZMQ_UNSUBSCRIBE' option shall remove only one instance, leaving the rest in place and functional. [horizontal] Option value type:: binary data Option value unit:: N/A Default value:: N/A Applicable socket types:: ZMQ_SUB ZMQ_RCVTIMEO: Maximum time before a recv operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the timeout for receive operation on the socket. If the value is `0`, _zmq_recv(3)_ will return immediately, with a EAGAIN error if there is no message to receive. If the value is `-1`, it will block until a message is available. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_SNDTIMEO: Maximum time before a send operation returns with EAGAIN ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the timeout for send operation on the socket. If the value is `0`, _zmq_send(3)_ will return immediately, with a EAGAIN error if the message cannot be sent. If the value is `-1`, it will block until the message is sent. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_RATE: Set multicast data rate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RATE' option shall set the maximum send or receive data rate for multicast transports such as linkzmq:zmq_pgm[7] using the specified 'socket'. [horizontal] Option value type:: int64_t Option value unit:: kilobits per second Default value:: 100 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL: Set multicast recovery interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL' option shall set the recovery interval for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. CAUTION: Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer. [horizontal] Option value type:: int64_t Option value unit:: seconds Default value:: 10 Applicable socket types:: all, when using multicast transports ZMQ_RECOVERY_IVL_MSEC: Set multicast recovery interval in milliseconds ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECOVERY_IVL_MSEC' option shall set the recovery interval, specified in milliseconds (ms) for multicast transports using the specified 'socket'. The recovery interval determines the maximum time in milliseconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur. A non-zero value of the 'ZMQ_RECOVERY_IVL_MSEC' option will take precedence over the 'ZMQ_RECOVERY_IVL' option, but since the default for the 'ZMQ_RECOVERY_IVL_MSEC' is -1, the default is to use the 'ZMQ_RECOVERY_IVL' option value. CAUTION: Exercise care when setting large recovery intervals as the data needed for recovery will be held in memory. For example, a 1 minute recovery interval at a data rate of 1Gbps requires a 7GB in-memory buffer. [horizontal] Option value type:: int64_t Option value unit:: milliseconds Default value:: -1 Applicable socket types:: all, when using multicast transports ZMQ_MCAST_LOOP: Control multicast loop-back ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_MCAST_LOOP' option shall control whether data sent via multicast transports using the specified 'socket' can also be received by the sending host via loop-back. A value of zero disables the loop-back functionality, while the default value of 1 enables the loop-back functionality. Leaving multicast loop-back enabled when it is not required can have a negative impact on performance. Where possible, disable 'ZMQ_MCAST_LOOP' in production environments. [horizontal] Option value type:: int64_t Option value unit:: boolean Default value:: 1 Applicable socket types:: all, when using multicast transports ZMQ_SNDBUF: Set kernel transmit buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_SNDBUF' option shall set the underlying kernel transmit buffer size for the 'socket' to the specified size in bytes. A value of zero means leave the OS default unchanged. For details please refer to your operating system documentation for the 'SO_SNDBUF' socket option. [horizontal] Option value type:: uint64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_RCVBUF: Set kernel receive buffer size ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RCVBUF' option shall set the underlying kernel receive buffer size for the 'socket' to the specified size in bytes. A value of zero means leave the OS default unchanged. For details refer to your operating system documentation for the 'SO_RCVBUF' socket option. [horizontal] Option value type:: uint64_t Option value unit:: bytes Default value:: 0 Applicable socket types:: all ZMQ_LINGER: Set linger period for socket shutdown ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_LINGER' option shall set the linger period for the specified 'socket'. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with linkzmq:zmq_close[3], and further affects the termination of the socket's context with linkzmq:zmq_term[3]. The following outlines the different behaviours: * The default value of '-1' specifies an infinite linger period. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until all pending messages have been sent to a peer. * The value of '0' specifies no linger period. Pending messages shall be discarded immediately when the socket is closed with _zmq_close()_. * Positive values specify an upper bound for the linger period in milliseconds. Pending messages shall not be discarded after a call to _zmq_close()_; attempting to terminate the socket's context with _zmq_term()_ shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: -1 (infinite) Applicable socket types:: all ZMQ_RECONNECT_IVL: Set reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL' option shall set the initial reconnection interval for the specified 'socket'. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection-oriented transports. NOTE: The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 100 Applicable socket types:: all, only for connection-oriented transports ZMQ_RECONNECT_IVL_MAX: Set maximum reconnection interval ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_RECONNECT_IVL_MAX' option shall set the maximum reconnection interval for the specified 'socket'. This is the maximum period 0MQ shall wait between attempts to reconnect. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached. This allows for exponential backoff strategy. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL. NOTE: Values less than ZMQ_RECONNECT_IVL will be ignored. [horizontal] Option value type:: int Option value unit:: milliseconds Default value:: 0 (only use ZMQ_RECONNECT_IVL) Applicable socket types:: all, only for connection-oriented transports ZMQ_BACKLOG: Set maximum length of the queue of outstanding connections ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The 'ZMQ_BACKLOG' option shall set the maximum length of the queue of outstanding peer connections for the specified 'socket'; this only applies to connection-oriented transports. For details refer to your operating system documentation for the 'listen' function. [horizontal] Option value type:: int Option value unit:: connections Default value:: 100 Applicable socket types:: all, only for connection-oriented transports. RETURN VALUE ------------ The _zmq_setsockopt()_ function shall return zero if successful. Otherwise it shall return `-1` and set 'errno' to one of the values defined below. ERRORS ------ *EINVAL*:: The requested option _option_name_ is unknown, or the requested _option_len_ or _option_value_ is invalid. *ETERM*:: The 0MQ 'context' associated with the specified 'socket' was terminated. *ENOTSOCK*:: The provided 'socket' was invalid. *EINTR*:: The operation was interrupted by delivery of a signal. EXAMPLE ------- .Subscribing to messages on a 'ZMQ_SUB' socket ---- /* Subscribe to all messages */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "", 0); assert (rc == 0); /* Subscribe to messages prefixed with "ANIMALS.CATS" */ rc = zmq_setsockopt (socket, ZMQ_SUBSCRIBE, "ANIMALS.CATS", 12); ---- .Setting I/O thread affinity ---- int64_t affinity; /* Incoming connections on TCP port 5555 shall be handled by I/O thread 1 */ affinity = 1; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); assert (rc); rc = zmq_bind (socket, "tcp://lo:5555"); assert (rc); /* Incoming connections on TCP port 5556 shall be handled by I/O thread 2 */ affinity = 2; rc = zmq_setsockopt (socket, ZMQ_AFFINITY, &affinity, sizeof affinity); assert (rc); rc = zmq_bind (socket, "tcp://lo:5556"); assert (rc); ---- SEE ALSO -------- linkzmq:zmq_getsockopt[3] linkzmq:zmq_socket[3] linkzmq:zmq[7] AUTHORS ------- This manual page was written by the 0MQ community. zeromq-2.2.0.orig/doc/zmq_msg_init_size.30000664000000000000000000000552511737025330017062 0ustar rootroot'\" t .\" Title: zmq_msg_init_size .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_MSG_INIT_SIZE" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_msg_init_size \- initialise 0MQ message of a specified size .SH "SYNOPSIS" .sp \fBint zmq_msg_init_size (zmq_msg_t \fR\fB\fI*msg\fR\fR\fB, size_t \fR\fB\fIsize\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_msg_init_size()\fR function shall allocate any resources required to store a message \fIsize\fR bytes long and initialise the message object referenced by \fImsg\fR to represent the newly allocated message\&. .sp The implementation shall choose whether to store message content on the stack (small messages) or on the heap (large messages)\&. For performance reasons \fIzmq_msg_init_size()\fR shall not clear the message data\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp Never access \fIzmq_msg_t\fR members directly, instead always use the \fIzmq_msg\fR family of functions\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The functions \fIzmq_msg_init()\fR, \fIzmq_msg_init_data()\fR and \fIzmq_msg_init_size()\fR are mutually exclusive\&. Never initialize the same \fIzmq_msg_t\fR twice\&. .sp .5v .RE .SH "RETURN VALUE" .sp The \fIzmq_msg_init_size()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBENOMEM\fR .RS 4 Insufficient storage space is available\&. .RE .SH "SEE ALSO" .sp \fBzmq_msg_init_data\fR(3) \fBzmq_msg_init\fR(3) \fBzmq_msg_close\fR(3) \fBzmq_msg_data\fR(3) \fBzmq_msg_size\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_getsockopt.30000664000000000000000000004736011737025425016411 0ustar rootroot'\" t .\" Title: zmq_getsockopt .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_GETSOCKOPT" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_getsockopt \- get 0MQ socket options .SH "SYNOPSIS" .sp \fBint zmq_getsockopt (void \fR\fB\fI*socket\fR\fR\fB, int \fR\fB\fIoption_name\fR\fR\fB, void \fR\fB\fI*option_value\fR\fR\fB, size_t \fR\fB\fI*option_len\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_getsockopt()\fR function shall retrieve the value for the option specified by the \fIoption_name\fR argument for the 0MQ socket pointed to by the \fIsocket\fR argument, and store it in the buffer pointed to by the \fIoption_value\fR argument\&. The \fIoption_len\fR argument is the size in bytes of the buffer pointed to by \fIoption_value\fR; upon successful completion \fIzmq_getsockopt()\fR shall modify the \fIoption_len\fR argument to indicate the actual size of the option value stored in the buffer\&. .sp The following options can be retrieved with the \fIzmq_getsockopt()\fR function: .SS "ZMQ_TYPE: Retrieve socket type" .sp The \fIZMQ_TYPE\fR option shall retrieve the socket type for the specified \fIsocket\fR\&. The socket type is specified at socket creation time and cannot be modified afterwards\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVMORE: More message parts to follow" .sp The \fIZMQ_RCVMORE\fR option shall return a boolean value indicating if the multi\-part message currently being read from the specified \fIsocket\fR has more message parts to follow\&. If there are no message parts to follow or if the message currently being read is not a multi\-part message a value of zero shall be returned\&. Otherwise, a value of 1 shall be returned\&. .sp Refer to \fBzmq_send\fR(3) and \fBzmq_recv\fR(3) for a detailed description of sending/receiving multi\-part messages\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_HWM: Retrieve high water mark" .sp The \fIZMQ_HWM\fR option shall retrieve the high water mark for the specified \fIsocket\fR\&. The high water mark is a hard limit on the maximum number of outstanding messages 0MQ shall queue in memory for any single peer that the specified \fIsocket\fR is communicating with\&. .sp If this limit has been reached the socket shall enter an exceptional state and depending on the socket type, 0MQ shall take appropriate action such as blocking or dropping sent messages\&. Refer to the individual socket descriptions in \fBzmq_socket\fR(3) for details on the exact action taken for each socket type\&. .sp The default \fIZMQ_HWM\fR value of zero means "no limit"\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp messages T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVTIMEO: Maximum time before a socket operation returns with EAGAIN" .sp Retrieve the timeout for recv operation on the socket\&. If the value is 0, \fIzmq_recv(3)\fR will return immediately, with a EAGAIN error if there is no message to receive\&. If the value is \-1, it will block until a message is available\&. For all other values, it will wait for a message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SNDTIMEO: Maximum time before a socket operation returns with EAGAIN" .sp Retrieve the timeout for send operation on the socket\&. If the value is 0, \fIzmq_send(3)\fR will return immediately, with a EAGAIN error if the message cannot be sent\&. If the value is \-1, it will block until the message is sent\&. For all other values, it will try to send the message for that amount of time before returning with an EAGAIN error\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 (infinite) T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_SWAP: Retrieve disk offload size" .sp The \fIZMQ_SWAP\fR option shall retrieve the disk offload (swap) size for the specified \fIsocket\fR\&. A socket which has \fIZMQ_SWAP\fR set to a non\-zero value may exceed its high water mark; in this case outstanding messages shall be offloaded to storage on disk rather than held in memory\&. .sp The value of \fIZMQ_SWAP\fR defines the maximum size of the swap space in bytes\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_AFFINITY: Retrieve I/O thread affinity" .sp The \fIZMQ_AFFINITY\fR option shall retrieve the I/O thread affinity for newly created connections on the specified \fIsocket\fR\&. .sp Affinity determines which threads from the 0MQ I/O thread pool associated with the socket\(cqs \fIcontext\fR shall handle newly created connections\&. A value of zero specifies no affinity, meaning that work shall be distributed fairly among all 0MQ I/O threads in the thread pool\&. For non\-zero values, the lowest bit corresponds to thread 1, second lowest bit to thread 2 and so on\&. For example, a value of 3 specifies that subsequent connections on \fIsocket\fR shall be handled exclusively by I/O threads 1 and 2\&. .sp See also \fBzmq_init\fR(3) for details on allocating the number of I/O threads for a specific \fIcontext\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp N/A (bitmap) T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp N/A T} .TE .sp 1 .SS "ZMQ_IDENTITY: Retrieve socket identity" .sp The \fIZMQ_IDENTITY\fR option shall retrieve the identity of the specified \fIsocket\fR\&. Socket identity determines if existing 0MQ infrastructure (\fImessage queues\fR, \fIforwarding devices\fR) shall be identified with a specific application and persist across multiple runs of the application\&. .sp If the socket has no identity, each run of an application is completely separate from other runs\&. However, with identity set the socket shall re\-use any existing 0MQ infrastructure configured by the previous run(s)\&. Thus the application may receive messages that were sent in the meantime, \fImessage queue\fR limits shall be shared with previous run(s) and so on\&. .sp Identity can be at least one byte and at most 255 bytes long\&. Identities starting with binary zero are reserved for use by 0MQ infrastructure\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp binary data T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp NULL T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RATE: Retrieve multicast data rate" .sp The \fIZMQ_RATE\fR option shall retrieve the maximum send or receive data rate for multicast transports using the specified \fIsocket\fR\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp kilobits per second T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL: Get multicast recovery interval" .sp The \fIZMQ_RECOVERY_IVL\fR option shall retrieve the recovery interval for multicast transports using the specified \fIsocket\fR\&. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp seconds T} T{ .sp Default value T}:T{ .sp 10 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_RECOVERY_IVL_MSEC: Get multicast recovery interval in milliseconds" .sp The \fIZMQ_RECOVERY_IVL\(cq_MSEC option shall retrieve the recovery interval, in milliseconds, for multicast transports using the specified \*(Aqsocket\fR\&. The recovery interval determines the maximum time in seconds that a receiver can be absent from a multicast group before unrecoverable data loss will occur\&. .sp For backward compatibility, the default value of \fIZMQ_RECOVERY_IVL_MSEC\fR is \-1 indicating that the recovery interval should be obtained from the \fIZMQ_RECOVERY_IVL\fR option\&. However, if the \fIZMQ_RECOVERY_IVL_MSEC\fR value is not zero, then it will take precedence, and be used\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp \-1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_MCAST_LOOP: Control multicast loop\-back" .sp The \fIZMQ_MCAST_LOOP\fR option controls whether data sent via multicast transports can also be received by the sending host via loop\-back\&. A value of zero indicates that the loop\-back functionality is disabled, while the default value of 1 indicates that the loop\-back functionality is enabled\&. Leaving multicast loop\-back enabled when it is not required can have a negative impact on performance\&. Where possible, disable \fIZMQ_MCAST_LOOP\fR in production environments\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int64_t T} T{ .sp Option value unit T}:T{ .sp boolean T} T{ .sp Default value T}:T{ .sp 1 T} T{ .sp Applicable socket types T}:T{ .sp all, when using multicast transports T} .TE .sp 1 .SS "ZMQ_SNDBUF: Retrieve kernel transmit buffer size" .sp The \fIZMQ_SNDBUF\fR option shall retrieve the underlying kernel transmit buffer size for the specified \fIsocket\fR\&. A value of zero means that the OS default is in effect\&. For details refer to your operating system documentation for the \fISO_SNDBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_RCVBUF: Retrieve kernel receive buffer size" .sp The \fIZMQ_RCVBUF\fR option shall retrieve the underlying kernel receive buffer size for the specified \fIsocket\fR\&. A value of zero means that the OS default is in effect\&. For details refer to your operating system documentation for the \fISO_RCVBUF\fR socket option\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint64_t T} T{ .sp Option value unit T}:T{ .sp bytes T} T{ .sp Default value T}:T{ .sp 0 T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_LINGER: Retrieve linger period for socket shutdown" .sp The \fIZMQ_LINGER\fR option shall retrieve the linger period for the specified \fIsocket\fR\&. The linger period determines how long pending messages which have yet to be sent to a peer shall linger in memory after a socket is closed with \fBzmq_close\fR(3), and further affects the termination of the socket\(cqs context with \fBzmq_term\fR(3)\&. The following outlines the different behaviours: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The default value of \fI\-1\fR specifies an infinite linger period\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until all pending messages have been sent to a peer\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} The value of \fI0\fR specifies no linger period\&. Pending messages shall be discarded immediately when the socket is closed with \fIzmq_close()\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Positive values specify an upper bound for the linger period in milliseconds\&. Pending messages shall not be discarded after a call to \fIzmq_close()\fR; attempting to terminate the socket\(cqs context with \fIzmq_term()\fR shall block until either all pending messages have been sent to a peer, or the linger period expires, after which any pending messages shall be discarded\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ Option value type T}:T{ int T} T{ Option value unit T}:T{ milliseconds T} T{ Default value T}:T{ \-1 (infinite) T} T{ Applicable socket types T}:T{ all T} .TE .sp 1 .RE .SS "ZMQ_RECONNECT_IVL: Retrieve reconnection interval" .sp The \fIZMQ_RECONNECT_IVL\fR option shall retrieve the initial reconnection interval for the specified \fIsocket\fR\&. The reconnection interval is the period 0MQ shall wait between attempts to reconnect disconnected peers when using connection\-oriented transports\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The reconnection interval may be randomized by 0MQ to prevent reconnection storms in topologies with a large number of peers per socket\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_RECONNECT_IVL_MAX: Retrieve maximum reconnection interval" .sp The \fIZMQ_RECONNECT_IVL_MAX\fR option shall retrieve the maximum reconnection interval for the specified \fIsocket\fR\&. This is the maximum period 0MQ shall wait between attempts to reconnect\&. On each reconnect attempt, the previous interval shall be doubled untill ZMQ_RECONNECT_IVL_MAX is reached\&. This allows for exponential backoff strategy\&. Default value means no exponential backoff is performed and reconnect interval calculations are only based on ZMQ_RECONNECT_IVL\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp Values less than ZMQ_RECONNECT_IVL will be ignored\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp milliseconds T} T{ .sp Default value T}:T{ .sp 0 (only use ZMQ_RECONNECT_IVL) T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transport T} .TE .sp 1 .SS "ZMQ_BACKLOG: Retrieve maximum length of the queue of outstanding connections" .sp The \fIZMQ_BACKLOG\fR option shall retrieve the maximum length of the queue of outstanding peer connections for the specified \fIsocket\fR; this only applies to connection\-oriented transports\&. For details refer to your operating system documentation for the \fIlisten\fR function\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int T} T{ .sp Option value unit T}:T{ .sp connections T} T{ .sp Default value T}:T{ .sp 100 T} T{ .sp Applicable socket types T}:T{ .sp all, only for connection\-oriented transports T} .TE .sp 1 .SS "ZMQ_FD: Retrieve file descriptor associated with the socket" .sp The \fIZMQ_FD\fR option shall retrieve the file descriptor associated with the specified \fIsocket\fR\&. The returned file descriptor can be used to integrate the socket into an existing event loop; the 0MQ library shall signal any pending events on the socket in an \fIedge\-triggered\fR fashion by making the file descriptor become ready for reading\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBNote\fR .ps -1 .br .sp The ability to read from the returned file descriptor does not necessarily indicate that messages are available to be read from, or can be written to, the underlying socket; applications must retrieve the actual event state with a subsequent retrieval of the \fIZMQ_EVENTS\fR option\&. .sp .5v .RE .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br .sp The returned file descriptor is intended for use with a \fIpoll\fR or similar system call only\&. Applications must never attempt to read or write data to it directly, neither should they try to close it\&. .sp .5v .RE .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp int on POSIX systems, SOCKET on Windows T} T{ .sp Option value unit T}:T{ .sp N/A T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SS "ZMQ_EVENTS: Retrieve socket event state" .sp The \fIZMQ_EVENTS\fR option shall retrieve the event state for the specified \fIsocket\fR\&. The returned value is a bit mask constructed by OR\(cqing a combination of the following event flags: .PP \fBZMQ_POLLIN\fR .RS 4 Indicates that at least one message may be received from the specified socket without blocking\&. .RE .PP \fBZMQ_POLLOUT\fR .RS 4 Indicates that at least one message may be sent to the specified socket without blocking\&. .RE .sp The combination of a file descriptor returned by the \fIZMQ_FD\fR option being ready for reading but no actual events returned by a subsequent retrieval of the \fIZMQ_EVENTS\fR option is valid; applications should simply ignore this case and restart their polling operation/event loop\&. .TS tab(:); lt lt lt lt lt lt lt lt. T{ .sp Option value type T}:T{ .sp uint32_t T} T{ .sp Option value unit T}:T{ .sp N/A (flags) T} T{ .sp Default value T}:T{ .sp N/A T} T{ .sp Applicable socket types T}:T{ .sp all T} .TE .sp 1 .SH "RETURN VALUE" .sp The \fIzmq_getsockopt()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The requested option \fIoption_name\fR is unknown, or the requested \fIoption_len\fR or \fIoption_value\fR is invalid, or the size of the buffer pointed to by \fIoption_value\fR, as specified by \fIoption_len\fR, is insufficient for storing the option value\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEINTR\fR .RS 4 The operation was interrupted by delivery of a signal\&. .RE .SH "EXAMPLE" .PP \fBRetrieving the high water mark\fR. .sp .if n \{\ .RS 4 .\} .nf /* Retrieve high water mark into hwm */ int64_t hwm; size_t hwm_size = sizeof (hwm); rc = zmq_getsockopt (socket, ZMQ_HWM, &hwm, &hwm_size); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_setsockopt\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_pgm.html0000664000000000000000000005107011741075734015610 0ustar rootroot zmq_pgm(7)

SYNOPSIS

PGM (Pragmatic General Multicast) is a protocol for reliable multicast transport of data over IP networks.

DESCRIPTION

ØMQ implements two variants of PGM, the standard protocol where PGM datagrams are layered directly on top of IP datagrams as defined by RFC 3208 (the pgm transport) and "Encapsulated PGM" where PGM datagrams are encapsulated inside UDP datagrams (the epgm transport).

The pgm and epgm transports can only be used with the ZMQ_PUB and ZMQ_SUB socket types.

Further, PGM sockets are rate limited by default and incur a performance penalty when used over a loop-back interface. For details, refer to the ZMQ_RATE, ZMQ_RECOVERY_IVL and ZMQ_MCAST_LOOP options documented in zmq_setsockopt(3).

Caution
The pgm transport implementation requires access to raw IP sockets. Additional privileges may be required on some operating systems for this operation. Applications not requiring direct interoperability with other PGM implementations are encouraged to use the epgm transport instead which does not require any special privileges.

ADDRESSING

A ØMQ address string consists of two parts as follows: transport://endpoint. The transport part specifies the underlying transport protocol to use. For the standard PGM protocol, transport shall be set to pgm. For the "Encapsulated PGM" protocol transport shall be set to epgm. The meaning of the endpoint part for both the pgm and epgm transport is defined below.

Connecting a socket

When connecting a socket to a peer address using zmq_connect() with the pgm or epgm transport, the endpoint shall be interpreted as an interface followed by a semicolon, followed by a multicast address, followed by a colon and a port number.

An interface may be specified by either of the following:

  • The interface name as defined by the operating system.

  • The primary IPv4 address assigned to the interface, in its numeric representation.

Note
Interface names are not standardised in any way and should be assumed to be arbitrary and platform dependent. On Win32 platforms no short interface names exist, thus only the primary IPv4 address may be used to specify an interface.

A multicast address is specified by an IPv4 multicast address in its numeric representation.

WIRE FORMAT

Consecutive PGM datagrams are interpreted by ØMQ as a single continuous stream of data where ØMQ messages are not necessarily aligned with PGM datagram boundaries and a single ØMQ message may span several PGM datagrams. This stream of data consists of ØMQ messages encapsulated in frames as described in zmq_tcp(7).

PGM datagram payload

The following ABNF grammar represents the payload of a single PGM datagram as used by ØMQ:

datagram               = (offset data)
offset                 = 2OCTET
data                   = *OCTET

In order for late joining consumers to be able to identify message boundaries, each PGM datagram payload starts with a 16-bit unsigned integer in network byte order specifying either the offset of the first message frame in the datagram or containing the value 0xFFFF if the datagram contains solely an intermediate part of a larger message.

Note that offset specifies where the first message begins rather than the first message part. Thus, if there are trailing message parts at the beginning of the packet the offset ignores them and points to first initial message part in the packet.

The following diagram illustrates the layout of a single PGM datagram payload:

+------------------+----------------------+
| offset (16 bits) |         data         |
+------------------+----------------------+

The following diagram further illustrates how three example ØMQ frames are laid out in consecutive PGM datagram payloads:

First datagram payload
+--------------+-------------+---------------------+
| Frame offset |   Frame 1   |   Frame 2, part 1   |
|    0x0000    | (Message 1) | (Message 2, part 1) |
+--------------+-------------+---------------------+

Second datagram payload
+--------------+---------------------+
| Frame offset |   Frame 2, part 2   |
| 0xFFFF       | (Message 2, part 2) |
+--------------+---------------------+

Third datagram payload
+--------------+----------------------------+-------------+
| Frame offset |   Frame 2, final 8 bytes   |   Frame 3   |
| 0x0008       | (Message 2, final 8 bytes) | (Message 3) |
+--------------+----------------------------+-------------+

EXAMPLE

Connecting a socket
/* Connecting to the multicast address 239.192.1.1, port 5555, */
/* using the first Ethernet network interface on Linux */
/* and the Encapsulated PGM protocol */
rc = zmq_connect(socket, "epgm://eth0;239.192.1.1:5555");
assert (rc == 0);
/* Connecting to the multicast address 239.192.1.1, port 5555, */
/* using the network interface with the address 192.168.1.1 */
/* and the standard PGM protocol */
rc = zmq_connect(socket, "pgm://192.168.1.1;239.192.1.1:5555");
assert (rc == 0);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq_bind.30000664000000000000000000001030111737025306015122 0ustar rootroot'\" t .\" Title: zmq_bind .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 04/04/2012 .\" Manual: 0MQ Manual .\" Source: 0MQ 2.2.0 .\" Language: English .\" .TH "ZMQ_BIND" "3" "04/04/2012" "0MQ 2\&.2\&.0" "0MQ Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zmq_bind \- accept connections on a socket .SH "SYNOPSIS" .sp \fBint zmq_bind (void \fR\fB\fI*socket\fR\fR\fB, const char \fR\fB\fI*endpoint\fR\fR\fB);\fR .SH "DESCRIPTION" .sp The \fIzmq_bind()\fR function shall create an endpoint for accepting connections and bind it to the socket referenced by the \fIsocket\fR argument\&. .sp The \fIendpoint\fR argument is a string consisting of two parts as follows: \fItransport\fR://\fIaddress\fR\&. The \fItransport\fR part specifies the underlying transport protocol to use\&. The meaning of the \fIaddress\fR part is specific to the underlying transport protocol selected\&. .sp The following transports are defined: .PP \fIinproc\fR .RS 4 local in\-process (inter\-thread) communication transport, see \fBzmq_inproc\fR(7) .RE .PP \fIipc\fR .RS 4 local inter\-process communication transport, see \fBzmq_ipc\fR(7) .RE .PP \fItcp\fR .RS 4 unicast transport using TCP, see \fBzmq_tcp\fR(7) .RE .PP \fIpgm\fR, \fIepgm\fR .RS 4 reliable multicast transport using PGM, see \fBzmq_pgm\fR(7) .RE .sp With the exception of \fIZMQ_PAIR\fR sockets, a single socket may be connected to multiple endpoints using \fIzmq_connect()\fR, while simultaneously accepting incoming connections from multiple endpoints bound to the socket using \fIzmq_bind()\fR\&. Refer to \fBzmq_socket\fR(3) for a description of the exact semantics involved when connecting or binding a socket to multiple endpoints\&. .SH "RETURN VALUE" .sp The \fIzmq_bind()\fR function shall return zero if successful\&. Otherwise it shall return \-1 and set \fIerrno\fR to one of the values defined below\&. .SH "ERRORS" .PP \fBEINVAL\fR .RS 4 The endpoint supplied is invalid\&. .RE .PP \fBEPROTONOSUPPORT\fR .RS 4 The requested \fItransport\fR protocol is not supported\&. .RE .PP \fBENOCOMPATPROTO\fR .RS 4 The requested \fItransport\fR protocol is not compatible with the socket type\&. .RE .PP \fBEADDRINUSE\fR .RS 4 The requested \fIaddress\fR is already in use\&. .RE .PP \fBEADDRNOTAVAIL\fR .RS 4 The requested \fIaddress\fR was not local\&. .RE .PP \fBENODEV\fR .RS 4 The requested \fIaddress\fR specifies a nonexistent interface\&. .RE .PP \fBETERM\fR .RS 4 The 0MQ \fIcontext\fR associated with the specified \fIsocket\fR was terminated\&. .RE .PP \fBENOTSOCK\fR .RS 4 The provided \fIsocket\fR was invalid\&. .RE .PP \fBEMTHREAD\fR .RS 4 No I/O thread is available to accomplish the task\&. .RE .SH "EXAMPLE" .PP \fBBinding a publisher socket to an in-process and a TCP transport\fR. .sp .if n \{\ .RS 4 .\} .nf /* Create a ZMQ_PUB socket */ void *socket = zmq_socket (context, ZMQ_PUB); assert (socket); /* Bind it to a in\-process transport with the address \*(Aqmy_publisher\*(Aq */ int rc = zmq_bind (socket, "inproc://my_publisher"); assert (rc == 0); /* Bind it to a TCP transport on port 5555 of the \*(Aqeth0\*(Aq interface */ rc = zmq_bind (socket, "tcp://eth0:5555"); assert (rc == 0); .fi .if n \{\ .RE .\} .sp .SH "SEE ALSO" .sp \fBzmq_connect\fR(3) \fBzmq_socket\fR(3) \fBzmq\fR(7) .SH "AUTHORS" .sp This manual page was written by the 0MQ community\&. zeromq-2.2.0.orig/doc/zmq_device.html0000664000000000000000000004602411741075723016265 0ustar rootroot zmq_device(3)

SYNOPSIS

int zmq_device (int device, const void *frontend, const void *backend);

DESCRIPTION

The zmq_device() function starts a built-in ØMQ device. The device argument is one of:

ZMQ_QUEUE

starts a queue device

ZMQ_FORWARDER

starts a forwarder device

ZMQ_STREAMER

starts a streamer device

The device connects a frontend socket to a backend socket. Conceptually, data flows from frontend to backend. Depending on the socket types, replies may flow in the opposite direction.

Before calling zmq_device() you must set any socket options, and connect or bind both frontend and backend sockets. The two conventional device models are:

proxy

bind frontend socket to an endpoint, and connect backend socket to downstream components. A proxy device model does not require changes to the downstream topology but that topology is static (any changes require reconfiguring the device).

broker

bind frontend socket to one endpoint and bind backend socket to a second endpoint. Downstream components must now connect into the device. A broker device model allows a dynamic downstream topology (components can come and go at any time).

zmq_device() runs in the current thread and returns only if/when the current context is closed.

QUEUE DEVICE

ZMQ_QUEUE creates a shared queue that collects requests from a set of clients, and distributes these fairly among a set of services. Requests are fair-queued from frontend connections and load-balanced between backend connections. Replies automatically return to the client that made the original request.

This device is part of the request-reply pattern. The frontend speaks to clients and the backend speaks to services. You should use ZMQ_QUEUE with a ZMQ_XREP socket for the frontend and a ZMQ_XREQ socket for the backend. Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

FORWARDER DEVICE

ZMQ_FORWARDER collects messages from a set of publishers and forwards these to a set of subscribers. You will generally use this to bridge networks, e.g. read on TCP unicast and forward on multicast.

This device is part of the publish-subscribe pattern. The frontend speaks to publishers and the backend speaks to subscribers. You should use ZMQ_FORWARDER with a ZMQ_SUB socket for the frontend and a ZMQ_PUB socket for the backend. Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

STREAMER DEVICE

ZMQ_STREAMER collects tasks from a set of pushers and forwards these to a set of pullers. You will generally use this to bridge networks. Messages are fair-queued from pushers and load-balanced to pullers.

This device is part of the pipeline pattern. The frontend speaks to pushers and the backend speaks to pullers. You should use ZMQ_STREAMER with a ZMQ_PULL socket for the frontend and a ZMQ_PUSH socket for the backend. Other combinations are not documented.

Refer to zmq_socket(3) for a description of these socket types.

RETURN VALUE

The zmq_device() function always returns -1 and errno set to ETERM (the ØMQ context associated with either of the specified sockets was terminated).

EXAMPLE

Creating a queue broker
//  Create frontend and backend sockets
void *frontend = zmq_socket (context, ZMQ_XREP);
assert (backend);
void *backend = zmq_socket (context, ZMQ_XREQ);
assert (frontend);
//  Bind both sockets to TCP ports
assert (zmq_bind (frontend, "tcp://*:5555") == 0);
assert (zmq_bind (backend, "tcp://*:5556") == 0);
//  Start a queue device
zmq_device (ZMQ_QUEUE, frontend, backend);

AUTHORS

This manual page was written by the ØMQ community.


zeromq-2.2.0.orig/doc/zmq.html0000664000000000000000000005633611741075733014756 0ustar rootroot zmq(7)

SYNOPSIS

#include <zmq.h>

cc [flags] files -lzmq [libraries]

DESCRIPTION

The ØMQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. ØMQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more.

This documentation presents an overview of ØMQ concepts, describes how ØMQ abstracts standard sockets and provides a reference manual for the functions provided by the ØMQ library.

Context

Before using any ØMQ library functions the caller must initialise a ØMQ context using zmq_init(). The following functions are provided to handle initialisation and termination of a context:

Initialise ØMQ context

zmq_init(3)

Terminate ØMQ context

zmq_term(3)

Thread safety

A ØMQ context is thread safe and may be shared among as many application threads as necessary, without any additional locking required on the part of the caller.

Individual ØMQ sockets are not thread safe except in the case where full memory barriers are issued when migrating a socket from one thread to another. In practice this means applications can create a socket in one thread with zmq_socket() and then pass it to a newly created thread as part of thread initialization, for example via a structure passed as an argument to pthread_create().

Multiple contexts

Multiple contexts may coexist within a single application. Thus, an application can use ØMQ directly and at the same time make use of any number of additional libraries or components which themselves make use of ØMQ as long as the above guidelines regarding thread safety are adhered to.

Messages

A ØMQ message is a discrete unit of data passed between applications or components of the same application. ØMQ messages have no internal structure and from the point of view of ØMQ itself they are considered to be opaque binary data.

The following functions are provided to work with messages:

Initialise a message

zmq_msg_init(3) zmq_msg_init_size(3) zmq_msg_init_data(3)

Release a message

zmq_msg_close(3)

Access message content

zmq_msg_data(3) zmq_msg_size(3)

Message manipulation

zmq_msg_copy(3) zmq_msg_move(3)

Sockets

ØMQ sockets present an abstraction of a asynchronous message queue, with the exact queueing semantics depending on the socket type in use. See zmq_socket(3) for the socket types provided.

The following functions are provided to work with sockets:

Creating a socket

zmq_socket(3)

Closing a socket

zmq_close(3)

Manipulating socket options

zmq_getsockopt(3) zmq_setsockopt(3)

Establishing a message flow

zmq_bind(3) zmq_connect(3)

Sending and receiving messages

zmq_send(3) zmq_recv(3)

Input/output multiplexing

ØMQ provides a mechanism for applications to multiplex input/output events over a set containing both ØMQ sockets and standard sockets. This mechanism mirrors the standard poll() system call, and is described in detail in zmq_poll(3).

Transports

A ØMQ socket can use multiple different underlying transport mechanisms. Each transport mechanism is suited to a particular purpose and has its own advantages and drawbacks.

The following transport mechanisms are provided:

Unicast transport using TCP

zmq_tcp(7)

Reliable multicast transport using PGM

zmq_pgm(7)

Local inter-process communication transport

zmq_ipc(7)

Local in-process (inter-thread) communication transport

zmq_inproc(7)

Devices

ØMQ provides devices, which are building blocks that act as intermediate nodes in complex messaging topologies. Devices can act as brokers that other nodes connect to, proxies that connect through to other nodes, or any mix of these two models.

You can start a device in an application thread, see zmq_device(3).

ERROR HANDLING

The ØMQ library functions handle errors using the standard conventions found on POSIX systems. Generally, this means that upon failure a ØMQ library function shall return either a NULL value (if returning a pointer) or a negative value (if returning an integer), and the actual error code shall be stored in the errno variable.

On non-POSIX systems some users may experience issues with retrieving the correct value of the errno variable. The zmq_errno() function is provided to assist in these cases; for details refer to zmq_errno(3).

The zmq_strerror() function is provided to translate ØMQ-specific error codes into error message strings; for details refer to zmq_strerror(3).

MISCELLANEOUS

The following miscellaneous functions are provided:

Report ØMQ library version

zmq_version(3)

LANGUAGE BINDINGS

The ØMQ library provides interfaces suitable for calling from programs in any language; this documentation documents those interfaces as they would be used by C programmers. The intent is that programmers using ØMQ from other languages shall refer to this documentation alongside any documentation provided by the vendor of their language binding.

C++ language binding

The ØMQ distribution includes a C++ language binding, which is documented separately in zmq_cpp(7).

Other language bindings

Other language bindings (Python, Ruby, Java and more) are provided by members of the ØMQ community and pointers can be found on the ØMQ website.

AUTHORS

This manual page was written by the ØMQ community.

RESOURCES

Main web site: http://www.zeromq.org/

Report bugs to the ØMQ development mailing list: <zeromq-dev@lists.zeromq.org>

COPYING

Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files COPYING and COPYING.LESSER included with the ØMQ distribution.


zeromq-2.2.0.orig/Makefile.am0000664000000000000000000000227511732125604014532 0ustar rootrootACLOCAL_AMFLAGS = -I config if BUILD_PGM SUBDIRS = foreign/openpgm src doc perf tests else SUBDIRS = src doc perf tests endif DIST_SUBDIRS = foreign/openpgm src doc perf tests builds/msvc EXTRA_DIST = \ autogen.sh \ version.sh \ MAINTAINERS \ foreign/openpgm/@pgm_basename@.tar.gz \ foreign/xmlParser/xmlParser.cpp \ foreign/xmlParser/xmlParser.hpp MAINTAINERCLEANFILES = \ $(srcdir)/aclocal.m4 \ $(srcdir)/autom4te.cache \ $(srcdir)/configure \ `find "$(srcdir)" -type f -name Makefile.in -print` dist-hook: @if test -d "$(srcdir)/.git"; \ then \ echo Creating ChangeLog && \ ( cd "$(top_srcdir)" && \ echo '# Generated by Makefile. Do not edit.'; echo; \ $(top_srcdir)/config/missing --run git log --stat ) > ChangeLog.tmp \ && mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \ || ( rm -f ChangeLog.tmp ; \ echo Failed to generate ChangeLog >&2 ); \ else \ echo A git clone is required to generate a ChangeLog >&2; \ fi -cp $(top_srcdir)/builds/redhat/zeromq.spec $(distdir)/zeromq.spec -rm -rf $(distdir)/foreign/openpgm/build-staging distclean-local: -rm -rf $(top_srcdir)/foreign/openpgm/build-staging maintainer-clean-local: -rm -rf $(top_srcdir)/config zeromq-2.2.0.orig/AUTHORS0000664000000000000000000000674611732125604013555 0ustar rootrootContributors ============ AJ Lewis Alexej Lotz Asko Kauppi Barak Amar Bernd Prager Bernd Melchers Bob Beaty Brian Buchanan Brett Cameron Burak Arslan Carl Clemens Chia-liang Kao Chris Rempel Chris Wong Christian Gudrian Conrad D. Steenberg Dhammika Pathirana Dhruva Krishnamurthy Dirk O. Kaar Douglas Creager Erich Heine Erik Rigtorp Frank Denis George Neill Gerard Toonstra Gonzalo Diethelm Guido Goldstein Ilja Golshtein Ivo Danihelka Jacob Rideout Joe Thornber Jon Dyte Kamil Shakirov Marc Rossi Martin Hurton Martin Lucina Martin Pales Martin Sustrik Matus Hamorsky Max Wolf McClain Looney Michael Compton Mikael Helbo Kjaer Mikko Koppanen Min Ragan-Kelley Neale Ferguson Nir Soffer Paul Betts Paul Colomiets Pavel Gushcha Pavol Malosek Peter Bourgon Philip Kovacs Pieter Hintjens Piotr Trojanek Robert G. Jakabosky Sebastian Otaegui Steven McCoy Stuart Webster Tamara Kustarova Taras Shpot Tero Marttila Terry Wilson Thijs Terlouw Toralf Wittner Tore Halvorsen Vitaly Mayatskikh Ghislain Putois William Roberts Botond Ballo Credits ======= Aamir Mohammad Adrian von Bidder Aleksey Yeschenko Alessio Spadaro Alexander Majorov Anh Vu Bernd Schumacher Brian Granger Carsten Dinkelmann David Bahi Dirk Eddelbuettel Evgueny Khartchenko Frank Vanden Berghen John Apps Markus Fischer Matt Muggeridge Michael Santy Oleg Sevostyanov Paulo Henrique Silva Peter Busser Peter Lemenkov Robert Zhang Toralf Wittner zeromq-2.2.0.orig/autogen.sh0000775000000000000000000000300311732125604014465 0ustar rootroot#!/bin/sh # Copyright (c) 2007-2011 iMatix Corporation # Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file # # This file is part of 0MQ. # # 0MQ is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # 0MQ is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License # along with this program. If not, see . # Script to generate all required files from fresh git checkout. command -v libtool >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "autogen.sh: error: could not find libtool. libtool is required to run autogen.sh." 1>&2 exit 1 fi command -v autoreconf >/dev/null 2>&1 if [ $? -ne 0 ]; then echo "autogen.sh: error: could not find autoreconf. autoconf and automake are required to run autogen.sh." 1>&2 exit 1 fi mkdir -p ./config if [ $? -ne 0 ]; then echo "autogen.sh: error: could not create directory: ./config." 1>&2 exit 1 fi autoreconf --install --force --verbose -I config if [ $? -ne 0 ]; then echo "autogen.sh: error: autoreconf exited with status $?" 1>&2 exit 1 fi zeromq-2.2.0.orig/COPYING.LESSER0000664000000000000000000002260311732125604014522 0ustar rootroot GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. -------------------------------------------------------------------------------- SPECIAL EXCEPTION GRANTED BY IMATIX As a special exception, iMatix gives you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you must extend this exception to your version of the library. -------------------------------------------------------------------------------- Parts of the software are licensed under the MIT (X11) license as follows: Copyright (c) 2007-2010 Contributors as listed in AUTHORS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. zeromq-2.2.0.orig/include/0000775000000000000000000000000011741762442014122 5ustar rootrootzeromq-2.2.0.orig/include/zmq.hpp0000664000000000000000000002070111737023311015430 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_HPP_INCLUDED__ #define __ZMQ_HPP_INCLUDED__ #include "zmq.h" #include #include #include #include // Detect whether the compiler supports C++11 rvalue references. #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 2)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) # define ZMQ_HAS_RVALUE_REFS #endif #if (defined(__clang__)) # if __has_feature(cxx_rvalue_references) # define ZMQ_HAS_RVALUE_REFS # endif #endif #if (defined(_MSC_VER) && (_MSC_VER >= 1600)) # define ZMQ_HAS_RVALUE_REFS #endif // In order to prevent unused variable warnings when building in non-debug // mode use this macro to make assertions. #ifndef NDEBUG # define ZMQ_ASSERT(expression) assert(expression) #else # define ZMQ_ASSERT(expression) (expression) #endif namespace zmq { typedef zmq_free_fn free_fn; typedef zmq_pollitem_t pollitem_t; class error_t : public std::exception { public: error_t () : errnum (zmq_errno ()) {} virtual const char *what () const throw () { return zmq_strerror (errnum); } int num () const { return errnum; } private: int errnum; }; inline int poll (zmq_pollitem_t *items_, int nitems_, long timeout_ = -1) { int rc = zmq_poll (items_, nitems_, timeout_); if (rc < 0) throw error_t (); return rc; } inline void device (int device_, void * insocket_, void* outsocket_) { int rc = zmq_device (device_, insocket_, outsocket_); if (rc != 0) throw error_t (); } inline void version (int *major_, int *minor_, int *patch_) { zmq_version (major_, minor_, patch_); } class message_t : private zmq_msg_t { friend class socket_t; public: inline message_t () { int rc = zmq_msg_init (this); if (rc != 0) throw error_t (); } inline message_t (size_t size_) { int rc = zmq_msg_init_size (this, size_); if (rc != 0) throw error_t (); } inline message_t (void *data_, size_t size_, free_fn *ffn_, void *hint_ = NULL) { int rc = zmq_msg_init_data (this, data_, size_, ffn_, hint_); if (rc != 0) throw error_t (); } inline ~message_t () { int rc = zmq_msg_close (this); ZMQ_ASSERT (rc == 0); } inline void rebuild () { int rc = zmq_msg_close (this); if (rc != 0) throw error_t (); rc = zmq_msg_init (this); if (rc != 0) throw error_t (); } inline void rebuild (size_t size_) { int rc = zmq_msg_close (this); if (rc != 0) throw error_t (); rc = zmq_msg_init_size (this, size_); if (rc != 0) throw error_t (); } inline void rebuild (void *data_, size_t size_, free_fn *ffn_, void *hint_ = NULL) { int rc = zmq_msg_close (this); if (rc != 0) throw error_t (); rc = zmq_msg_init_data (this, data_, size_, ffn_, hint_); if (rc != 0) throw error_t (); } inline void move (message_t *msg_) { int rc = zmq_msg_move (this, (zmq_msg_t*) msg_); if (rc != 0) throw error_t (); } inline void copy (message_t *msg_) { int rc = zmq_msg_copy (this, (zmq_msg_t*) msg_); if (rc != 0) throw error_t (); } inline void *data () { return zmq_msg_data (this); } inline size_t size () { return zmq_msg_size (this); } private: // Disable implicit message copying, so that users won't use shared // messages (less efficient) without being aware of the fact. message_t (const message_t&); void operator = (const message_t&); }; class context_t { friend class socket_t; public: inline context_t (int io_threads_) { ptr = zmq_init (io_threads_); if (ptr == NULL) throw error_t (); } #ifdef ZMQ_HAS_RVALUE_REFS inline context_t(context_t&& rhs) : ptr(rhs.ptr) { rhs.ptr = NULL; } inline context_t& operator=(context_t&& rhs) { std::swap(ptr, rhs.ptr); return *this; } #endif inline ~context_t () { if (ptr == NULL) return; int rc = zmq_term (ptr); ZMQ_ASSERT (rc == 0); } // Be careful with this, it's probably only useful for // using the C api together with an existing C++ api. // Normally you should never need to use this. inline operator void* () { return ptr; } private: void *ptr; context_t (const context_t&); void operator = (const context_t&); }; class socket_t { public: inline socket_t (context_t &context_, int type_) { ptr = zmq_socket (context_.ptr, type_); if (ptr == NULL) throw error_t (); } #ifdef ZMQ_HAS_RVALUE_REFS inline socket_t(socket_t&& rhs) : ptr(rhs.ptr) { rhs.ptr = NULL; } inline socket_t& operator=(socket_t&& rhs) { std::swap(ptr, rhs.ptr); return *this; } #endif inline ~socket_t () { close(); } inline operator void* () { return ptr; } inline void close() { if(ptr == NULL) // already closed return ; int rc = zmq_close (ptr); if (rc != 0) throw error_t (); ptr = 0 ; } inline void setsockopt (int option_, const void *optval_, size_t optvallen_) { int rc = zmq_setsockopt (ptr, option_, optval_, optvallen_); if (rc != 0) throw error_t (); } inline void getsockopt (int option_, void *optval_, size_t *optvallen_) { int rc = zmq_getsockopt (ptr, option_, optval_, optvallen_); if (rc != 0) throw error_t (); } inline void bind (const char *addr_) { int rc = zmq_bind (ptr, addr_); if (rc != 0) throw error_t (); } inline void connect (const char *addr_) { int rc = zmq_connect (ptr, addr_); if (rc != 0) throw error_t (); } inline bool send (message_t &msg_, int flags_ = 0) { int rc = zmq_send (ptr, &msg_, flags_); if (rc == 0) return true; if (rc == -1 && zmq_errno () == EAGAIN) return false; throw error_t (); } inline bool recv (message_t *msg_, int flags_ = 0) { int rc = zmq_recv (ptr, msg_, flags_); if (rc == 0) return true; if (rc == -1 && zmq_errno () == EAGAIN) return false; throw error_t (); } private: void *ptr; socket_t (const socket_t&); void operator = (const socket_t&); }; } #endif zeromq-2.2.0.orig/include/zmq.h0000664000000000000000000002270411741762437015113 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_H_INCLUDED__ #define __ZMQ_H_INCLUDED__ #ifdef __cplusplus extern "C" { #endif #include #include #if defined _WIN32 #include #endif /* Handle DSO symbol visibility */ #if defined _WIN32 # if defined DLL_EXPORT # define ZMQ_EXPORT __declspec(dllexport) # else # define ZMQ_EXPORT __declspec(dllimport) # endif #else # if defined __SUNPRO_C || defined __SUNPRO_CC # define ZMQ_EXPORT __global # elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER # define ZMQ_EXPORT __attribute__ ((visibility("default"))) # else # define ZMQ_EXPORT # endif #endif /******************************************************************************/ /* 0MQ versioning support. */ /******************************************************************************/ /* Version macros for compile-time API version detection */ #define ZMQ_VERSION_MAJOR 2 #define ZMQ_VERSION_MINOR 2 #define ZMQ_VERSION_PATCH 0 #define ZMQ_MAKE_VERSION(major, minor, patch) \ ((major) * 10000 + (minor) * 100 + (patch)) #define ZMQ_VERSION \ ZMQ_MAKE_VERSION(ZMQ_VERSION_MAJOR, ZMQ_VERSION_MINOR, ZMQ_VERSION_PATCH) /* Run-time API version detection */ ZMQ_EXPORT void zmq_version (int *major, int *minor, int *patch); /******************************************************************************/ /* 0MQ errors. */ /******************************************************************************/ /* A number random enough not to collide with different errno ranges on */ /* different OSes. The assumption is that error_t is at least 32-bit type. */ #define ZMQ_HAUSNUMERO 156384712 /* On Windows platform some of the standard POSIX errnos are not defined. */ #ifndef ENOTSUP #define ENOTSUP (ZMQ_HAUSNUMERO + 1) #endif #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT (ZMQ_HAUSNUMERO + 2) #endif #ifndef ENOBUFS #define ENOBUFS (ZMQ_HAUSNUMERO + 3) #endif #ifndef ENETDOWN #define ENETDOWN (ZMQ_HAUSNUMERO + 4) #endif #ifndef EADDRINUSE #define EADDRINUSE (ZMQ_HAUSNUMERO + 5) #endif #ifndef EADDRNOTAVAIL #define EADDRNOTAVAIL (ZMQ_HAUSNUMERO + 6) #endif #ifndef ECONNREFUSED #define ECONNREFUSED (ZMQ_HAUSNUMERO + 7) #endif #ifndef EINPROGRESS #define EINPROGRESS (ZMQ_HAUSNUMERO + 8) #endif #ifndef ENOTSOCK #define ENOTSOCK (ZMQ_HAUSNUMERO + 9) #endif /* Native 0MQ error codes. */ #define EFSM (ZMQ_HAUSNUMERO + 51) #define ENOCOMPATPROTO (ZMQ_HAUSNUMERO + 52) #define ETERM (ZMQ_HAUSNUMERO + 53) #define EMTHREAD (ZMQ_HAUSNUMERO + 54) /* This function retrieves the errno as it is known to 0MQ library. The goal */ /* of this function is to make the code 100% portable, including where 0MQ */ /* compiled with certain CRT library (on Windows) is linked to an */ /* application that uses different CRT library. */ ZMQ_EXPORT int zmq_errno (void); /* Resolves system errors and 0MQ errors to human-readable string. */ ZMQ_EXPORT const char *zmq_strerror (int errnum); /******************************************************************************/ /* 0MQ message definition. */ /******************************************************************************/ /* Maximal size of "Very Small Message". VSMs are passed by value */ /* to avoid excessive memory allocation/deallocation. */ /* If VMSs larger than 255 bytes are required, type of 'vsm_size' */ /* field in zmq_msg_t structure should be modified accordingly. */ #define ZMQ_MAX_VSM_SIZE 30 /* Message types. These integers may be stored in 'content' member of the */ /* message instead of regular pointer to the data. */ #define ZMQ_DELIMITER 31 #define ZMQ_VSM 32 /* Message flags. ZMQ_MSG_SHARED is strictly speaking not a message flag */ /* (it has no equivalent in the wire format), however, making it a flag */ /* allows us to pack the stucture tigher and thus improve performance. */ #define ZMQ_MSG_MORE 1 #define ZMQ_MSG_SHARED 128 #define ZMQ_MSG_MASK 129 /* Merges all the flags */ /* A message. Note that 'content' is not a pointer to the raw data. */ /* Rather it is pointer to zmq::msg_content_t structure */ /* (see src/msg_content.hpp for its definition). */ typedef struct { void *content; unsigned char flags; unsigned char vsm_size; unsigned char vsm_data [ZMQ_MAX_VSM_SIZE]; } zmq_msg_t; typedef void (zmq_free_fn) (void *data, void *hint); ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg, size_t size); ZMQ_EXPORT int zmq_msg_init_data (zmq_msg_t *msg, void *data, size_t size, zmq_free_fn *ffn, void *hint); ZMQ_EXPORT int zmq_msg_close (zmq_msg_t *msg); ZMQ_EXPORT int zmq_msg_move (zmq_msg_t *dest, zmq_msg_t *src); ZMQ_EXPORT int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src); ZMQ_EXPORT void *zmq_msg_data (zmq_msg_t *msg); ZMQ_EXPORT size_t zmq_msg_size (zmq_msg_t *msg); /******************************************************************************/ /* 0MQ infrastructure (a.k.a. context) initialisation & termination. */ /******************************************************************************/ ZMQ_EXPORT void *zmq_init (int io_threads); ZMQ_EXPORT int zmq_term (void *context); /******************************************************************************/ /* 0MQ socket definition. */ /******************************************************************************/ /* Socket types. */ #define ZMQ_PAIR 0 #define ZMQ_PUB 1 #define ZMQ_SUB 2 #define ZMQ_REQ 3 #define ZMQ_REP 4 #define ZMQ_DEALER 5 #define ZMQ_ROUTER 6 #define ZMQ_PULL 7 #define ZMQ_PUSH 8 #define ZMQ_XPUB 9 #define ZMQ_XSUB 10 #define ZMQ_XREQ ZMQ_DEALER /* Old alias, remove in 3.x */ #define ZMQ_XREP ZMQ_ROUTER /* Old alias, remove in 3.x */ #define ZMQ_UPSTREAM ZMQ_PULL /* Old alias, remove in 3.x */ #define ZMQ_DOWNSTREAM ZMQ_PUSH /* Old alias, remove in 3.x */ /* Socket options. */ #define ZMQ_HWM 1 #define ZMQ_SWAP 3 #define ZMQ_AFFINITY 4 #define ZMQ_IDENTITY 5 #define ZMQ_SUBSCRIBE 6 #define ZMQ_UNSUBSCRIBE 7 #define ZMQ_RATE 8 #define ZMQ_RECOVERY_IVL 9 #define ZMQ_MCAST_LOOP 10 #define ZMQ_SNDBUF 11 #define ZMQ_RCVBUF 12 #define ZMQ_RCVMORE 13 #define ZMQ_FD 14 #define ZMQ_EVENTS 15 #define ZMQ_TYPE 16 #define ZMQ_LINGER 17 #define ZMQ_RECONNECT_IVL 18 #define ZMQ_BACKLOG 19 #define ZMQ_RECOVERY_IVL_MSEC 20 /* opt. recovery time, reconcile in 3.x */ #define ZMQ_RECONNECT_IVL_MAX 21 #define ZMQ_RCVTIMEO 27 #define ZMQ_SNDTIMEO 28 /* Send/recv options. */ #define ZMQ_NOBLOCK 1 #define ZMQ_SNDMORE 2 ZMQ_EXPORT void *zmq_socket (void *context, int type); ZMQ_EXPORT int zmq_close (void *s); ZMQ_EXPORT int zmq_setsockopt (void *s, int option, const void *optval, size_t optvallen); ZMQ_EXPORT int zmq_getsockopt (void *s, int option, void *optval, size_t *optvallen); ZMQ_EXPORT int zmq_bind (void *s, const char *addr); ZMQ_EXPORT int zmq_connect (void *s, const char *addr); ZMQ_EXPORT int zmq_send (void *s, zmq_msg_t *msg, int flags); ZMQ_EXPORT int zmq_recv (void *s, zmq_msg_t *msg, int flags); /******************************************************************************/ /* I/O multiplexing. */ /******************************************************************************/ #define ZMQ_POLLIN 1 #define ZMQ_POLLOUT 2 #define ZMQ_POLLERR 4 typedef struct { void *socket; #if defined _WIN32 SOCKET fd; #else int fd; #endif short events; short revents; } zmq_pollitem_t; ZMQ_EXPORT int zmq_poll (zmq_pollitem_t *items, int nitems, long timeout); /******************************************************************************/ /* Built-in devices */ /******************************************************************************/ #define ZMQ_STREAMER 1 #define ZMQ_FORWARDER 2 #define ZMQ_QUEUE 3 ZMQ_EXPORT int zmq_device (int device, void * insocket, void* outsocket); #undef ZMQ_EXPORT #ifdef __cplusplus } #endif #endif zeromq-2.2.0.orig/include/zmq_utils.h0000664000000000000000000000413311732125604016314 0ustar rootroot/* Copyright (c) 2007-2011 iMatix Corporation Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file This file is part of 0MQ. 0MQ is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. 0MQ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ #ifndef __ZMQ_UTILS_H_INCLUDED__ #define __ZMQ_UTILS_H_INCLUDED__ #ifdef __cplusplus extern "C" { #endif /* Handle DSO symbol visibility */ #if defined _WIN32 # if defined DLL_EXPORT # define ZMQ_EXPORT __declspec(dllexport) # else # define ZMQ_EXPORT __declspec(dllimport) # endif #else # if defined __SUNPRO_C || defined __SUNPRO_CC # define ZMQ_EXPORT __global # elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER # define ZMQ_EXPORT __attribute__ ((visibility("default"))) # else # define ZMQ_EXPORT # endif #endif /* Helper functions are used by perf tests so that they don't have to care */ /* about minutiae of time-related functions on different OS platforms. */ /* Starts the stopwatch. Returns the handle to the watch. */ ZMQ_EXPORT void *zmq_stopwatch_start (void); /* Stops the stopwatch. Returns the number of microseconds elapsed since */ /* the stopwatch was started. */ ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_); /* Sleeps for specified number of seconds. */ ZMQ_EXPORT void zmq_sleep (int seconds_); #undef ZMQ_EXPORT #ifdef __cplusplus } #endif #endif zeromq-2.2.0.orig/version.sh0000775000000000000000000000135511732125604014520 0ustar rootroot#!/bin/sh # # This script extracts the 0MQ version from include/zmq.h, which is the master # location for this information. # if [ ! -f include/zmq.h ]; then echo "version.sh: error: include/zmq.h does not exist" 1>&2 exit 1 fi MAJOR=`egrep '^#define +ZMQ_VERSION_MAJOR +[0-9]+$' include/zmq.h` MINOR=`egrep '^#define +ZMQ_VERSION_MINOR +[0-9]+$' include/zmq.h` PATCH=`egrep '^#define +ZMQ_VERSION_PATCH +[0-9]+$' include/zmq.h` if [ -z "$MAJOR" -o -z "$MINOR" -o -z "$PATCH" ]; then echo "version.sh: error: could not extract version from include/zmq.h" 1>&2 exit 1 fi MAJOR=`echo $MAJOR | awk '{ print $3 }'` MINOR=`echo $MINOR | awk '{ print $3 }'` PATCH=`echo $PATCH | awk '{ print $3 }'` echo $MAJOR.$MINOR.$PATCH | tr -d '\n' zeromq-2.2.0.orig/README0000664000000000000000000000223511732125604013352 0ustar rootrootWelcome ------- The 0MQ lightweight messaging kernel is a library which extends the standard socket interfaces with features traditionally provided by specialised messaging middleware products. 0MQ sockets provide an abstraction of asynchronous message queues, multiple messaging patterns, message filtering (subscriptions), seamless access to multiple transport protocols and more. Building and installation ------------------------- See the INSTALL file included with the distribution. Resources --------- A reference manual is provided with the distribution. Refer to "man zmq" after you have installed 0MQ on your system, or see http://api.zeromq.org. Website: http://www.zeromq.org/ Development mailing list: zeromq-dev@lists.zeromq.org Announcements mailing list: zeromq-announce@lists.zeromq.org Git repository: http://github.com/zeromq/libzmq 0MQ developers can also be found on the IRC channel #zeromq, on the Freenode network (irc.freenode.net). Copying ------- Free use of this software is granted under the terms of the GNU Lesser General Public License (LGPL). For details see the files `COPYING` and `COPYING.LESSER` included with the 0MQ distribution.