[-]
[+]
|
Changed |
glb.changes
|
|
[-]
[+]
|
Changed |
glb.spec
^
|
|
|
Deleted |
glb-0.7.5.tar.bz2
^
|
|
Deleted |
glb-0.8.1.tar.bz2
^
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/ChangeLog
^
|
@@ -1,3 +1,29 @@
+2012-12-05 alex
+- *HOTFIX*: fixed slow MySQL connection initiation due to TCP_DEFER_ACCEPT
+ enabled by default. Now it is an option.
+- added "random" load balancing policy.
+ Version 0.8.2
+
+2012-12-01 alex
+- Fixed privileges issue when using service script and default FIFO location.
+- Implemented maximum connections option which both limits maximum client
+ connections and also tries to increase OS open files limit if necessary.
+- Added MAX_CONN parameter to start/stop script.
+ Version 0.8.1
+
+2012-11-30 alex
+- Fixed obscure connection loss when too many connections are initiated at once.
+- Fixed segfault when -s option was specified.
+- Added TCP_NODELAY option to sockets (on by default)
+- Added start/stop script and config template to run glbd as a "service".
+- Implemented basic IP-based source tracking mechanism
+ (same IP clients directed to the same server).
+ Version 0.8.0
+
+2012-05-17 alex
+- Fixed glb_sockaddr_t initialization + compilation cleanups.
+ Version 0.7.5
+
2010-02-15 teemu
- Fixed usage counting bug when usage could become negative when all
destinations fail simultaneously.
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/INSTALL
^
|
@@ -1,11 +1,13 @@
Installation Instructions
*************************
-Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
+Inc.
- This file is free documentation; the Free Software Foundation gives
-unlimited permission to copy, distribute and modify it.
+ Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without warranty of any kind.
Basic Installation
==================
@@ -13,7 +15,11 @@
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.
+instructions specific to this package. Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below. The lack of an optional feature in a given package is not
+necessarily a bug. More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
@@ -42,7 +48,7 @@
you want to change it or regenerate `configure' using a newer version
of `autoconf'.
-The simplest way to compile this package is:
+ 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.
@@ -53,12 +59,22 @@
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
- the package.
+ the package, generally using the just-built uninstalled binaries.
4. Type `make install' to install the programs and any data files and
- documentation.
+ documentation. When installing into a prefix owned by root, it is
+ recommended that the package be configured and built as a regular
+ user, and only the `make install' phase executed with root
+ privileges.
+
+ 5. Optionally, type `make installcheck' to repeat any self-tests, but
+ this time using the binaries in their final installed location.
+ This target does not install anything. Running this target as a
+ regular user, particularly if the prior `make install' required
+ root privileges, verifies that the installation completed
+ correctly.
- 5. You can remove the program binaries and object files from the
+ 6. 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
@@ -67,8 +83,15 @@
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.
+ 7. Often, you can also type `make uninstall' to remove the installed
+ files again. In practice, not all packages have tested that
+ uninstallation works correctly, even though it is required by the
+ GNU Coding Standards.
+
+ 8. Some packages, particularly those that use Automake, provide `make
+ distcheck', which can by used by developers to test that all other
+ targets like `make install' and `make uninstall' work correctly.
+ This target is generally not run by end users.
Compilers and Options
=====================
@@ -93,7 +116,8 @@
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 `..'.
+source code in the directory that `configure' is in and in `..'. This
+is known as a "VPATH" build.
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
@@ -120,7 +144,8 @@
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'.
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
@@ -131,15 +156,46 @@
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.
+you can set and what kinds of files go in them. In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+ The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+ The first method involves providing an override variable for each
+affected directory. For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'. Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated. The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+ The second method involves providing the `DESTDIR' variable. For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names. The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters. On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
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
@@ -152,6 +208,13 @@
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
+ Some packages offer the ability to configure how verbose the
+execution of `make' will be. For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
Particular systems
==================
@@ -163,6 +226,11 @@
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+ HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved. Use GNU `make'
+instead.
+
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
@@ -288,7 +356,7 @@
`configure' can determine that directory automatically.
`--prefix=DIR'
- Use DIR as the installation prefix. *Note Installation Names::
+ Use DIR as the installation prefix. *note Installation Names::
for more details, including other options available for fine-tuning
the installation locations.
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/Makefile.am
^
|
@@ -1 +1 @@
-SUBDIRS = src doc
+SUBDIRS = src doc files
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/Makefile.in
^
|
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -70,9 +70,11 @@
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)"; }; }
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -101,6 +103,8 @@
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -206,12 +210,12 @@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-SUBDIRS = src doc
+SUBDIRS = src doc files
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@@ -247,10 +251,8 @@
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -270,7 +272,7 @@
# (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):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -295,7 +297,7 @@
fi; test -z "$$fail"
$(RECURSIVE_CLEAN_TARGETS):
- @failcom='exit 1'; \
+ @fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
@@ -459,7 +461,8 @@
fi; \
done
-test -n "$(am__skip_mode_fix)" \
- || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
+ || 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 {} {} \; \
@@ -469,7 +472,11 @@
$(am__remove_distdir)
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
@@ -477,7 +484,7 @@
$(am__remove_distdir)
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
@@ -503,17 +510,19 @@
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(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) gunzip -c $(distdir).shar.gz | unshar ;;\
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
@@ -527,6 +536,7 @@
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -555,8 +565,16 @@
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 \
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@@ -587,10 +605,15 @@
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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -677,17 +700,18 @@
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
- distclean distclean-generic distclean-hdr 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 mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-generic distclean-hdr \
+ 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 mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/README
^
|
@@ -1,5 +1,5 @@
-# Copyright (C) 2007 Codership Oy <info@codership.com>
-
+# Copyright (C) 2007-2012 Codership Oy <info@codership.com>
+
DISCLAIMER:
===========
This program is distributed in the hope that it will be useful, but
@@ -23,13 +23,42 @@
routing performance.
- glb is multithreaded, so it can utilize multiple CPU cores. Also, if your
OS does not support epoll API, consider using several threads even on a
- single clore machine as it will lessen poll() overhead proportionally and
+ single core machine as it will lessen poll() overhead proportionally and
can improve overall performance by a factor of 2 or more.
+
+BALANCING POLICIES:
+===================
+GLB supports 3 balancing "policies":
+
+a) "least connected" - new connection will be directed to the server with least
+ connections (corrected for server "weight"). This is the default policy.
+
+b) "random" - connections are distributed randomly between the servers.
+
+c) "source tracking" - connections originating from the same address are
+ directed to the same server. For details about this policy see below.
+
+LIMITATION: currently "random" and "source tracking" policies don't respect
+node weights.
+
+
+MAXIMUM CONNECTIONS:
+====================
+Maximum connections that can be opened via glb depends on the system open
+files limit and is 493 for a standard limit of 1024. If needed glbd will
+attempt to increase open files limit as much as allowed by the effective
+user privileges. For unprivileged user it is normally 4096 which results
+in max 2029 connections.
+On Linux open files limit may be checked with 'ulimit -n' and if necessary
+increased in /etc/security/limits.conf.
+
+
COMMAND LINE OPTIONS:
=====================
See output of the --help option.
+
RUNTIME MANAGEMENT:
===================
Runtime management can be done either through FIFO file, or network socket.
@@ -92,7 +121,7 @@
fields are all even and go as follows:
2 - number of bytes received on incoming interface (client requests)
- 4 - number of bytes sent from incoming inteface (server responses)
+ 4 - number of bytes sent from incoming interface (server responses)
6 - number of bytes passed through recv() call
8 - number of recv() calls
10 - number of bytes passed through send() call (should be equal to p.6)
@@ -103,10 +132,31 @@
20 - number of write-ready file descriptors returned by poll()/epoll_wait()
22 - number of times poll()/epoll_wait() triggered
24 - time elapsed since last statistics report (seconds)
-
+
All values except for 16 and 24 are totals accumulated since the last report.
In order to obtain some variable rate it must be divided by the elapsed time.
On 32-bit architectures the values are stored in 4-byte integers and can
overflow if too much time elapsed, so the first statistics report in the series
may need to be discarded.
+
+SOURCE TRACKING CAPABILITY:
+===========================
+GLB features simple source tracking capability where connections originating
+from one address can be routed to the same destination, chosen randomly
+(address hash % number of destinations). One limitation of such schema is that
+when the destination list changes, destination choice for new connections
+changes as well while established connections naturally stay unchanged. Also
+when a destination is marked unavailable, all connections that would be routed
+to it will fail over to another, randomly chosen (but the same) destination.
+When the original target becomes available, all new connections will be routed
+back to it.
+
+In other words source tracking should be considered a best effort feature and
+will work best for short-lived connections.
+
+
+RUNNING GLBD AS A "SERVICE":
+============================
+See README in the files/ directory.
+
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/aclocal.m4
^
|
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -13,18 +14,21 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],,
-[m4_warning([this file was generated for autoconf 2.64.
+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'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 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_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -34,7 +38,7 @@
[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], [],
+m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,19 +54,21 @@
# 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])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])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.
+# Copyright (C) 2001, 2003, 2005, 2011 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
+
# 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/../..'.
@@ -144,14 +150,14 @@
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.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 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
+# serial 12
# 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,
@@ -191,6 +197,7 @@
# 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'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -255,7 +262,7 @@
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | 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.
@@ -320,10 +327,13 @@
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -545,12 +555,15 @@
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.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 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_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -682,12 +695,15 @@
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 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_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@@ -710,13 +726,14 @@
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 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
+# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -724,13 +741,13 @@
[[_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)])])
@@ -806,12 +823,14 @@
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 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_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@@ -834,13 +853,13 @@
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 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
+# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@@ -849,13 +868,13 @@
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.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -877,10 +896,11 @@
# 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])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/config.guess
^
|
@@ -1,10 +1,10 @@
#! /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
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2009-04-27'
+timestamp='2012-02-10'
# 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
@@ -17,9 +17,7 @@
# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -27,16 +25,16 @@
# the same distribution terms that you use for the rest of that program.
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> 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.
#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
+# 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,.*/,,'`
@@ -56,8 +54,9 @@
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 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -144,7 +143,7 @@
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*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -170,7 +169,7 @@
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -180,7 +179,7 @@
fi
;;
*)
- os=netbsd
+ os=netbsd
;;
esac
# The OS release
@@ -223,7 +222,7 @@
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
@@ -269,7 +268,10 @@
# 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'`
- exit ;;
+ # 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
@@ -295,7 +297,7 @@
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
- echo powerpc-ibm-os400
+ echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
@@ -333,6 +335,9 @@
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"
@@ -391,23 +396,23 @@
# 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}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
+ exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
+ echo m68k-atari-mint${UNAME_RELEASE}
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
m68k:machten:*:*)
echo m68k-apple-machten${UNAME_RELEASE}
exit ;;
@@ -477,8 +482,8 @@
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
- # DG/UX returns AViiON for all architectures
- UNAME_PROCESSOR=`/usr/bin/uname -p`
+ # 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 ] || \
@@ -491,7 +496,7 @@
else
echo i586-dg-dgux${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
@@ -548,7 +553,7 @@
echo rs6000-ibm-aix3.2
fi
exit ;;
- *:AIX:*:[456])
+ *: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
@@ -591,52 +596,52 @@
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" ;;
+ 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
+ esac ;;
+ esac
fi
if [ "${HP_ARCH}" = "" ]; then
eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >$dummy.c
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- 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);
- }
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ 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
@@ -656,7 +661,7 @@
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -727,22 +732,22 @@
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit ;;
@@ -766,14 +771,14 @@
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 ;;
+ 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}"
+ 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}
@@ -785,13 +790,12 @@
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
exit ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
amd64)
echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
*)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
esac
exit ;;
i*:CYGWIN*:*)
@@ -800,19 +804,22 @@
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
+ i*:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
exit ;;
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd | genuineintel)
+ authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -822,6 +829,9 @@
[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
@@ -851,6 +861,27 @@
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ 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 \
@@ -858,20 +889,40 @@
then
echo ${UNAME_MACHINE}-unknown-linux-gnu
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ 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
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-gnu
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-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
@@ -882,78 +933,34 @@
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- mips:Linux:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips
- #undef mipsel
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ 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 ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- 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 ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ echo ${UNAME_MACHINE}-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
@@ -962,14 +969,17 @@
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ 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
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
@@ -977,75 +987,18 @@
sparc:Linux:*:* | sparc64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
vax:Linux:*:*)
echo ${UNAME_MACHINE}-dec-linux-gnu
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
- i*86:Linux:*:*)
- # The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
- s/[ ][ ]*/ /g
- s/.*supported targets: *//
- s/ .*//
- p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
- esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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
@@ -1053,11 +1006,11 @@
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,
+ # 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.
+ # Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit ;;
i*86:OS/2:*:*)
@@ -1074,7 +1027,7 @@
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1089,7 +1042,7 @@
fi
exit ;;
i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
@@ -1117,13 +1070,13 @@
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.
+ # 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 ;;
+ exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
@@ -1158,8 +1111,8 @@
/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; } ;;
+ /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 \
@@ -1182,7 +1135,7 @@
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1202,10 +1155,10 @@
echo ns32k-sni-sysv
fi
exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
- echo i586-unisys-sysv4
- exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
@@ -1231,11 +1184,11 @@
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
- echo mips-nec-sysv${UNAME_RELEASE}
+ echo mips-nec-sysv${UNAME_RELEASE}
else
- echo mips-unknown-sysv${UNAME_RELEASE}
+ echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
+ exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
@@ -1275,6 +1228,16 @@
*: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}
@@ -1290,6 +1253,9 @@
*: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 ;;
@@ -1335,13 +1301,13 @@
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
+ 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`
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "${UNAME_MACHINE}" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
@@ -1359,6 +1325,9 @@
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1381,11 +1350,11 @@
#include <sys/param.h>
printf ("m68k-sony-newsos%s\n",
#ifdef NEWSOS4
- "4"
+ "4"
#else
- ""
+ ""
#endif
- ); exit (0);
+ ); exit (0);
#endif
#endif
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/config.sub
^
|
@@ -1,10 +1,10 @@
#! /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
-# Free Software Foundation, Inc.
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
+# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2009-04-17'
+timestamp='2012-02-10'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -21,9 +21,7 @@
# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -32,13 +30,16 @@
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# 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.
@@ -72,8 +73,9 @@
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+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."
@@ -120,13 +122,18 @@
# 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-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ 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/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -149,10 +156,13 @@
-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)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -167,10 +177,10 @@
os=-chorusos
basic_machine=$1
;;
- -chorusrdb)
- os=-chorusrdb
+ -chorusrdb)
+ os=-chorusrdb
basic_machine=$1
- ;;
+ ;;
-hiux*)
os=-hiuxwe2
;;
@@ -239,17 +249,22 @@
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| 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 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
+ | epiphany \
| fido | fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
+ | le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | mcore | mep | metag \
@@ -275,27 +290,39 @@
| moxie \
| mt \
| msp430 \
+ | nds32 | nds32le | nds32be \
| nios | nios2 \
| ns16k | ns32k \
+ | open8 \
| or32 \
| pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
+ | rl78 | 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 | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -305,6 +332,21 @@
basic_machine=mt-unknown
;;
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ 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.
@@ -319,25 +361,29 @@
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| 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-* \
+ | be32-* | be64-* \
| bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | 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-* \
+ | hexagon-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
+ | le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -359,24 +405,29 @@
| mmix-* \
| mt-* \
| msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
| nios-* | nios2-* \
| none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pyramid-* \
- | romp-* | rs6000-* \
+ | rl78-* | 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-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
| tron-* \
- | v850-* | v850e-* | vax-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
| we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
@@ -401,7 +452,7 @@
basic_machine=a29k-amd
os=-udi
;;
- abacus)
+ abacus)
basic_machine=abacus-unknown
;;
adobe68k)
@@ -467,11 +518,24 @@
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)
+ cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
@@ -503,7 +567,7 @@
basic_machine=craynv-cray
os=-unicosmp
;;
- cr16)
+ cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
@@ -661,7 +725,6 @@
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
@@ -719,6 +782,9 @@
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -755,10 +821,18 @@
ms1-*)
basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
;;
+ msys)
+ basic_machine=i386-pc
+ os=-msys
+ ;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
@@ -823,6 +897,12 @@
np1)
basic_machine=np1-gould
;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
nsr-tandem)
basic_machine=nsr-tandem
;;
@@ -905,9 +985,10 @@
;;
power) basic_machine=power-ibm
;;
- ppc) basic_machine=powerpc-unknown
+ ppc | ppcbe) basic_machine=powerpc-unknown
;;
- ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
@@ -1001,6 +1082,9 @@
basic_machine=i860-stratus
os=-sysv4
;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
sun2)
basic_machine=m68000-sun
;;
@@ -1057,20 +1141,8 @@
basic_machine=t90-cray
os=-unicos
;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
tile*)
- basic_machine=tile-unknown
+ basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
@@ -1140,6 +1212,9 @@
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
@@ -1237,9 +1312,12 @@
if [ x"$os" != x"" ]
then
case $os in
- # First match some system type aliases
- # that might get confused with valid system types.
+ # 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|'`
;;
@@ -1260,9 +1338,9 @@
# 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* | -sunos | -sunos[34]*\
- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
+ | -*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* \
@@ -1274,8 +1352,9 @@
| -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-newlib* | -linux-uclibc* \
+ | -cygwin* | -msys* | -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* \
@@ -1283,7 +1362,7 @@
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1322,7 +1401,7 @@
-opened*)
os=-openedition
;;
- -os400*)
+ -os400*)
os=-os400
;;
-wince*)
@@ -1371,7 +1450,7 @@
-sinix*)
os=-sysv4
;;
- -tpf*)
+ -tpf*)
os=-tpf
;;
-triton*)
@@ -1416,6 +1495,8 @@
-dicos*)
os=-dicos
;;
+ -nacl*)
+ ;;
-none)
;;
*)
@@ -1438,10 +1519,10 @@
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
+ score-*)
os=-elf
;;
- spu-*)
+ spu-*)
os=-elf
;;
*-acorn)
@@ -1453,8 +1534,17 @@
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
@@ -1474,14 +1564,11 @@
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
;;
- mep-*)
+ mep-*)
os=-elf
;;
mips*-cisco)
@@ -1508,7 +1595,7 @@
*-ibm)
os=-aix
;;
- *-knuth)
+ *-knuth)
os=-mmixware
;;
*-wec)
@@ -1613,7 +1700,7 @@
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/configure
^
|
@@ -1,13 +1,15 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64 for glb 0.7.4.
+# Generated by GNU Autoconf 2.68 for glb 0.8.2.
#
# Report bugs to <info@codership.com>.
#
+#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
+# 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.
## -------------------- ##
@@ -89,6 +91,7 @@
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
@@ -214,11 +217,18 @@
# 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
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ 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 :
@@ -317,7 +327,7 @@
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"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -357,19 +367,19 @@
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ 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: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -527,10 +537,11 @@
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# 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`
@@ -549,8 +560,8 @@
# Identity of this package.
PACKAGE_NAME='glb'
PACKAGE_TARNAME='glb'
-PACKAGE_VERSION='0.7.4'
-PACKAGE_STRING='glb 0.7.4'
+PACKAGE_VERSION='0.8.2'
+PACKAGE_STRING='glb 0.8.2'
PACKAGE_BUGREPORT='info@codership.com'
PACKAGE_URL=''
@@ -609,6 +620,7 @@
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -784,8 +796,9 @@
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -830,7 +843,7 @@
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"
+ 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
@@ -856,7 +869,7 @@
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"
+ 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
@@ -1060,7 +1073,7 @@
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"
+ 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
@@ -1076,7 +1089,7 @@
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"
+ 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
@@ -1106,8 +1119,8 @@
| --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."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1115,7 +1128,7 @@
# 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'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1125,7 +1138,7 @@
$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}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1133,13 +1146,13 @@
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ 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" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1162,7 +1175,7 @@
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ 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'
@@ -1176,8 +1189,8 @@
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
+ $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
@@ -1192,9 +1205,9 @@
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"
+ 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"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1233,11 +1246,11 @@
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"
+ 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"
+ 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
@@ -1263,7 +1276,7 @@
# 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 glb 0.7.4 to adapt to many kinds of systems.
+\`configure' configures glb 0.8.2 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1277,7 +1290,7 @@
--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
+ -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
@@ -1334,7 +1347,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of glb 0.7.4:";;
+ short | recursive ) echo "Configuration of glb 0.8.2:";;
esac
cat <<\_ACEOF
@@ -1342,12 +1355,12 @@
--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-debug enable debugging code [default=disabled]
+ --enable-debug enable debugging code [[default=disabled]]
--enable-poll use poll() for polling (default: use epoll() if
available)
- --enable-splice use splice() [default=disabled]
- --enable-stats use extensive pool statistics [default=disabled]
+ --enable-splice use splice() [[default=disabled]]
+ --enable-stats use extensive pool statistics [[default=disabled]]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
@@ -1357,7 +1370,7 @@
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CC C compiler command
CFLAGS C compiler flags
@@ -1429,10 +1442,10 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-glb configure 0.7.4
-generated by GNU Autoconf 2.64
+glb configure 0.8.2
+generated by GNU Autoconf 2.68
-Copyright (C) 2009 Free Software Foundation, Inc.
+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
@@ -1476,8 +1489,8 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -1514,8 +1527,8 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1560,8 +1573,8 @@
# 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; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1586,7 +1599,7 @@
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -1597,8 +1610,8 @@
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1610,10 +1623,10 @@
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1649,7 +1662,7 @@
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+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; }
@@ -1672,17 +1685,15 @@
$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;}
-( cat <<\_ASBOX
-## --------------------------------- ##
+( $as_echo "## --------------------------------- ##
## Report this to info@codership.com ##
-## --------------------------------- ##
-_ASBOX
+## --------------------------------- ##"
) | 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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1691,7 +1702,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
@@ -1732,8 +1743,8 @@
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1746,7 +1757,7 @@
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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1764,7 +1775,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1777,7 +1788,7 @@
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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1818,7 +1829,7 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_type
@@ -1830,7 +1841,7 @@
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 { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1885,15 +1896,15 @@
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_func
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 glb $as_me 0.7.4, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+It was created by glb $as_me 0.8.2, which was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2003,11 +2014,9 @@
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -2041,11 +2050,9 @@
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -2058,11 +2065,9 @@
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -2076,11 +2081,9 @@
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -2135,7 +2138,12 @@
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # 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
@@ -2146,18 +2154,22 @@
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ 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"
+ . "$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.
- if test -f "$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
@@ -2226,7 +2238,7 @@
$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
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -2244,16 +2256,22 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ 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 \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -2267,27 +2285,27 @@
# 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_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 test "${ac_cv_build+set}" = set; then :
+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
+ 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
+ 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;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -2305,14 +2323,14 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
+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
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -2320,7 +2338,7 @@
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -2338,14 +2356,14 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
-if test "${ac_cv_target+set}" = set; then :
+if ${ac_cv_target+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "x$target_alias" = x; then
ac_cv_target=$ac_cv_host
else
ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
fi
fi
@@ -2353,7 +2371,7 @@
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical target" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
@@ -2396,7 +2414,7 @@
{ $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 test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2483,11 +2501,11 @@
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+ 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;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2509,7 +2527,7 @@
# 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
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
alias in your environment" "$LINENO" 5
fi
@@ -2519,7 +2537,7 @@
# Ok.
:
else
- as_fn_error "newly created file is older than distributed files!
+ 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
@@ -2573,7 +2591,7 @@
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 test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -2613,7 +2631,7 @@
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 test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -2666,7 +2684,7 @@
{ $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 test "${ac_cv_path_mkdir+set}" = set; then :
+ if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2691,6 +2709,7 @@
fi
+ test -d ./--version && rmdir ./--version
if test "${ac_cv_path_mkdir+set}" = set; then
MKDIR_P="$ac_cv_path_mkdir -p"
else
@@ -2698,7 +2717,6 @@
# 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.
- test -d ./--version && rmdir ./--version
MKDIR_P="$ac_install_sh -d"
fi
fi
@@ -2717,7 +2735,7 @@
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 test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -2757,7 +2775,7 @@
$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 { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2765,7 +2783,7 @@
all:
@echo '@@@%%%=$(MAKE)=@@@%%%'
_ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# 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;;
@@ -2799,7 +2817,7 @@
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
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
fi
fi
@@ -2815,7 +2833,7 @@
# Define the identity of the package.
PACKAGE='glb'
- VERSION='0.7.4'
+ VERSION='0.8.2'
cat >>confdefs.h <<_ACEOF
@@ -2845,11 +2863,11 @@
# 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"}
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -2870,7 +2888,7 @@
then
AM_CFLAGS="-g -O0 -fno-inline"
else
- AM_CFLAGS="-O3 -mtune=i686"
+ AM_CFLAGS="-g -O3"
AM_CPPFLAGS="-DNDEBUG"
fi
if test "$enable_debug" != "no"; then
@@ -2951,7 +2969,7 @@
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 test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -2995,7 +3013,7 @@
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 test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -3065,32 +3083,30 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
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. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
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 conftest.out"
+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 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}: 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:
@@ -3152,62 +3168,28 @@
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $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_set_status 77
-as_fn_error "C++ compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+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
-# 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 the C++ compiler works" >&5
-$as_echo_n "checking whether the C++ compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { 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: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# 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; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $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"
@@ -3237,19 +3219,78 @@
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; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+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 <stdio.h>
+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 test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3289,8 +3330,8 @@
{ { $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; }
+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
@@ -3300,7 +3341,7 @@
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 test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3337,7 +3378,7 @@
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 test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -3470,6 +3511,7 @@
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -3485,7 +3527,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+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
@@ -3494,6 +3536,7 @@
# 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'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -3553,7 +3596,7 @@
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | 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.
@@ -3618,7 +3661,7 @@
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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3658,7 +3701,7 @@
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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3711,7 +3754,7 @@
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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3751,7 +3794,7 @@
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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3810,7 +3853,7 @@
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 test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3854,7 +3897,7 @@
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 test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3908,8 +3951,8 @@
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; }
+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
@@ -3930,15 +3973,15 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
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 test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3975,7 +4018,7 @@
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 test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4053,7 +4096,7 @@
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 test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4152,7 +4195,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+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
@@ -4161,6 +4204,7 @@
# 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'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -4220,7 +4264,7 @@
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | 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.
@@ -4280,7 +4324,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_testcancel in -lpthread" >&5
$as_echo_n "checking for pthread_testcancel in -lpthread... " >&6; }
-if test "${ac_cv_lib_pthread_pthread_testcancel+set}" = set; then :
+if ${ac_cv_lib_pthread_pthread_testcancel+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4314,7 +4358,7 @@
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_testcancel" >&5
$as_echo "$ac_cv_lib_pthread_pthread_testcancel" >&6; }
-if test "x$ac_cv_lib_pthread_pthread_testcancel" = x""yes; then :
+if test "x$ac_cv_lib_pthread_pthread_testcancel" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
@@ -4322,7 +4366,7 @@
LIBS="-lpthread $LIBS"
else
- as_fn_error "*** POSIX threads not found! ***" "$LINENO" 5
+ as_fn_error $? "*** POSIX threads not found! ***" "$LINENO" 5
fi
@@ -4339,7 +4383,7 @@
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4369,7 +4413,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4385,11 +4429,11 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4428,7 +4472,7 @@
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4444,18 +4488,18 @@
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+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; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -4467,7 +4511,7 @@
{ $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 test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -4516,7 +4560,7 @@
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
+ 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
@@ -4530,7 +4574,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4582,7 +4626,7 @@
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
+ 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
@@ -4597,7 +4641,7 @@
{ $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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4714,8 +4758,7 @@
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
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+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
@@ -4729,8 +4772,7 @@
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"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+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
@@ -4743,7 +4785,7 @@
# Checks for typedefs, structures, and compiler characteristics.
{ $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 test "${ac_cv_header_stdbool_h+set}" = set; then :
+if ${ac_cv_header_stdbool_h+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4775,7 +4817,7 @@
char b[false == 0 ? 1 : -1];
char c[__bool_true_false_are_defined == 1 ? 1 : -1];
char d[(bool) 0.5 == true ? 1 : -1];
- bool e = &s;
+ /* See body of main program for 'e'. */
char f[(_Bool) 0.0 == false ? 1 : -1];
char g[true];
char h[sizeof (_Bool)];
@@ -4786,25 +4828,6 @@
_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];
-# if defined __xlc__ || defined __GNUC__
- /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
- reported by James Lemley on 2005-10-05; see
- http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
- This test is not quite right, since xlc is allowed to
- reject this program, as the initializer for xlcbug is
- not one of the forms that C requires support for.
- However, doing the test right would require a runtime
- test, and that would make cross-compilation harder.
- Let us hope that IBM fixes the xlc bug, and also adds
- support for this kind of constant expression. In the
- meantime, this test will reject xlc, which is OK, since
- our stdbool.h substitute should suffice. We also test
- this with GCC, where it should work, to detect more
- quickly whether someone messes up the test in the
- future. */
- char digs[] = "0123456789";
- int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
-# endif
/* 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
@@ -4816,6 +4839,7 @@
main ()
{
+ bool e = &s;
*pq |= q;
*pq |= ! q;
/* Refer to every declared value, to avoid compiler optimizations. */
@@ -4836,7 +4860,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
$as_echo "$ac_cv_header_stdbool_h" >&6; }
ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
-if test "x$ac_cv_type__Bool" = x""yes; then :
+if test "x$ac_cv_type__Bool" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE__BOOL 1
@@ -4853,7 +4877,7 @@
{ $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 test "${ac_cv_c_const+set}" = set; then :
+if ${ac_cv_c_const+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4933,7 +4957,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
$as_echo_n "checking for inline... " >&6; }
-if test "${ac_cv_c_inline+set}" = set; then :
+if ${ac_cv_c_inline+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_c_inline=no
@@ -4974,7 +4998,7 @@
esac
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
else
@@ -4986,7 +5010,7 @@
{ $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 test "${ac_cv_header_time+set}" = set; then :
+if ${ac_cv_header_time+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5021,7 +5045,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
$as_echo_n "checking for working volatile... " >&6; }
-if test "${ac_cv_c_volatile+set}" = set; then :
+if ${ac_cv_c_volatile+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5057,7 +5081,7 @@
# Checks for library functions.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
$as_echo_n "checking for error_at_line... " >&6; }
-if test "${ac_cv_lib_error_at_line+set}" = set; then :
+if ${ac_cv_lib_error_at_line+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5093,7 +5117,7 @@
for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
@@ -5104,7 +5128,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
-if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -5159,7 +5183,7 @@
{ $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 test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5272,7 +5296,7 @@
for ac_header in stdlib.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STDLIB_H 1
_ACEOF
@@ -5283,7 +5307,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
-if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then :
+if ${ac_cv_func_realloc_0_nonnull+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
@@ -5340,8 +5364,7 @@
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+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
@@ -5354,18 +5377,18 @@
for ac_header in poll.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default"
-if test "x$ac_cv_header_poll_h" = x""yes; then :
+if test "x$ac_cv_header_poll_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_POLL_H 1
_ACEOF
ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll"
-if test "x$ac_cv_func_poll" = x""yes; then :
+if test "x$ac_cv_func_poll" = xyes; then :
POLL="POLL"
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 "*** poll() not found! ***
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "*** poll() not found! ***
+See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -5373,8 +5396,8 @@
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 "*** poll.h not found! ***
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "*** poll.h not found! ***
+See \`config.log' for more details" "$LINENO" 5; }
fi
@@ -5386,12 +5409,12 @@
for ac_header in sys/epoll.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_epoll_h" = x""yes; then :
+if test "x$ac_cv_header_sys_epoll_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_EPOLL_H 1
_ACEOF
ac_fn_c_check_func "$LINENO" "epoll_create" "ac_cv_func_epoll_create"
-if test "x$ac_cv_func_epoll_create" = x""yes; then :
+if test "x$ac_cv_func_epoll_create" = xyes; then :
POLL="EPOLL"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: epoll API not found, trying poll()" >&5
@@ -5412,7 +5435,7 @@
for ac_func in splice
do :
ac_fn_c_check_func "$LINENO" "splice" "ac_cv_func_splice"
-if test "x$ac_cv_func_splice" = x""yes; then :
+if test "x$ac_cv_func_splice" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SPLICE 1
_ACEOF
@@ -5447,7 +5470,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: ----------------------" >&5
$as_echo "$as_me: ----------------------" >&6;}
-ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile"
+ac_config_files="$ac_config_files Makefile doc/Makefile src/Makefile files/Makefile"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
@@ -5513,10 +5536,21 @@
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ 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;}
- cat confcache >$cache_file
+ 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;}
@@ -5532,6 +5566,7 @@
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$//'
@@ -5555,31 +5590,31 @@
fi
if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then
- as_fn_error "conditional \"ENABLE_DEBUG\" was never defined.
+ as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_SPLICE_TRUE}" && test -z "${ENABLE_SPLICE_FALSE}"; then
- as_fn_error "conditional \"ENABLE_SPLICE\" was never defined.
+ as_fn_error $? "conditional \"ENABLE_SPLICE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${ENABLE_STATS_TRUE}" && test -z "${ENABLE_STATS_FALSE}"; then
- as_fn_error "conditional \"ENABLE_STATS\" was never defined.
+ as_fn_error $? "conditional \"ENABLE_STATS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
+ as_fn_error $? "conditional \"AMDEP\" 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.
+ as_fn_error $? "conditional \"am__fastdepCXX\" 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.
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -5680,6 +5715,7 @@
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
@@ -5725,19 +5761,19 @@
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# 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.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ 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: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -5933,7 +5969,7 @@
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"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -5986,8 +6022,8 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by glb $as_me 0.7.4, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+This file was extended by glb $as_me 0.8.2, which was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6027,6 +6063,7 @@
-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
@@ -6049,12 +6086,13 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-glb config.status 0.7.4
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+glb config.status 0.8.2
+configured by $0, generated by GNU Autoconf 2.68,
+ with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+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."
@@ -6072,11 +6110,16 @@
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
@@ -6090,12 +6133,15 @@
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;;
@@ -6108,7 +6154,7 @@
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -6117,7 +6163,7 @@
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -6176,8 +6222,9 @@
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "files/Makefile") CONFIG_FILES="$CONFIG_FILES files/Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -6200,9 +6247,10 @@
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $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
}
@@ -6210,12 +6258,13 @@
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || 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.
@@ -6232,12 +6281,12 @@
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -6246,18 +6295,18 @@
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 '$'`
+ 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
+ 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
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6265,7 +6314,7 @@
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -6279,7 +6328,7 @@
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -6293,7 +6342,7 @@
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
@@ -6313,7 +6362,7 @@
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -6345,21 +6394,29 @@
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+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 $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# 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[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ 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
@@ -6371,7 +6428,7 @@
# 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 >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -6383,11 +6440,11 @@
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ 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
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -6472,7 +6529,7 @@
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -6485,7 +6542,7 @@
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6504,7 +6561,7 @@
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) 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 `:'.
@@ -6513,7 +6570,7 @@
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ 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'"
@@ -6539,8 +6596,8 @@
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -6676,23 +6733,24 @@
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+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' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { 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
+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;}
+which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) 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
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -6701,21 +6759,21 @@
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ && 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 "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ 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 "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ && 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"
@@ -6865,7 +6923,7 @@
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -6886,7 +6944,7 @@
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 $?
+ $ac_cs_success || as_fn_exit 1
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
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/configure.ac
^
|
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
-AC_INIT(glb, 0.7.4, info@codership.com)
+AC_INIT(glb, 0.8.2, info@codership.com)
AC_CONFIG_SRCDIR([src/glb_main.c])
AC_CONFIG_HEADER([config.h])
AC_CANONICAL_SYSTEM
@@ -20,7 +20,7 @@
then
AM_CFLAGS="-g -O0 -fno-inline"
else
- AM_CFLAGS="-O3 -mtune=i686"
+ AM_CFLAGS="-g -O3"
AM_CPPFLAGS="-DNDEBUG"
fi
AM_CONDITIONAL(ENABLE_DEBUG, test "$enable_debug" != "no")
@@ -127,5 +127,6 @@
AC_CONFIG_FILES([Makefile
doc/Makefile
- src/Makefile])
+ src/Makefile
+ files/Makefile])
AC_OUTPUT
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/depcomp
^
|
@@ -1,10 +1,10 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-12-04.11; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
+# 2011 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
@@ -44,7 +44,7 @@
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.
+ tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@@ -90,10 +90,18 @@
# 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"
+ cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 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=msvc7
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
@@ -158,10 +166,12 @@
' < "$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.
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
## 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"
+ sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -405,6 +415,52 @@
rm -f "$tmpdepfile"
;;
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # 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
+ ;;
+
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
@@ -503,7 +559,9 @@
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/doc/Makefile.am
^
|
@@ -1,9 +1,9 @@
# Copyright (C) 2007 Codership Oy <info@codership.com>
-#
+#
# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
+# 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.
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/doc/Makefile.in
^
|
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -16,11 +16,11 @@
@SET_MAKE@
# Copyright (C) 2007 Codership Oy <info@codership.com>
-#
+#
# This file is free software; as a special exception the author gives
-# unlimited permission to copy and/or distribute it, with or without
+# 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.
@@ -246,10 +246,15 @@
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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files
^
|
+(directory)
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files/Makefile.am
^
|
@@ -0,0 +1,11 @@
+# Copyright (C) 2012 Codership Oy <info@codership.com>
+#
+# This file is free software; as a special exception the author 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.
+
+DISTFILES = Makefile.am Makefile.in README glbd.cfg glbd.sh
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files/Makefile.in
^
|
@@ -0,0 +1,349 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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@
+
+# Copyright (C) 2012 Codership Oy <info@codership.com>
+#
+# This file is free software; as a special exception the author 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.
+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@
+target_triplet = @target@
+subdir = files
+DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+SOURCES =
+DIST_SOURCES =
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_CFLAGS = @AM_CFLAGS@
+AM_CPPFLAGS = @AM_CPPFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+OBJEXT = @OBJEXT@
+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@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+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@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+DISTFILES = Makefile.am Makefile.in README glbd.cfg glbd.sh
+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) --gnu files/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu files/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):
+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:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+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 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
+
+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 distclean \
+ distclean-generic 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 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:
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files/README
^
|
@@ -0,0 +1,38 @@
+FILES IN THIS DIRECTORY
+
+glbd.sh, glbd.cfg:
+ start/stop script and configuration template to run glbd as a "service".
+
+Usage:
+ glbd.sh should be placed into /etc/init.d/glbd
+ glbd.cnf should be placed into /etc/sysconfig/glbd on Red Hat and
+ derivative systems and /etc/default/glbd on Debian and
+ derivatives. Read and edit to your liking.
+
+Examples:
+# service glbd restart
+[Sat Dec 1 13:43:52 EET 2012] glbd: restarting...
+[Sat Dec 1 13:43:52 EET 2012] glbd: stopping... done.
+[Sat Dec 1 13:43:52 EET 2012] glbd: starting...
+[Sat Dec 1 13:43:52 EET 2012] glbd: waiting for lingering sockets to clear up...
+Incoming address: 0.0.0.0:3306 , control FIFO: /var/run/glbd.fifo
+Control address: 127.0.0.1:8011
+Number of threads: 2, max connections: 509, nodelay: ON, source tracking: OFF, verbose: OFF, daemon: YES
+Destinations: 3
+ 0: 127.0.0.1:3305 , w: 1.000
+ 1: 127.0.0.1:3304 , w: 1.000
+ 2: 127.0.0.1:3303 , w: 1.000
+ INFO: glb_daemon.c:43: Setting user to 'daemon'
+[Sat Dec 1 13:43:53 EET 2012] glbd: started, pid=27723
+
+# service glbd remove 127.0.0.1:3304
+[Sat Dec 1 13:44:34 EET 2012] glbd: removed '127.0.0.1:3304' successfully
+
+# service glbd getinfo
+Router:
+----------------------------------------------------
+ Address : weight usage conns
+ 127.0.0.1:3305 : 1.000 0.000 0
+ 127.0.0.1:3303 : 1.000 0.000 0
+----------------------------------------------------
+Destinations: 2, total connections: 0
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files/glbd.cfg
^
|
@@ -0,0 +1,37 @@
+# This is a configuration file for glbd service script
+#
+# On Red Hat and derivatives it should be placed in /etc/sysconfig/glbd
+#
+# On Debian and derivatives it should be placed in /etc/default/glbd
+#
+# All settings besides LISTEN_ADDR are optional.
+#
+
+# Address to listen for client connections at. Mandatory parameter.
+# To bind to all interfaces only port should be specified.
+#LISTEN_ADDR="8010"
+
+# Address for controlling connection. Mandatory part is port.
+# If not specified control socket will not be opened
+#CONTROL_ADDR="127.0.0.1:8011"
+
+# Control FIFO name. It is opened always. glbd will refuse to start if
+# this file already exists.
+#CONTROL_FIFO="/var/run/glbd.fifo"
+
+# Number of threads (connection pools) to use. It is always a good idea
+# to have a few per CPU core.
+#THREADS="2"
+
+# Maximum connections. System open files limit will be modified to accommodate
+# at least that many client connections provided sufficient privileges.
+# Normally you should set it if you plan to go above 500.
+#MAX_CONN=
+
+# Target servers for client connections, space separated.
+# Target specification: IP[:PORT[:WEIGHT]] (WEIGHT and PORT optional)
+# WEIGHT defaults to 1, PORT defaults to LISTEN_ADDR port.
+#DEFAULT_TARGETS="127.0.0.1:80 10.0.0.1:80 10.0.0.2:80:2"
+
+# Other glbd options if any as they would appear on the command line.
+#OTHER_OPTIONS=""
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/files/glbd.sh
^
|
@@ -0,0 +1,232 @@
+#!/bin/sh
+#
+# Author: Daniel (thehazard@gmail.com), Codership Oy (info@codership.com)
+# Copyright: this script is Public Domain.
+#
+# This script is provided as is, without any guarantees, including that
+# of suitability for any purpose.
+#
+# glbd Start/Stop the Galera Load Balancer daemon.
+#
+# processname: glbd
+# chkconfig: 2345 90 60
+# description: GLB is a TCP load balancer similar to Pen. \
+# It lacks most of advanced Pen features, as \
+# the aim was to make a user-space TCP proxy which is \
+# as fast as possible. It can utilize multiple CPU cores. \
+# A list of destinations can be configured at runtime. \
+# Destination "draining" is supported. It features \
+# weight-based connection balancing.
+
+### BEGIN INIT INFO
+# Provides: glbd
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: 2345
+# Default-Stop: 90
+# Short-Description: run glbd daemon
+# Description: GLB is a TCP load balancer similar to Pen.
+### END INIT INFO
+
+prog="glbd"
+proc=glbd
+EXEC_PATH=/usr/local/sbin:/usr/sbin
+PID_FILE="/var/run/$prog.pid"
+CONTROL_FIFO="/var/run/$prog.fifo"
+THREADS=4
+
+if [ -f /etc/redhat-release ]
+then
+ config=/etc/sysconfig/glbd
+else
+ config=/etc/default/glbd
+fi
+
+. $config
+
+LISTEN_PORT=$(echo $LISTEN_ADDR | awk -F ':' '{ print $2 }')
+[ -z "$LISTEN_PORT" ] && LISTEN_PORT=$LISTEN_ADDR
+
+if [ -n "$CONTROL_ADDR" ]; then
+ CONTROL_PORT=$(echo $LISTEN_ADDR | awk -F ':' '{ print $2 }')
+ if [ -n "$CONTROL_PORT" ]; then # CONTROL_ADDR has both address and port
+ CONTROL_IP=$(echo $LISTEN_ADDR | awk -F ':' '{ print $1 }')
+ else # CONTROL_ADDR contains only port
+ CONTROL_PORT=$CONTROL_ADDR
+ CONTROL_IP="127.0.0.1"
+ fi
+else
+ CONTROL_IP=""
+ CONTROL_PORT=""
+fi
+
+wait_for_connections_to_drop() {
+ while (netstat -na | grep -m 1 ":$LISTEN_PORT " > /dev/null); do
+ echo "[`date`] $prog: waiting for lingering sockets to clear up..."
+ sleep 1s
+ done;
+ return 0
+}
+
+stop() {
+ [ -f "$PID_FILE" ] && PID=$(cat $PID_FILE) || PID=""
+ if [ -z "$PID" ]; then
+ echo "No valid PID file found at '$PID_FILE'"
+ return
+ fi
+ echo -n "[`date`] $prog: stopping... "
+ kill $PID > /dev/null
+ if [ $? -ne 0 ]; then
+ echo "failed."
+ return
+ fi
+ echo "done."
+ rm $PID_FILE
+ rm $CONTROL_FIFO
+}
+
+start() {
+ exec=$( PATH=$EXEC_PATH:/usr/bin:/bin which $prog | \
+ grep -E $(echo $EXEC_PATH | sed 's/:/|/') )
+ if [ -z "$exec" ]; then
+ echo "[`date`] '$prog' not found in $EXEC_PATH."
+ exit 1
+ fi
+ [ -f "$PID_FILE" ] && PID=$(cat $PID_FILE) || PID=""
+ if [ -n "$PID" ] ; then
+ echo "[`date`] $prog: already running (PID: $PID)...";
+ exit 1
+ fi
+ if [ -z "$LISTEN_PORT" ]; then
+ echo "[`date`] $prog: no port to listen at, check configuration.";
+ exit 1
+ fi
+ echo "[`date`] $prog: starting..."
+ wait_for_connections_to_drop
+ rm -rf $CONTROL_FIFO > /dev/null
+ GLBD_OPTIONS="--fifo=$CONTROL_FIFO --threads=$THREADS --daemon $OTHER_OPTIONS"
+ [ -n "$MAX_CONN" ] && GLBD_OPTIONS="$GLBD_OPTIONS --connections=$MAX_CONN"
+ [ -n "$CONTROL_ADDR" ] && GLBD_OPTIONS="$GLBD_OPTIONS --control=$CONTROL_ADDR"
+ $exec $GLBD_OPTIONS $LISTEN_ADDR $DEFAULT_TARGETS
+ PID=`pidof $exec`
+ if [ $? -ne 0 ]; then
+ echo "[`date`] $prog: failed to start."
+ exit 1
+ fi
+ echo "[`date`] $prog: started, pid=$PID"
+ echo $PID > "$PID_FILE"
+ exit 0
+}
+
+restart() {
+ echo "[`date`] $prog: restarting..."
+ stop
+ start
+}
+
+getinfo() {
+ if [ -z "$CONTROL_PORT" ]; then
+ echo "Port for control communication is not configured."
+ exit 1
+ fi
+ echo getinfo | nc $CONTROL_IP $CONTROL_PORT && exit 0
+ echo "[`date`] $prog: failed to query 'getinfo' from '$CONTROL_ADDR'"
+ exit 1
+}
+
+getstats() {
+ if [ -z "$CONTROL_PORT" ]; then
+ echo "Port for control communication is not configured."
+ exit 1
+ fi
+ echo getstats | nc $CONTROL_IP $CONTROL_PORT && exit 0
+ echo "[`date`] $prog: failed to query 'getstats' from '$CONTROL_ADDR'"
+ exit 1
+}
+
+add() {
+ if [ -z "$CONTROL_PORT" ]; then
+ echo "Port for control communication is not configured."
+ exit 1
+ fi
+ if [ "$1" = "" ]; then
+ echo "Usage: $0 add <ip>:<port>[:<weight>]"
+ exit 1
+ fi
+ if [ "`echo "$1" | nc $CONTROL_IP $CONTROL_PORT`" = "Ok" ]; then
+ echo "[`date`] $prog: added '$1' successfully"
+ #getinfo
+ exit 0
+ fi
+ echo "[`date`] $prog: failed to add target '$1'."
+ exit 1
+}
+
+remove() {
+ if [ -z "$CONTROL_PORT" ]; then
+ echo "Port for control communication is not configured."
+ exit 1
+ fi
+ if [ "$1" = "" ]; then
+ echo "Usage: $0 remove <ip>:<port>"
+ exit 1
+ fi
+ if [ "`echo "$1:-1" | nc $CONTROL_IP $CONTROL_PORT`" = "Ok" ]; then
+ echo "[`date`] $prog: removed '$1' successfully"
+ #getinfo
+ exit 0
+ fi
+ echo "[`date`] $prog: failed to remove target '$1'."
+ exit 1
+}
+
+drain() {
+ if [ -z "$CONTROL_PORT" ]; then
+ echo "Port for control communication is not configured."
+ exit 1
+ fi
+ if [ "$1" = "" ]; then
+ echo "Usage: $0 drain <ip>:<port>"
+ exit 1
+ fi
+ if [ "`echo "$1:0" | nc $CONTROL_IP $CONTROL_PORT`" = "Ok" ]; then
+ echo "[`date`] $prog: '$1' was set to drain connections"
+ #getinfo
+ exit 0
+ fi
+ echo "[`date`] $prog: failed to set '$1' to drain."
+ exit 1
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ getinfo)
+ getinfo
+ ;;
+ getstats)
+ getstats
+ ;;
+ status)
+ getinfo
+ ;;
+ add)
+ add $2
+ ;;
+ remove)
+ remove $2
+ ;;
+ drain)
+ drain $2
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|status|getstats|getinfo|add|remove|drain}"
+ exit 2
+esac
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/install-sh
^
|
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2011-01-19.21; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -156,6 +156,10 @@
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
shift;;
-T) no_target_directory=true;;
@@ -186,6 +190,10 @@
fi
shift # arg
dst_arg=$arg
+ # Protect names problematic for `test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
done
fi
@@ -200,7 +208,11 @@
fi
if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
@@ -228,9 +240,9 @@
for src
do
- # Protect names starting with `-'.
+ # Protect names problematic for `test' and other utilities.
case $src in
- -*) src=./$src;;
+ -* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
@@ -252,12 +264,7 @@
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.
@@ -385,7 +392,7 @@
case $dstdir in
/*) prefix='/';;
- -*) prefix='./';;
+ [-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
@@ -403,7 +410,7 @@
for d
do
- test -z "$d" && continue
+ test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/missing
^
|
@@ -1,10 +1,10 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-01-06.13; # UTC
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
+# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
@@ -84,7 +84,6 @@
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
@@ -122,15 +121,6 @@
# 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.
@@ -226,7 +216,7 @@
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if test $# -ne 1; then
- eval LASTARG="\${$#}"
+ eval LASTARG=\${$#}
case $LASTARG in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
@@ -256,7 +246,7 @@
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if test $# -ne 1; then
- eval LASTARG="\${$#}"
+ eval LASTARG=\${$#}
case $LASTARG in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
@@ -318,41 +308,6 @@
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.
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/Makefile.am
^
|
@@ -1,5 +1,5 @@
-# Copyright (C) 2008 Codership Oy <info@codership.com>
-# $Id: Makefile.am 37 2008-07-15 17:08:55Z alex $
+# Copyright (C) 2008-2012 Codership Oy <info@codership.com>
+# $Id: Makefile.am 88 2012-12-04 13:03:38Z alex $
sbin_PROGRAMS = glbd
@@ -9,11 +9,13 @@
glb_daemon.c \
glb_socket.c \
glb_dst.c \
+ glb_cnf.c \
glb_cmd.c \
glb_router.c \
glb_pool.c \
glb_listener.c \
glb_control.c \
+ glb_limits.c \
glb_main.c \
*.h
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/Makefile.in
^
|
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 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.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -15,8 +15,8 @@
@SET_MAKE@
-# Copyright (C) 2008 Codership Oy <info@codership.com>
-# $Id: Makefile.am 37 2008-07-15 17:08:55Z alex $
+# Copyright (C) 2008-2012 Codership Oy <info@codership.com>
+# $Id: Makefile.am 88 2012-12-04 13:03:38Z alex $
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
@@ -53,9 +53,9 @@
PROGRAMS = $(sbin_PROGRAMS)
am_glbd_OBJECTS = glb_log.$(OBJEXT) glb_signal.$(OBJEXT) \
glb_daemon.$(OBJEXT) glb_socket.$(OBJEXT) glb_dst.$(OBJEXT) \
- glb_cmd.$(OBJEXT) glb_router.$(OBJEXT) glb_pool.$(OBJEXT) \
- glb_listener.$(OBJEXT) glb_control.$(OBJEXT) \
- glb_main.$(OBJEXT)
+ glb_cnf.$(OBJEXT) glb_cmd.$(OBJEXT) glb_router.$(OBJEXT) \
+ glb_pool.$(OBJEXT) glb_listener.$(OBJEXT) \
+ glb_control.$(OBJEXT) glb_limits.$(OBJEXT) glb_main.$(OBJEXT)
glbd_OBJECTS = $(am_glbd_OBJECTS)
glbd_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
@@ -181,11 +181,13 @@
glb_daemon.c \
glb_socket.c \
glb_dst.c \
+ glb_cnf.c \
glb_cmd.c \
glb_router.c \
glb_pool.c \
glb_listener.c \
glb_control.c \
+ glb_limits.c \
glb_main.c \
*.h
@@ -260,7 +262,7 @@
clean-sbinPROGRAMS:
-test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
-glbd$(EXEEXT): $(glbd_OBJECTS) $(glbd_DEPENDENCIES)
+glbd$(EXEEXT): $(glbd_OBJECTS) $(glbd_DEPENDENCIES) $(EXTRA_glbd_DEPENDENCIES)
@rm -f glbd$(EXEEXT)
$(LINK) $(glbd_OBJECTS) $(glbd_LDADD) $(LIBS)
@@ -271,9 +273,11 @@
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_cmd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_cnf.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_control.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_daemon.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_dst.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_limits.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_listener.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_log.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glb_main.Po@am__quote@
@@ -394,10 +398,15 @@
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
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_cmd.c
^
|
@@ -1,9 +1,16 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_cmd.c 75 2009-10-29 19:32:38Z alex $
+ * $Id: glb_cmd.c 89 2012-12-05 17:59:30Z alex $
*/
+#define GLB_CNF_ACCESS
+
+#include "glb_cmd.h"
+#include "glb_log.h"
+#include "glb_limits.h"
+#include "glb_socket.h"
+
#include <stddef.h> // ptrdiff_t
#include <string.h>
#include <errno.h>
@@ -17,20 +24,17 @@
#define RA required_argument
#define OA optional_argument
-#include "../config.h" // for version
-#include "glb_log.h"
-#include "glb_cmd.h"
-#include "glb_socket.h"
-
-extern bool glb_verbose;
-
typedef enum cmd_opt
{
CMD_OPT_VERSION = 'V',
+ CMD_OPT_DEFER_ACCEPT = 'a',
CMD_OPT_CONTROL = 'c',
CMD_OPT_DAEMON = 'd',
CMD_OPT_FIFO = 'f',
CMD_OPT_HELP = 'h',
+ CMD_OPT_MAX_CONN = 'm',
+ CMD_OPT_NODELAY = 'n',
+ CMD_OPT_RANDOM = 'r',
CMD_OPT_SRC_TRACKING = 's',
CMD_OPT_N_THREADS = 't',
CMD_OPT_VERBOSE = 'v',
@@ -39,10 +43,15 @@
static option_t cmd_options[] =
{
{ "version", NA, NULL, CMD_OPT_VERSION },
+ { "defer-accept", NA, NULL, CMD_OPT_DEFER_ACCEPT },
{ "control", RA, NULL, CMD_OPT_CONTROL },
{ "daemon", NA, NULL, CMD_OPT_DAEMON },
{ "fifo", RA, NULL, CMD_OPT_FIFO },
{ "help", NA, NULL, CMD_OPT_HELP },
+ { "max_conn", RA, NULL, CMD_OPT_MAX_CONN },
+ { "connections", RA, NULL, CMD_OPT_MAX_CONN },
+ { "nodelay", NA, NULL, CMD_OPT_NODELAY },
+ { "random", NA, NULL, CMD_OPT_RANDOM },
{ "src_tracking", NA, NULL, CMD_OPT_SRC_TRACKING },
{ "source_tracking", NA, NULL, CMD_OPT_SRC_TRACKING },
{ "threads", RA, NULL, CMD_OPT_N_THREADS },
@@ -61,59 +70,52 @@
"Usage:\n %s [OPTIONS] LISTEN_ADDRESS "
"[DESTINATION_LIST]\nOPTIONS:\n", progname);
fprintf (out,
- " --help this help message.\n");
- fprintf (out,
- " --daemon run as a daemon.\n");
+ " -h|--help this help message.\n");
fprintf (out,
- " --fifo <fifo name> name of the FIFO file for control.\n");
+ " -a|--defer-accept "
+ "enable TCP_DEFER_ACCEPT on the listening socket\n"
+ " (default: disabled).\n");
fprintf (out,
- " --control [HOST:]PORT "
+ " -c|--control [HOST:]PORT "
"listen for control requests on this address.\n");
fprintf (out,
- " --threads N "
- "number of working threads (connection pools).\n");
+ " -d|--daemon run as a daemon.\n");
+ fprintf (out,
+ " -f|--fifo <fifo name> name of the FIFO file for control.\n");
+ fprintf (out,
+ " -m|--max_conn N "
+ "maximum allowed number of client connections (OS dependent).\n");
fprintf (out,
- " --source_tracking "
+ " -n|--nodelay "
+ "*DISABLE* TCP_NODELAY socket option\n"
+ " (default: enabled).\n");
+ fprintf (out,
+ " -r|--random "
+ "route connection to randomly selected destination.\n");
+ fprintf (out,
+ " -s|--source_tracking "
"turn on source tracking: route connections from one\n"
- " source to the same destination.\n");
+ " source to the same destination.\n");
+ fprintf (out,
+ " -t|--threads N "
+ "number of working threads (connection pools).\n");
fprintf (out,
- " --verbose turn on verbose reporting.\n");
+ " -v|--verbose turn on verbose reporting.\n");
fprintf (out,
- " --version print program version.\n");
+ " -V|--version print program version.\n");
fprintf (out, "LISTEN_ADDRESS:\n"
- " [IP:]PORT "
- "where to listen for incoming TCP connections.\n");
+ " [IP:]PORT "
+ "where to listen for incoming TCP connections at.\n"
+ " "
+ "(without IP part - bind to all interfaces)\n"
+ );
fprintf (out, "DESTINATION_LIST:\n"
" [H1[:P1[:W1]]] [H2[:P2[:W2]]]... "
" - a space-separated list of destinations\n"
- " in the form address:port:weight.\n");
+ " in the form address:port:weight.\n");
exit (EXIT_FAILURE);
}
-void
-glb_cmd_print (FILE* out, glb_cmd_t* cmd)
-{
- ulong i;
-
- fprintf (out, "Incoming address: %s, ",
- glb_socket_addr_to_string (&cmd->inc_addr));
- fprintf (out, "control FIFO: %s\n", cmd->fifo_name);
- fprintf (out, "Control address: %s\n",
- cmd->ctrl_set ? glb_socket_addr_to_string (&cmd->ctrl_addr) :
- "none");
- fprintf (out, "Number of threads: %lu, source tracking: %s, verbose: %s, "
- "daemon: %s\n",
- cmd->n_threads, cmd->src_tracking ? "ON" : "OFF",
- cmd->verbose ? "ON" : "OFF", cmd->daemonize ? "YES" : "NO");
- fprintf (out, "Destinations: %lu\n", (ulong)cmd->n_dst);
-
- for (i = 0; i < cmd->n_dst; i++) {
- char tmp[256];
- glb_dst_print (tmp, sizeof(tmp), &cmd->dst[i]);
- fprintf (out, " %2lu: %s\n", i, tmp);
- }
-}
-
// parses [addr:]port
static long
cmd_parse_addr (glb_sockaddr_t* addr,
@@ -157,19 +159,19 @@
}
// parses array list of destinations
-static glb_cmd_t*
-cmd_parse_dst_list (const char* dst_list[],
- size_t n_dst,
- ulong default_port)
+static glb_cnf_t*
+cmd_parse_dst_list (const char* const dst_list[],
+ int const n_dst,
+ ulong const default_port,
+ glb_cnf_t* const in)
{
- glb_cmd_t* ret = NULL;
- size_t i;
+ int i;
+ size_t const new_size = sizeof(*in) + n_dst * sizeof(glb_dst_t);
+ glb_cnf_t* out = realloc (in, new_size);
- ret = calloc (sizeof(*ret) + n_dst * sizeof(glb_dst_t), 1);
- if (ret) {
+ if (out) {
for (i = 0; i < n_dst; i++) {
-
- switch (glb_dst_parse (&ret->dst[i], dst_list[i], default_port)) {
+ switch (glb_dst_parse (&out->dst[i], dst_list[i], default_port)) {
case 1:
// default port is assigned glb_dst_parse()
case 2:
@@ -178,13 +180,19 @@
break;
default: // error parsing destination
fprintf (stderr, "Invalid destination spec: %s\n", dst_list[i]);
- free (ret);
+ free (out);
return NULL;
}
}
- ret->n_dst = n_dst;
+ out->n_dst = n_dst;
}
- return ret;
+ else
+ {
+ fprintf (stderr, "Failed to reallocate conf struct to %zu bytes.\n",
+ new_size);
+ }
+
+ return out;
}
// General defaults
@@ -193,122 +201,119 @@
static const char cmd_fifo_name_default[] = "/tmp/glbd.fifo";
static const ulong cmd_min_threads = 1;
-glb_cmd_t*
+void
glb_cmd_parse (int argc, char* argv[])
{
- glb_cmd_t tmp = {{ 0 }}; // initialize to 0
- glb_cmd_t* ret = NULL;
+ glb_cnf_t* tmp = glb_cnf_init(); // initialize to defaults
const char** dst_list = NULL;
long opt = 0;
int opt_idx = 0;
char* endptr;
uint16_t inc_port;
- // Set defaults
- tmp.ctrl_set = false;
- tmp.fifo_name = cmd_fifo_name_default;
- tmp.n_threads = cmd_min_threads;
- tmp.src_tracking = false;
- tmp.verbose = false;
- tmp.daemonize = false;
+ if (!tmp) exit (EXIT_FAILURE);
// parse options
- while ((opt = getopt_long (argc, argv, "c:dfht:svV", cmd_options, &opt_idx))
+ while ((opt = getopt_long(argc,argv,"ac:dfhm:nt:rsvV",cmd_options,&opt_idx))
!= -1) {
switch (opt) {
+ case CMD_OPT_DEFER_ACCEPT:
+ tmp->defer_accept = true;
+ break;
+ case CMD_OPT_CONTROL:
+ if (cmd_parse_addr (&tmp->ctrl_addr, optarg, cmd_ctrl_addr_default))
+ return;
+ tmp->ctrl_set = true;
+ break;
+ case CMD_OPT_DAEMON:
+ tmp->daemonize = true;
+ break;
+ case CMD_OPT_FIFO:
+ tmp->fifo_name = optarg;
+ break;
case '?':
case CMD_OPT_HELP:
glb_cmd_help(stdout, argv[0]);
- exit (-1);
+ exit (EXIT_FAILURE);
break;
- case CMD_OPT_CONTROL:
- if (cmd_parse_addr (&tmp.ctrl_addr, optarg, cmd_ctrl_addr_default))
- return NULL;
- tmp.ctrl_set = true;
+ case CMD_OPT_MAX_CONN:
+ tmp->max_conn = strtol (optarg, &endptr, 10);
+ if ((*endptr != '\0' && *endptr != ' ') || errno) {
+ fprintf (stderr, "Bad max_conn value: %s. Integer expected.\n",
+ optarg);
+ return;
+ }
break;
- case CMD_OPT_FIFO:
- tmp.fifo_name = optarg;
+ case CMD_OPT_NODELAY:
+ tmp->nodelay = false;
break;
case CMD_OPT_N_THREADS:
- tmp.n_threads = strtol (optarg, &endptr, 10);
+ tmp->n_threads = strtol (optarg, &endptr, 10);
if ((*endptr != '\0' && *endptr != ' ') || errno) {
fprintf (stderr, "Bad n_threads value: %s. Integer expected.\n",
optarg);
- return NULL;
+ return;
}
- if (tmp.n_threads<cmd_min_threads) tmp.n_threads = cmd_min_threads;
+ if (tmp->n_threads<cmd_min_threads) tmp->n_threads = cmd_min_threads;
+ break;
+ case CMD_OPT_RANDOM:
+ tmp->policy = GLB_POLICY_RANDOM;
+ break;
+ case CMD_OPT_SRC_TRACKING:
+ tmp->policy = GLB_POLICY_SOURCE;
break;
case CMD_OPT_VERBOSE:
- tmp.verbose = true;
- glb_verbose = true;
+ tmp->verbose = true;
break;
case CMD_OPT_VERSION:
- printf ("%s v%s (%s)\n", PACKAGE, VERSION,
-#if defined(USE_EPOLL)
- "epoll"
-#elif defined(USE_POLL)
- "poll"
-#else
-#error "USE_POLL/USE_EPOLL undefined"
-#endif
- );
+ glb_print_version (stdout);
+ if (argc == 2) exit(0);
break;
- case CMD_OPT_DAEMON:
- tmp.daemonize = true;
- break;
- case CMD_OPT_SRC_TRACKING:
- tmp.src_tracking = true;
default:
- glb_log_warn ("Option '%s'(%d) not supported yet. Ignoring.\n",
- cmd_options[opt].name, opt);
+ glb_log_warn ("Option '%s' (%d) not supported yet. Ignoring.\n",
+ cmd_options[opt_idx].name, opt);
}
}
// first non-option argument
if (optind >= argc) {
fprintf (stderr, "Missing required argument: LISTEN_ADDR.\n");
- return NULL;
+ glb_cmd_help(stderr, argv[0]);
+ exit (EXIT_FAILURE);
}
// parse obligatory incoming address
- if (cmd_parse_addr (&tmp.inc_addr, argv[optind], cmd_inc_addr_default)) {
- return NULL;
+ if (cmd_parse_addr (&tmp->inc_addr, argv[optind], cmd_inc_addr_default)) {
+ return;
}
- inc_port = glb_socket_addr_get_port (&tmp.inc_addr);
+ inc_port = glb_socket_addr_get_port (&tmp->inc_addr);
#if 0 // don't open socket by default for security considerations.
// if control address was not specified
- if (!tmp.ctrl_set) {
+ if (!tmp->ctrl_set) {
char port[6] = { 0, };
snprintf (port, 5, "%hu", inc_port + 1);
- if (cmd_parse_addr (&tmp.ctrl_addr, port, cmd_ctrl_addr_default))
- return NULL;
- tmp.ctrl_set = true;
+ if (cmd_parse_addr (&tmp->ctrl_addr, port, cmd_ctrl_addr_default))
+ return;
+ tmp->ctrl_set = true;
}
#endif
// if number of threads was not specified
- if (!tmp.n_threads) tmp.n_threads = 1;
+ if (!tmp->n_threads) tmp->n_threads = 1;
+
+ if (tmp->max_conn > glb_get_conn_limit()) {
+ int res = glb_set_conn_limit (tmp->max_conn);
+ if (res > 0) tmp->max_conn = res;
+ }
+
+ if (tmp->daemonize) tmp->verbose = false;
// parse destination list
if (++optind < argc) dst_list = (const char**) &(argv[optind]);
assert (argc >= optind);
- ret = cmd_parse_dst_list (dst_list, argc - optind, inc_port);
-
- if (tmp.daemonize) tmp.verbose = false;
-
- if (ret) {
- ret->inc_addr = tmp.inc_addr;
- ret->ctrl_addr = tmp.ctrl_addr;
- ret->ctrl_set = tmp.ctrl_set;
- ret->fifo_name = tmp.fifo_name;
- ret->n_threads = tmp.n_threads;
- ret->verbose = tmp.verbose;
- ret->daemonize = tmp.daemonize;
- ret->src_tracking = tmp.src_tracking;
- }
- return ret;
+ glb_cnf = cmd_parse_dst_list (dst_list, argc - optind, inc_port, tmp);
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_cmd.h
^
|
@@ -1,37 +1,22 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_cmd.h 31 2008-06-30 17:17:14Z alex $
+ * $Id: glb_cmd.h 89 2012-12-05 17:59:30Z alex $
*/
#ifndef _glb_cmd_h_
#define _glb_cmd_h_
-#include <stdlib.h> // for ulong
-#include <stdbool.h> // for bool
-#include <stdio.h> // for FILE and fprintf()
-
-#include "glb_dst.h"
-
-typedef struct glb_cmd
-{
- glb_sockaddr_t inc_addr; // IP to bind listener for incoming connecitons
- glb_sockaddr_t ctrl_addr; // network control interface
- bool ctrl_set; // was set? (false)
- const char* fifo_name; // FIFO file name
- long n_threads; // number of routing threads (1 .. oo)
- bool src_tracking; // connect to the same dst for the same src?
- bool verbose; // be verbose?
- bool daemonize; // become a daemon?
- size_t n_dst; // number of destinations
- glb_dst_t dst[]; // destination descriptions
-} glb_cmd_t;
-
-extern glb_cmd_t*
-glb_cmd_parse (int argc, char* argv[]);
+#include "glb_cnf.h"
+/*!
+ * Parses command line arguments and creates configuration structure
+ * passed in defaults.
+ *
+ * @return updated config structure (maybe realloced) or NULL in case of failure
+ */
extern void
-glb_cmd_print (FILE* out, glb_cmd_t* conf);
+glb_cmd_parse (int argc, char* argv[]);
extern void
glb_cmd_help (FILE* out, const char* progname);
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/src/glb_cnf.c
^
|
@@ -0,0 +1,92 @@
+/*
+ * Copyright (C) 2012 Codership Oy <info@codership.com>
+ *
+ * $Id: glb_cnf.c 89 2012-12-05 17:59:30Z alex $
+ */
+
+#define GLB_CNF_ACCESS
+
+#include "../config.h" // for version
+
+#include "glb_cnf.h"
+#include "glb_limits.h"
+
+glb_cnf_t* glb_cnf = NULL;
+
+#include <string.h>
+
+static const char default_fifo_name[] = "/tmp/glbd.fifo";
+
+glb_cnf_t*
+glb_cnf_init ()
+{
+ glb_cnf_t* ret = (glb_cnf_t*)malloc(sizeof(glb_cnf_t));
+
+ if (ret) // init defaults
+ {
+ memset (ret, 0, sizeof(*ret));
+ ret->fifo_name = default_fifo_name;
+ ret->n_threads = 1;
+ ret->max_conn = glb_get_conn_limit();
+ ret->policy = GLB_POLICY_LEAST;
+ ret->nodelay = true;
+ }
+ else
+ {
+ fprintf (stderr, "Could not allocate %zu bytes for config struct.\n",
+ sizeof(*ret));
+ }
+
+ return ret;
+}
+
+static const char* policy_str[GLB_POLICY_MAX] =
+{
+ "least connected", "random", "source"
+};
+
+void
+glb_print_version (FILE* out)
+{
+ fprintf (out, "%s v%s (%s)\n", PACKAGE, VERSION,
+#if defined(USE_EPOLL)
+ "epoll"
+#elif defined(USE_POLL)
+ "poll"
+#else
+#error "USE_POLL/USE_EPOLL undefined"
+#endif
+ );
+}
+
+void
+glb_cnf_print (FILE* out, const glb_cnf_t* cnf)
+{
+ ulong i;
+
+ glb_print_version(out);
+ fprintf (out, "Incoming address: %s, ",
+ glb_socket_addr_to_string (&cnf->inc_addr));
+ fprintf (out, "control FIFO: %s\n", cnf->fifo_name);
+ fprintf (out, "Control address: %s\n",
+ cnf->ctrl_set ? glb_socket_addr_to_string (&cnf->ctrl_addr) :
+ "none");
+ fprintf (out, "Number of threads: %ld, max conn: %ld, policy: '%s', "
+ "nodelay: %s, defer accept: %s, verbose: %s, daemon: %s\n",
+ cnf->n_threads,
+ cnf->max_conn,
+ policy_str[cnf->policy],
+ cnf->nodelay ? "ON" : "OFF",
+ cnf->defer_accept ? "ON" : "OFF",
+ cnf->verbose ? "ON" : "OFF",
+ cnf->daemonize ? "YES" : "NO");
+ fprintf (out, "Destinations: %lu\n", (ulong)cnf->n_dst);
+
+ for (i = 0; i < cnf->n_dst; i++) {
+ char tmp[256];
+ glb_dst_print (tmp, sizeof(tmp), &cnf->dst[i]);
+ fprintf (out, " %2lu: %s\n", i, tmp);
+ }
+}
+
+
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/src/glb_cnf.h
^
|
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2012 Codership Oy <info@codership.com>
+ *
+ * $Id: glb_cnf.h 89 2012-12-05 17:59:30Z alex $
+ */
+
+#ifndef _glb_cnf_h_
+#define _glb_cnf_h_
+
+#include "glb_dst.h"
+
+#include <stdbool.h> // for bool
+#include <stdio.h> // for FILE and fprintf()
+
+typedef enum glb_policy
+{
+ GLB_POLICY_LEAST = 0, /* least conected */
+ GLB_POLICY_RANDOM, /* random choice */
+ GLB_POLICY_SOURCE, /* same for one source */
+ GLB_POLICY_MAX
+} glb_policy_t;
+
+typedef struct glb_cnf
+{
+ glb_sockaddr_t inc_addr; // IP to bind listener for incoming connecitons
+ glb_sockaddr_t ctrl_addr; // network control interface
+ bool ctrl_set; // was set? (false)
+ const char* fifo_name; // FIFO file name
+ long n_threads; // number of routing threads (1 .. oo)
+ long max_conn; // max allowed client connections
+ glb_policy_t policy; // algorithm to use for load-balancing
+ bool nodelay; // use TCP_NODELAY?
+ bool defer_accept; // use TCP_DEFER_ACCEPT?
+ bool verbose; // be verbose?
+ bool daemonize; // become a daemon?
+ size_t n_dst; // number of destinations
+ glb_dst_t dst[]; // destination descriptions
+} glb_cnf_t;
+
+#ifndef GLB_CNF_ACCESS
+extern const glb_cnf_t* const glb_cnf;
+#else
+extern glb_cnf_t* glb_cnf;
+#endif /* GLB_CNF_ACCESS */
+
+extern glb_cnf_t*
+glb_cnf_init ();
+
+extern void
+glb_print_version (FILE* out);
+
+extern void
+glb_cnf_print (FILE* out, const glb_cnf_t* cnf);
+
+#endif // _glb_cnf_h_
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_control.c
^
|
@@ -1,12 +1,19 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_control.c 75 2009-10-29 19:32:38Z alex $
+ * $Id: glb_control.c 88 2012-12-04 13:03:38Z alex $
*/
// keep asserts here for now
#undef NDEBUG
+#include "glb_log.h"
+#include "glb_limits.h"
+#include "glb_signal.h"
+#include "glb_control.h"
+
+#include "glb_cmd.h"
+
#include <pthread.h>
#include <assert.h>
#include <unistd.h>
@@ -23,13 +30,8 @@
// unfotunately I see no way to use glb_pool.c polling code in here
// so it is yet another implementation
#include <poll.h>
-typedef struct pollfd pollfd_t;
-#include "glb_log.h"
-#include "glb_signal.h"
-#include "glb_control.h"
-
-extern bool glb_verbose;
+typedef struct pollfd pollfd_t;
static const char ctrl_getinfo_cmd[] = "getinfo";
static const char ctrl_getstat_cmd[] = "getstat";
@@ -38,13 +40,12 @@
{
CTRL_FIFO = 0,
CTRL_LISTEN,
- CTRL_MAX = 32 // max 30 simultaneous control connections
+ CTRL_MAX = GLB_MAX_CTRL_CONN
} ctrl_fd_t;
struct glb_ctrl
{
pthread_t thread;
- const char* fifo_name;
int fifo;
int inet_sock;
glb_router_t* router;
@@ -220,7 +221,7 @@
// Add to fds and wait for new events
ctrl_add_client (ctrl, client_sock);
- if (glb_verbose) {
+ if (glb_cnf->verbose) {
glb_log_info ("Ctrl: accepted connection from %s\n",
glb_socket_addr_to_string ((glb_sockaddr_t*)&client));
}
@@ -245,64 +246,29 @@
}
glb_ctrl_t*
-glb_ctrl_create (glb_router_t* router,
- glb_pool_t* pool,
- uint16_t port,
- const char* name,
- const glb_sockaddr_t* inet_addr)
+glb_ctrl_create (glb_router_t* const router,
+ glb_pool_t* const pool,
+ uint16_t const port,
+ int const fifo,
+ int const sock)
{
glb_ctrl_t* ret = NULL;
- int inet_sock = 0;
- int fifo;
- const char* fifo_name;
assert (NULL != router);
- assert (NULL != name);
- fifo_name = strdup (name); // for future cleanup
- if (!fifo_name) {
- glb_log_error ("Ctrl: strdup(): %d (%s)", errno, strerror (errno));
- return NULL;
- }
-
- if (mkfifo (fifo_name, S_IRUSR | S_IWUSR)) {
- glb_log_error ("FIFO '%s' already exists. Check that no other "
- "glbd instance is running and delete it "
- "or specify another name with --fifo option.",
- fifo_name);
- goto err;
- }
-
- fifo = open (fifo_name, O_RDWR);
- if (fifo < 0) {
- glb_log_error ("Ctrl: failed to open FIFO file: %d (%s)",
+ if (sock && listen (sock, CTRL_MAX)) {
+ glb_log_error ("Ctrl: listen() failed: %d (%s)",
errno, strerror (errno));
- goto err;
- }
-
- if (inet_addr) {
- inet_sock = glb_socket_create (inet_addr);
- if (inet_sock < 0) {
- glb_log_error ("Ctrl: failed to create listening socket: %d (%s)",
- errno, strerror (errno));
- goto err1;
- }
-
- if (listen (inet_sock, 10)) { // what should be the queue length?
- glb_log_error ("Ctrl: listen() failed: %d (%s)",
- errno, strerror (errno));
- goto err2;
- }
+ return NULL;
}
ret = calloc (1, sizeof (glb_ctrl_t));
if (ret) {
ret->router = router;
ret->pool = pool;
- ret->fifo_name = fifo_name;
ret->fifo = fifo;
- ret->inet_sock = inet_sock;
- ret->fd_max = fifo > inet_sock ? 1 : 2;
+ ret->inet_sock = sock;
+ ret->fd_max = fifo > sock ? 1 : 2;
ret->default_port = port;
ret->fds[CTRL_FIFO].fd = ret->fifo;
@@ -316,7 +282,7 @@
if (pthread_create (&ret->thread, NULL, ctrl_thread, ret)) {
glb_log_error ("Failed to launch ctrl thread.");
free (ret);
- goto err2;
+ return NULL;
}
return ret;
}
@@ -324,13 +290,6 @@
glb_log_error ("Ctrl: out of memory.");
}
-err2:
- close (inet_sock);
-err1:
- close (fifo);
- remove (fifo_name);
-err:
- free ((char*)fifo_name);
return NULL;
}
@@ -338,10 +297,6 @@
glb_ctrl_destroy (glb_ctrl_t* ctrl)
{
pthread_join (ctrl->thread, NULL);
- if (ctrl->fifo) close (ctrl->fifo);
- if (ctrl->inet_sock) close (ctrl->inet_sock);
- remove (ctrl->fifo_name);
- free ((char*)ctrl->fifo_name);
free (ctrl);
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_control.h
^
|
@@ -1,7 +1,7 @@
/*
* Copyright (C) 2008 Codership Oy <info@codership.com>
*
- * $Id: glb_control.h 41 2008-09-14 12:18:24Z alex $
+ * $Id: glb_control.h 82 2012-12-01 15:31:21Z alex $
*/
#ifndef _glb_ctrl_h_
@@ -18,17 +18,17 @@
* @param router
* @param port
* default destination port
- * @param fifo_name
- * unix socket name
- * @param inet_addr
- * interface address for ctrl form another host, may be NULL
+ * @param fifo
+ * control fifo descriptor
+ * @param sock
+ * socket to listen at for ctrl form another host, may be 0
*/
extern glb_ctrl_t*
-glb_ctrl_create (glb_router_t* router,
- glb_pool_t* pool,
- uint16_t port,
- const char* fifo_name,
- const glb_sockaddr_t* inet_addr);
+glb_ctrl_create (glb_router_t* router,
+ glb_pool_t* pool,
+ uint16_t port,
+ int fifo,
+ int sock);
extern void
glb_ctrl_destroy (glb_ctrl_t* ctrl);
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/src/glb_limits.c
^
|
@@ -0,0 +1,88 @@
+/*
+ * Copyright (C) 2012 Codership Oy <info@codership.com>
+ *
+ * System limits
+ *
+ * $Id: glb_limits.c 85 2012-12-01 21:23:20Z alex $
+ */
+
+#define GLB_LIMITS
+
+#include "glb_limits.h"
+#include "glb_log.h"
+
+#include <unistd.h> // sysconf()
+#include <errno.h>
+#include <string.h> // strerror()
+#include <sys/resource.h> // getrlimit()
+
+int glb_page_size = 1 << 12; /* 4K should be default */
+
+int
+glb_get_conn_limit()
+{
+ struct rlimit rlp;
+ if (!getrlimit(RLIMIT_NOFILE, &rlp))
+ {
+ /* Each connection requires two file descriptors plus we need
+ * - socket to accept client connections
+ * - fifo
+ * - control socket
+ * - stdin/stdout (if not in daemon mode)
+ * plus potential control socket connections */
+ return (rlp.rlim_cur - 5 - GLB_MAX_CTRL_CONN) / 2;
+ }
+ else
+ {
+ int err = errno;
+ glb_log_warn("Failed to determine open file limit: %d (%s)",
+ err, strerror(err));
+ return -err;
+ }
+}
+
+int
+glb_set_conn_limit(int val)
+{
+ /* required open files limit for val connections */
+ int const nofiles = (val * 2) + 5 + GLB_MAX_CTRL_CONN;
+
+ struct rlimit rlp = { .rlim_cur = 0, .rlim_max = 0 };
+ getrlimit(RLIMIT_NOFILE, &rlp);
+
+ if (rlp.rlim_cur >= nofiles) return val; // current limits are sufficient
+
+ int const orig_rlim_max = rlp.rlim_max;
+
+ rlp.rlim_cur = nofiles;
+ if (rlp.rlim_max < nofiles) rlp.rlim_max = nofiles;
+ if (setrlimit(RLIMIT_NOFILE, &rlp))
+ {
+ int err = errno;
+ // Most likely this is due to lack of privileges.
+ // Try to raise to max possible.
+ rlp.rlim_max = orig_rlim_max;
+ rlp.rlim_cur = rlp.rlim_max;
+ setrlimit(RLIMIT_NOFILE, &rlp);
+ val = glb_get_conn_limit();
+ glb_log_warn("Failed to increase open files limit to %d: %d (%s). "
+ "Current connection limit: %d",
+ nofiles, err, strerror(err), val);
+ }
+
+ return val;
+}
+
+void glb_limits_init()
+{
+ long const page_size = sysconf(_SC_PAGESIZE);
+ if (page_size > 0)
+ {
+ glb_page_size = page_size;
+ }
+ else
+ {
+ glb_log_warn("Failed to determine memory page size: %d (%s)",
+ errno, strerror(errno));
+ }
+}
|
[-]
[+]
|
Added |
glb-0.8.2.tar.bz2/src/glb_limits.h
^
|
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2012 Codership Oy <info@codership.com>
+ *
+ * System limits
+ *
+ * $Id: glb_limits.h 85 2012-12-01 21:23:20Z alex $
+ */
+
+#ifndef _glb_limits_h_
+#define _glb_limits_h_
+
+#include <sys/time.h>
+#include <time.h>
+
+extern int
+#ifndef GLB_LIMITS
+const
+#endif /* GLB_LIMITS */
+glb_page_size; /* System memory page size */
+
+#define GLB_MAX_CTRL_CONN 32 // maximum connnections to control socket.
+
+extern int glb_get_conn_limit();
+extern int glb_set_conn_limit(int val);
+extern void glb_limits_init();
+
+#endif /* _glb_limits_h_ */
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_listener.c
^
|
@@ -1,21 +1,22 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_listener.c 65 2009-06-06 21:16:51Z alex $
+ * $Id: glb_listener.c 89 2012-12-05 17:59:30Z alex $
*/
+#include "glb_listener.h"
+#include "glb_log.h"
+#include "glb_limits.h"
+#include "glb_cmd.h"
+
#include <pthread.h>
#include <assert.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <poll.h>
-typedef struct pollfd pollfd_t;
-#include "glb_log.h"
-#include "glb_listener.h"
-
-extern bool glb_verbose;
+typedef struct pollfd pollfd_t;
struct glb_listener
{
@@ -29,7 +30,7 @@
listener_thread (void* arg)
{
glb_listener_t* listener = arg;
- pollfd_t pollfd = { .fd = listener->sock, .events = POLLIN, .revents = 0 };
+// pollfd_t pollfd = { .fd = listener->sock, .events = POLLIN, .revents = 0 };
while (1) {
long ret;
@@ -38,14 +39,14 @@
socklen_t client_size;
int server_sock;
glb_sockaddr_t server;
-
+#if REMOVE
ret = poll (&pollfd, 1, -1);
if (ret < 0) {
glb_log_error ("Error waiting for connections: %d (%s)",
errno, strerror (errno));
goto err; //?
}
-
+#endif
assert (1 == ret);
assert (pollfd.revents & POLLIN);
@@ -57,22 +58,25 @@
goto err;
}
- server_sock = glb_router_connect (listener->router, &server);
+ server_sock = glb_router_connect(listener->router, &client ,&server);
if (server_sock < 0) {
- glb_log_error("Failed to connect to destination: %d (%s)",
- errno, strerror(errno));
+ if (server_sock != -EMFILE)
+ glb_log_error("Failed to connect to destination: %d (%s)",
+ -server_sock, strerror(-server_sock));
goto err1;
}
+ glb_socket_setopt(client_sock, GLB_SOCK_NODELAY); // ignore error here
+
ret = glb_pool_add_conn (listener->pool, client_sock, server_sock,
&server);
if (ret < 0) {
glb_log_error ("Failed to add connection to pool: "
- "%d (%s)", errno, strerror (errno));
+ "%d (%s)", -ret, strerror (-ret));
goto err2;
}
- if (glb_verbose) {
+ if (glb_cnf->verbose) {
glb_log_info ("Accepted connection from %s ",
glb_socket_addr_to_string (&client));
glb_log_info ("to %s\n",
@@ -93,20 +97,14 @@
}
glb_listener_t*
-glb_listener_create (glb_sockaddr_t* addr,
- glb_router_t* router,
- glb_pool_t* pool)
+glb_listener_create (glb_router_t* const router,
+ glb_pool_t* const pool,
+ int const sock)
{
- glb_listener_t* ret;
- int sock = glb_socket_create (addr);
+ glb_listener_t* ret = NULL;
- if (sock < 0) {
- glb_log_error ("Failed to create listening socket: %d (%s)",
- errno, strerror (errno));
- return NULL;
- }
-
- if (listen (sock, 10)) { // what should be the queue length?
+ if (listen (sock,
+ glb_cnf->max_conn ? glb_cnf->max_conn : (1U << 14)/* 16K */)){
glb_log_error ("listen() failed: %d (%s)", errno, strerror (errno));
return NULL;
}
@@ -120,11 +118,16 @@
if (pthread_create (&ret->thread, NULL, listener_thread, ret)) {
glb_log_error ("Failed to launch listener thread: %d (%s)",
errno, strerror (errno));
- close (sock);
free (ret);
ret = NULL;
}
}
+ else
+ {
+ glb_log_error ("Failed to allocate listener object: %d (%s)",
+ errno, strerror (errno));
+ }
+
return ret;
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_listener.h
^
|
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_listener.h 20 2008-06-22 01:59:06Z alex $
+ * $Id: glb_listener.h 82 2012-12-01 15:31:21Z alex $
*/
#ifndef _glb_listener_h_
@@ -13,9 +13,7 @@
typedef struct glb_listener glb_listener_t;
extern glb_listener_t*
-glb_listener_create (glb_sockaddr_t* addr,
- glb_router_t* router,
- glb_pool_t* pool);
+glb_listener_create (glb_router_t* router, glb_pool_t* pool, int listen_sock);
extern void
glb_listener_destroy (glb_listener_t* listener);
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_log.c
^
|
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_log.c 67 2009-07-25 13:07:46Z alex $
+ * $Id: glb_log.c 81 2012-12-01 02:19:56Z alex $
*/
#include <stdlib.h>
@@ -68,12 +68,12 @@
switch (level)
{
- case GLB_LOG_FATAL: lvl = " FATAL:"; out = stderr; break;
- case GLB_LOG_ERROR: lvl = " ERROR:"; out = stderr; break;
- case GLB_LOG_WARNING: lvl = "WARNING:"; out = stderr; break;
- case GLB_LOG_INFO: lvl = " INFO:"; break;
- case GLB_LOG_DEBUG: lvl = " DEBUG:"; break;
- default: lvl = "UNKNOWN:"; break;
+ case GLB_LOG_FATAL: lvl = " FATAL: "; out = stderr; break;
+ case GLB_LOG_ERROR: lvl = " ERROR: "; out = stderr; break;
+ case GLB_LOG_WARNING: lvl = "WARNING: "; out = stderr; break;
+ case GLB_LOG_INFO: lvl = " INFO: "; break;
+ case GLB_LOG_DEBUG: lvl = " DEBUG: "; break;
+ default: lvl = "UNKNOWN: "; break;
}
fprintf (out, "%s%s\n", lvl, buf);
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_main.c
^
|
@@ -1,13 +1,12 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_main.c 59 2009-04-16 10:30:17Z alex $
+ * $Id: glb_main.c 89 2012-12-05 17:59:30Z alex $
*/
-#include <unistd.h> // for sleep()
-
#include "glb_cmd.h"
#include "glb_log.h"
+#include "glb_limits.h"
#include "glb_signal.h"
#include "glb_daemon.h"
#include "glb_router.h"
@@ -15,74 +14,158 @@
#include "glb_listener.h"
#include "glb_control.h"
-bool glb_verbose = false;
+#include <unistd.h> // for sleep()
+#include <sys/types.h>
+#include <sys/stat.h> // for mkfifo()
+#include <fcntl.h> // for open()
+#include <errno.h>
+
+/* this function is to allocate all possible resources before dropping
+ * privileges */
+static int
+allocate_resources(const glb_cnf_t* conf,
+ int* ctrl_fifo,
+ int* ctrl_sock,
+ int* listen_sock)
+{
+ if (mkfifo (conf->fifo_name, S_IRUSR | S_IWUSR)) {
+ switch (errno)
+ {
+ case EEXIST:
+ glb_log_error ("FIFO '%s' already exists. Check that no other "
+ "glbd instance is running and delete it "
+ "or specify another name with --fifo option.",
+ conf->fifo_name);
+ break;
+ default:
+ glb_log_error ("Could not create FIFO '%s': %d (%s)",
+ conf->fifo_name, errno, strerror(errno));
+
+ }
+ return 1;
+ }
+
+ *ctrl_fifo = open (conf->fifo_name, O_RDWR);
+ if (*ctrl_fifo < 0) {
+ int err = -(*ctrl_fifo);
+ glb_log_error ("Ctrl: failed to open FIFO file: %d (%s)",
+ err, strerror (err));
+ goto cleanup1;
+ }
+
+ if (conf->ctrl_set) {
+ *ctrl_sock = glb_socket_create (&conf->ctrl_addr,GLB_SOCK_DEFER_ACCEPT);
+ if (*ctrl_sock < 0) {
+ int err = -(*ctrl_sock);
+ glb_log_error ("Ctrl: failed to create listening socket: %d (%s)",
+ err, strerror (err));
+ goto cleanup2;
+ }
+ }
+
+ *listen_sock = glb_socket_create (&conf->inc_addr, GLB_SOCK_DEFER_ACCEPT);
+ if (*listen_sock < 0) {
+ int err = -(*listen_sock);
+ glb_log_error ("Failed to create listening socket: %d (%s)",
+ err, strerror (err));
+ goto cleanup3;
+ }
+
+ return 0;
+
+cleanup3:
+ close (*ctrl_sock);
+ *ctrl_sock = 0;
+cleanup2:
+ close (*ctrl_fifo);
+ *ctrl_fifo = 0;
+cleanup1:
+ remove (glb_cnf->fifo_name);
+
+ return 1;
+}
+
+static void
+free_resources (int const ctrl_fifo, int const ctrl_sock, int const lsock)
+{
+ if (lsock) close (lsock);
+ if (ctrl_sock) close (ctrl_sock);
+ if (ctrl_fifo) {
+ close (ctrl_fifo);
+ remove (glb_cnf->fifo_name);
+ }
+}
int main (int argc, char* argv[])
{
- glb_cmd_t* cmd = glb_cmd_parse (argc, argv);
glb_router_t* router;
glb_pool_t* pool;
glb_listener_t* listener;
glb_ctrl_t* ctrl;
uint16_t inc_port;
- if (!cmd) {
+ int listen_sock, ctrl_fifo, ctrl_sock = 0;
+
+ glb_limits_init();
+
+ glb_cmd_parse (argc, argv);
+ if (!glb_cnf) {
fprintf (stderr, "Failed to parse arguments. Exiting.\n");
exit (EXIT_FAILURE);
}
- glb_cmd_print (stdout, cmd);
+ glb_cnf_print (stdout, glb_cnf);
if (glb_log_init (GLB_LOG_PRINTF)) {
fprintf (stderr, "Failed to initialize logger. Aborting.\n");
exit (EXIT_FAILURE);
}
+ if (allocate_resources (glb_cnf, &ctrl_fifo, &ctrl_sock, &listen_sock)) {
+ glb_log_fatal ("Failed to allocate inital resources. Aborting.\n");
+ exit (EXIT_FAILURE);
+ }
+
glb_signal_set_handler();
- if (cmd->daemonize) {
+ if (glb_cnf->daemonize) {
glb_daemon_start();
// at this point we're a child process
}
- router = glb_router_create (cmd->n_dst, cmd->dst);
+ router = glb_router_create (glb_cnf->n_dst, glb_cnf->dst);
if (!router) {
glb_log_fatal ("Failed to create router. Exiting.");
- exit (EXIT_FAILURE);
+ goto failure;
}
- pool = glb_pool_create (cmd->n_threads, router);
+ pool = glb_pool_create (glb_cnf->n_threads, router);
if (!pool) {
glb_log_fatal ("Failed to create thread pool. Exiting.");
- exit (EXIT_FAILURE);
+ goto failure;
}
- listener = glb_listener_create (&cmd->inc_addr, router, pool);
+ listener = glb_listener_create (router, pool, listen_sock);
if (!listener) {
glb_log_fatal ("Failed to create connection listener. Exiting.");
- exit (EXIT_FAILURE);
+ goto failure;
}
- inc_port = glb_socket_addr_get_port (&cmd->inc_addr);
- if (cmd->ctrl_set) {
- ctrl = glb_ctrl_create (router, pool, inc_port, cmd->fifo_name,
- &cmd->ctrl_addr);
- } else {
- ctrl = glb_ctrl_create (router, pool, inc_port, cmd->fifo_name, NULL);
- }
+ inc_port = glb_socket_addr_get_port (&glb_cnf->inc_addr);
+ ctrl = glb_ctrl_create (router, pool, inc_port, ctrl_fifo, ctrl_sock);
if (!ctrl) {
glb_log_fatal ("Failed to create control thread. Exiting.");
- exit (EXIT_FAILURE);
+ goto failure;
}
- if (cmd->daemonize) {
+ if (glb_cnf->daemonize) {
glb_daemon_ok (); // Tell parent that daemon successfully started
glb_log_info ("Started.");
}
while (!glb_terminate) {
- if (!cmd->daemonize) {
+ if (!glb_cnf->daemonize) {
char stats[BUFSIZ];
glb_router_print_info (router, stats, BUFSIZ);
@@ -96,12 +179,16 @@
}
// cleanup
- glb_ctrl_destroy (ctrl); // removes FIFO file
- // everything else is automatically closed/removed on program exit.
+ glb_ctrl_destroy (ctrl);
- if (cmd->daemonize) {
+ if (glb_cnf->daemonize) {
glb_log_info ("Exit.");
}
+ free_resources (ctrl_fifo, ctrl_sock, listen_sock);
return 0;
+
+failure:
+ free_resources (ctrl_fifo, ctrl_sock, listen_sock);
+ exit (EXIT_FAILURE);
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_pool.c
^
|
@@ -1,9 +1,16 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_pool.c 70 2009-09-10 23:19:34Z alex $
+ * $Id: glb_pool.c 89 2012-12-05 17:59:30Z alex $
*/
+#include "glb_misc.h"
+#include "glb_time.h"
+#include "glb_log.h"
+#include "glb_pool.h"
+
+#include "glb_cmd.h"
+
#include <pthread.h>
#include <stdio.h>
#include <string.h>
@@ -28,13 +35,6 @@
#include <fcntl.h>
#endif
-#include "glb_misc.h"
-#include "glb_time.h"
-#include "glb_log.h"
-#include "glb_pool.h"
-
-extern bool glb_verbose;
-
typedef enum pool_ctl_code
{
POOL_CTL_ADD_CONN,
@@ -110,10 +110,10 @@
#ifdef USE_EPOLL
POOL_FD_READ = EPOLLIN,
POOL_FD_WRITE = EPOLLOUT,
-#else // POLL
+#else /* POLL */
POOL_FD_READ = POLLIN,
POOL_FD_WRITE = POLLOUT,
-#endif // POLL
+#endif /* POLL */
POOL_FD_RW = POOL_FD_READ | POOL_FD_WRITE
} pool_fd_ops_t;
@@ -147,7 +147,7 @@
(tmp_len - pool->fd_max) * sizeof(pollfd_t));
pool->pollfds = tmp;
- pool->pollfds_len = tmp_len;
+ pool->pollfds_len = tmp_len;
}
#ifdef USE_EPOLL
@@ -161,10 +161,10 @@
errno, strerror (errno));
return -errno;
}
-#else // POLL
- pool->pollfds[pool->fd_max].fd = fd;
+#else /* POLL */
+ pool->pollfds[pool->fd_max].fd = fd;
pool->pollfds[pool->fd_max].events = events;
-#endif // POLL
+#endif /* POLL */
ret = pool->fd_max;
@@ -191,7 +191,7 @@
pool_fds_del (pool_t* pool, pool_conn_end_t* end)
{
pool->fd_max--; // pool->fd_max is now the index of the last pollfd
-
+
#ifdef USE_EPOLL
long ret = epoll_ctl (pool->epoll_fd, EPOLL_CTL_DEL, end->sock, NULL);
if (ret) {
@@ -200,7 +200,7 @@
pool->epoll_fd, end->sock, errno, strerror (errno));
return -errno;
}
-#else // POLL
+#else /* POLL */
assert (end->fds_idx <= pool->fd_max);
/*
@@ -217,7 +217,7 @@
end->fds_idx;
// zero-up the last pollfd
pool->pollfds[pool->fd_max] = zero_pollfd;
-#endif // POLL
+#endif /* POLL */
return 0;
}
@@ -234,9 +234,9 @@
errno, strerror(errno));
abort();
}
-#else // POLL
+#else /* POLL */
pool->pollfds[end->fds_idx].events = end->events;
-#endif // POLL
+#endif /* POLL */
}
static inline long
@@ -244,9 +244,9 @@
{
#ifdef USE_EPOLL
return epoll_wait (pool->epoll_fd, pool->pollfds, pool->fd_max, -1);
-#else // POLL
+#else /* POLL */
return poll (pool->pollfds, pool->fd_max, -1);
-#endif // POLL
+#endif /* POLL */
}
// performs necessary magic (adds end-to-end mapping, alters fd_max and fd_min)
@@ -318,7 +318,7 @@
pool->n_conns++; // increment connection count
pool->stats.conns_opened++;
- if (glb_verbose) {
+ if (glb_cnf->verbose) {
glb_log_info ("Pool %ld: added connection, "
"(total pool connections: %ld)", pool->id, pool->n_conns);
}
@@ -523,8 +523,10 @@
else { // some other error
if (errno != EAGAIN) {
ret = -errno;
- glb_log_warn ("pool_handle_read(): %zd (%s)",
- -ret, strerror(-ret));
+ if (errno != ECONNRESET || glb_cnf->verbose) {
+ glb_log_warn ("pool_handle_read(): %zd (%s)",
+ errno, strerror(errno));
+ }
}
}
}
@@ -587,7 +589,7 @@
if (ret < 0) return ret;
}
}
-#else // POLL
+#else /* POLL */
if (pool->pollfds[0].revents & POOL_FD_READ) { // first, check ctl socket
return pool_handle_ctl (pool);
}
@@ -620,7 +622,7 @@
count--;
}
}
-#endif // POLL
+#endif /* POLL */
return 0;
}
@@ -906,8 +908,6 @@
{
size_t len = 0;
long i;
- glb_time_t now;
- double elapsed;
#ifndef GLB_POOL_STATS
len += snprintf (buf + len, buf_len - len, "Pool: connections per thread:");
@@ -919,14 +919,17 @@
GLB_MUTEX_LOCK (&pool->lock);
- now = glb_time_now ();
- elapsed = now - pool->last_info;
+#ifdef GLB_POOL_STATS
+ {
+ glb_time_t now = glb_time_now ();
+ double elapsed = now - pool->last_info;
+#endif
for (i = 0; i < pool->n_pools; i++) {
#ifdef GLB_POOL_STATS
- pool_stats_t s = pool->pool[i].stats;
+ glb_pool_stats_t s = pool->pool[i].stats;
- pool->pool[i].stats = zero_stats;
+ pool->pool[i].stats = glb_zero_stats;
len += snprintf (buf + len, buf_len - len,
"Pool %2ld: conns: %5ld, selects: %9zu (%9.2f sel/sec)\n"
@@ -954,6 +957,11 @@
#endif
}
+#ifdef GLB_POOL_STATS
+ pool->last_info = now;
+ }
+#endif
+
GLB_MUTEX_UNLOCK (&pool->lock);
len += snprintf (buf + len, buf_len - len,"\n");
@@ -962,7 +970,5 @@
return (len - 1);
}
- pool->last_info = now;
-
return len;
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_router.c
^
|
@@ -1,9 +1,15 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_router.c 78 2010-02-16 14:17:33Z alex $
+ * $Id: glb_router.c 89 2012-12-05 17:59:30Z alex $
*/
+#include "glb_log.h"
+#include "glb_cmd.h"
+#include "glb_misc.h"
+#include "glb_socket.h"
+#include "glb_router.h"
+
#include <pthread.h>
#include <stdbool.h>
#include <assert.h>
@@ -12,13 +18,6 @@
#include <unistd.h> // for close()
#include <time.h>
-#include "glb_log.h"
-#include "glb_misc.h"
-#include "glb_socket.h"
-#include "glb_router.h"
-
-extern bool glb_verbose;
-
typedef struct router_dst
{
glb_dst_t dst;
@@ -34,6 +33,8 @@
long busy_count;
long wait_count;
pthread_cond_t free;
+ long conns;
+ unsigned int seed; // seed for rng
long n_dst;
router_dst_t* dst;
};
@@ -104,6 +105,8 @@
assert (d);
assert (i >= 0 && i < router->n_dst);
+ router->conns -= d->conns; assert (router->conns >= 0);
+
if ((i + 1) < router->n_dst) {
// it is not the last, move the rest to close the gap
router_dst_t* next = d + 1;
@@ -146,7 +149,7 @@
}
glb_router_t*
-glb_router_create (size_t n_dst, glb_dst_t dst[])
+glb_router_create (size_t n_dst, glb_dst_t const dst[])
{
glb_router_t* ret = malloc (sizeof (glb_router_t));
@@ -159,6 +162,8 @@
glb_socket_addr_init (&ret->sock_out, "0.0.0.0", 0); // client socket
ret->busy_count = 0;
+ ret->conns = 0;
+ ret->seed = getpid();
ret->n_dst = 0;
ret->dst = NULL;
@@ -186,7 +191,7 @@
// find a ready destination with minimal usage
static router_dst_t*
-router_choose_dst (glb_router_t* router)
+router_choose_dst_weight (glb_router_t* router)
{
router_dst_t* ret = NULL;
@@ -209,9 +214,59 @@
return ret;
}
+// find a ready destination by client source hint
+static router_dst_t*
+router_choose_dst_hint (glb_router_t* router, uint32_t hint)
+{
+ if (router->n_dst <= 0) return NULL;
+
+ /* First we attempt target predefined by hint (hint % router->n_dst).
+ * If that fails, we iterate over the rest. But for every client
+ * that falls onto that target we want to have a different iteration offset
+ * (so that they don't all failover to the same destination), hence hint
+ * is shifted, to get a fairly random (but deterministinc) offset.
+ * That's why total number of attempts is N+1 */
+
+ int n = router->n_dst + 1;
+ uint32_t i = hint;
+ time_t now = time(NULL);
+
+ hint = hint >> 8;
+
+ while (n > 0) {
+ i %= router->n_dst;
+
+ router_dst_t* d = &router->dst[i];
+
+ if (d->dst.weight > 0 &&
+ difftime (now, d->failed) > DST_RETRY_INTERVAL) {
+ return d;
+ }
+
+ i = hint + n;
+ n -= 1;
+ }
+
+ return NULL;
+}
+
+static inline router_dst_t*
+router_choose_dst (glb_router_t* router, uint32_t hint)
+{
+ if (GLB_POLICY_LEAST == glb_cnf->policy) {
+ return router_choose_dst_weight (router);
+ }
+ else {
+ return router_choose_dst_hint (router, hint);
+ }
+}
+
// connect to a best destination, possiblly failing over to a next best
static int
-router_connect_dst (glb_router_t* router, int sock, glb_sockaddr_t* addr)
+router_connect_dst (glb_router_t* const router,
+ int const sock,
+ uint32_t const hint,
+ glb_sockaddr_t* const addr)
{
router_dst_t* dst;
int error = EHOSTDOWN;
@@ -219,11 +274,12 @@
bool redirect = false;
GLB_MUTEX_LOCK (&router->lock);
+
router->busy_count++;
// keep trying until we run out of destinations
- while ((dst = router_choose_dst (router))) {
- dst->conns++;
+ while ((dst = router_choose_dst (router, hint))) {
+ dst->conns++; router->conns++;
dst->usage = router_dst_usage(dst);
GLB_MUTEX_UNLOCK (&router->lock);
@@ -236,7 +292,7 @@
if (ret != 0) {
error = errno;
// connect failed, undo usage count, update destination failed mark
- dst->conns--;
+ dst->conns--; router->conns--;
assert (dst->conns >= 0);
dst->usage = router_dst_usage(dst);
glb_log_warn ("Failed to connect to %s: %s",
@@ -270,25 +326,42 @@
// returns socket number or negative error code
int
-glb_router_connect (glb_router_t* router, glb_sockaddr_t* dst_addr)
+glb_router_connect (glb_router_t* router, const glb_sockaddr_t* src_addr,
+ glb_sockaddr_t* dst_addr)
{
int sock, ret;
+ /* Here it is assumed that this function is called only from one thread. */
+ if (router->conns >= glb_cnf->max_conn) {
+ glb_log_warn ("Maximum connection limit of %ld exceeded. Rejecting "
+ "connection attempt.", glb_cnf->max_conn);
+ return -EMFILE;
+ }
+
// prepare a socket
- sock = glb_socket_create (&router->sock_out);
+ sock = glb_socket_create (&router->sock_out, GLB_SOCK_NODELAY);
if (sock < 0) {
glb_log_error ("glb_socket_create() failed");
return sock;
}
+ uint32_t hint = 0;
+ switch (glb_cnf->policy)
+ {
+ case GLB_POLICY_LEAST: break;
+ case GLB_POLICY_RANDOM: hint = rand_r(&router->seed); break;
+ case GLB_POLICY_SOURCE: hint = glb_socket_addr_hash(src_addr); break;
+ case GLB_POLICY_MAX: assert(0);
+ };
+
// attmept to connect until we run out of destinations
- ret = router_connect_dst (router, sock, dst_addr);
+ ret = router_connect_dst (router, sock, hint, dst_addr);
// avoid socket leak
if (ret < 0) {
- glb_log_error ("router_connect_dst() failed");
+ glb_log_error ("router_connect_dst() failed.");
close (sock);
- sock = ret;
+ sock = ret;
}
return sock;
@@ -304,7 +377,7 @@
for (i = 0; i < router->n_dst; i++) {
router_dst_t* d = &router->dst[i];
if (glb_socket_addr_is_equal (&d->dst.addr, dst)) {
- d->conns--;
+ d->conns--; router->conns--;
assert(d->conns >= 0);
d->usage = router_dst_usage(d);
break;
@@ -323,7 +396,7 @@
glb_router_print_info (glb_router_t* router, char* buf, size_t buf_len)
{
size_t len = 0;
- long total_conns = 0;
+ long total_conns;
long n_dst;
long i;
@@ -340,12 +413,10 @@
for (i = 0; i < router->n_dst; i++) {
router_dst_t* d = &router->dst[i];
- total_conns += d->conns;
-
len += snprintf (buf + len, buf_len - len, "%s : %8.3f %7.3f %5ld\n",
glb_socket_addr_to_string(&d->dst.addr),
d->dst.weight, 1.0/(d->usage + 1.0),
- d->conns);
+ d->conns);
if (len == buf_len) {
buf[len - 1] = '\0';
return (len - 1);
@@ -353,13 +424,14 @@
}
n_dst = router->n_dst;
+ total_conns = router->conns;
GLB_MUTEX_UNLOCK (&router->lock);
len += snprintf (buf + len, buf_len - len,
"----------------------------------------------------\n"
- "Destinations: %ld, total connections: %ld\n",
- n_dst, total_conns);
+ "Destinations: %ld, total connections: %ld of %ld max\n",
+ n_dst, total_conns, glb_cnf->max_conn);
if (len == buf_len) {
buf[len - 1] = '\0';
return (len - 1);
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_router.h
^
|
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_router.h 70 2009-09-10 23:19:34Z alex $
+ * $Id: glb_router.h 84 2012-12-01 19:14:13Z alex $
*/
#ifndef _glb_router_h_
@@ -12,7 +12,7 @@
typedef struct glb_router glb_router_t;
extern glb_router_t*
-glb_router_create (size_t n_dst, glb_dst_t dst[]);
+glb_router_create (size_t n_dst, glb_dst_t const dst[]);
extern void
glb_router_destroy ();
@@ -20,10 +20,14 @@
/*!
* Returns file descriptor of a new destinaiton conneciton and fills
* dst_addr with real server address
+ *
+ * Not thread-safe. Supposed to be called ONLY from the listener main loop.
+ *
* @return file descriptor or negative error code
*/
extern int
-glb_router_connect (glb_router_t* router, glb_sockaddr_t* dst_addr);
+glb_router_connect (glb_router_t* router, const glb_sockaddr_t* src_addr,
+ glb_sockaddr_t* dst_addr);
/*!
* Decrements connection reference count for destination
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_signal.c
^
|
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_signal.c 36 2008-07-15 16:23:15Z alex $
+ * $Id: glb_signal.c 82 2012-12-01 15:31:21Z alex $
*/
#include "glb_log.h"
@@ -16,11 +16,11 @@
switch(signum) {
// case SIGALRM: should not be getting this signal either
// break;
+ case GLB_SIGNAL_OK: // used by child to report OK
+ exit (EXIT_SUCCESS);
case SIGCHLD:
glb_log_fatal ("Child unexpectedly terminated.");
exit (EXIT_FAILURE);
- case GLB_SIGNAL_OK: // used by child to report OK
- exit (EXIT_SUCCESS);
case SIGHUP:
case SIGTERM:
case SIGINT:
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_socket.c
^
|
@@ -1,20 +1,23 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_socket.c 70 2009-09-10 23:19:34Z alex $
+ * $Id: glb_socket.c 89 2012-12-05 17:59:30Z alex $
*/
+#include "glb_log.h"
+#include "glb_cmd.h"
+#include "glb_socket.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <netdb.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>
-#include "glb_log.h"
-#include "glb_socket.h"
-
//static const size_t addr_string_len = 512; heh, my GCC refuses to see it as
//a constant! here goes type safety...
#define addr_string_len 512
@@ -52,15 +55,16 @@
const char* hostname,
uint16_t port)
{
- struct hostent *host;
+ struct hostent* host = gethostbyname (hostname);
- host = gethostbyname (hostname);
if (host == NULL)
{
glb_log_error ("Unknown host %s.\n", hostname);
return -EINVAL;
}
- addr->sin_addr = *(struct in_addr *) host->h_addr;
+
+ memset (addr, 0, sizeof(*addr));
+ addr->sin_addr = *(struct in_addr *) host->h_addr;
addr->sin_port = htons (port);
addr->sin_family = AF_INET;
@@ -74,48 +78,113 @@
}
short
-glb_socket_addr_get_port (glb_sockaddr_t* addr)
+glb_socket_addr_get_port (const glb_sockaddr_t* addr)
{
return ntohs (addr->sin_port);
}
-int
-glb_socket_create (const struct sockaddr_in* addr)
+#define FNV32_SEED 2166136261
+#define FNV32_PRIME 16777619
+#define ROTL32(x,r) ((x << r) | (x >> (32 - r)))
+
+static inline uint32_t
+fnv32a_mix(const void* buf, size_t buf_len)
{
- int sock;
-// size_t buf_size = 1024;
+ uint32_t ret = FNV32_SEED;
+ const uint8_t* ptr = (uint8_t*)buf;
+ const uint8_t* const end = ptr + buf_len;;
- /* Create the socket. */
- sock = socket (PF_INET, SOCK_STREAM, 0);
- if (sock < 0)
+ while (ptr != end)
{
- glb_log_error ("Failed to create listening socket: %d (%s)",
- errno, strerror (errno));
- return -errno;
+ ret = (ret ^ *ptr) * FNV32_PRIME;
+ ptr++;
}
+
+ /* mix to improve avalanche effect */
+ ret *= ROTL32(ret, 24);
+ return ret ^ ROTL32(ret, 21);
+}
+
+uint32_t
+glb_socket_addr_hash (const glb_sockaddr_t* addr)
+{
+ return fnv32a_mix (&addr->sin_addr, sizeof(addr->sin_addr));
+}
+
+int
+glb_socket_setopt (int sock, uint32_t const optflags)
+{
+ int const one = 1;
+ int ret = 0;
+// int const zero = 0;
+
#if 0
+ size_t const buf_size = 1024;
+
/* probably a good place to specify some socket options */
- if (setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(buf_size))) {
- glb_log_error ("setsockopt() failed: %d (%s)", -errno, strerror(errno));
- close (sock);
+ if (setsockopt (sock, SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(buf_size)))
+ {
+ glb_log_error ("setsockopt() failed: %d (%s)", errno, strerror(errno));
return -errno;
}
- if (setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(buf_size))) {
- glb_log_error ("setsockopt() failed: %d (%s)", -errno, strerror(errno));
- close (sock);
+ if (setsockopt (sock, SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(buf_size)))
+ {
+ glb_log_error ("setsockopt() failed: %d (%s)", errno, strerror(errno));
return -errno;
}
#endif
- /* Give the socket a name. */
+
+ if ((optflags & GLB_SOCK_NODELAY) && glb_cnf->nodelay &&
+ setsockopt(sock, SOL_TCP, TCP_NODELAY, &one, sizeof(one)))
+ {
+ glb_log_warn ("Setting TCP_NODELAY failed: %d (%s)",
+ errno, strerror(errno));
+ ret = -errno;
+ }
+
+#if defined(TCP_DEFER_ACCEPT)
+ if ((optflags & GLB_SOCK_DEFER_ACCEPT) && glb_cnf->defer_accept &&
+ setsockopt(sock, SOL_TCP, TCP_DEFER_ACCEPT, &one, sizeof(one)))
+ {
+ glb_log_warn ("Setting TCP_DEFER_ACCEPT failed: %d (%s)",
+ errno, strerror(errno));
+ ret = -errno;
+ }
+#endif /* TCP_DEFER_ACCEPT */
+
+ return ret;
+}
+
+int
+glb_socket_create (const struct sockaddr_in* addr, uint32_t const optflags)
+{
+ int sock;
+ int err;
+
+ /* Create the socket. */
+ sock = socket (PF_INET, SOCK_STREAM, 0);
+ if (sock < 0)
+ {
+ err = -errno;
+ glb_log_error("Failed to create socket: %d (%s)", -err, strerror(-err));
+ return err;
+ }
+
+ if ((err = glb_socket_setopt(sock, optflags))) goto error;
+
if (bind (sock, (struct sockaddr *) addr, sizeof (*addr)) < 0)
{
- glb_log_error ("Failed to bind listening socket: %d (%s)",
- errno, strerror (errno));
- close (sock);
- return -errno;
+ err = -errno;
+ glb_log_error ("Failed to bind socket: %d (%s)", -err, strerror(-err));
+ goto error;
}
return sock;
+
+error:
+
+ close (sock);
+ return err;
}
|
[-]
[+]
|
Changed |
glb-0.8.2.tar.bz2/src/glb_socket.h
^
|
@@ -1,7 +1,7 @@
/*
- * Copyright (C) 2008 Codership Oy <info@codership.com>
+ * Copyright (C) 2008-2012 Codership Oy <info@codership.com>
*
- * $Id: glb_socket.h 31 2008-06-30 17:17:14Z alex $
+ * $Id: glb_socket.h 81 2012-12-01 02:19:56Z alex $
*/
#ifndef _glb_socket_h_
@@ -23,7 +23,7 @@
// behaves like inet_ntoa() - returns static buffer
extern const char*
glb_socket_addr_to_string (const glb_sockaddr_t* addr);
-
+
// Initialize glb_sockaddr_t struct
extern long
glb_socket_addr_init (glb_sockaddr_t* addr,
@@ -34,10 +34,21 @@
glb_socket_addr_set_port (glb_sockaddr_t* addr, uint16_t port);
extern short
-glb_socket_addr_get_port (glb_sockaddr_t* addr);
+glb_socket_addr_get_port (const glb_sockaddr_t* addr);
+
+extern uint32_t
+glb_socket_addr_hash (const glb_sockaddr_t* addr);
+
+#define GLB_SOCK_NODELAY 1U
+#define GLB_SOCK_DEFER_ACCEPT 2U
+
+// Sets default socket options
+extern int
+glb_socket_setopt (int sock, uint32_t optflags);
-// Returns socket (file descriptor) bound to a given address.
+// Returns socket (file descriptor) bound to a given address
+// with default options set
extern int
-glb_socket_create (const glb_sockaddr_t* addr);
+glb_socket_create (const glb_sockaddr_t* addr, uint32_t optflags);
#endif // _glb_socket_h_
|